X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmwindowgui.C;h=1ac33aafa235c7f2c02a646b9e7d184b5f78c64c;hp=613c0324a8c5033b5c23aba53b09efb643597a19;hb=6c533a5098aa5a5ca85b97dd405bb06b26033a91;hpb=564227981f9c1b021445fa0352b75c7670172912 diff --git a/cinelerra-5.1/cinelerra/mwindowgui.C b/cinelerra-5.1/cinelerra/mwindowgui.C index 613c0324..1ac33aaf 100644 --- a/cinelerra-5.1/cinelerra/mwindowgui.C +++ b/cinelerra-5.1/cinelerra/mwindowgui.C @@ -1039,7 +1039,7 @@ int MWindowGUI::drag_stop() } -//printf("TrackCanvas::drag_stop %d %d\n", redraw, mwindow->session->current_operation); +//printf("MWindowGUI::drag_stop %d %d\n", redraw, mwindow->session->current_operation); if(redraw) { mwindow->edl->tracks->update_y_pixels(mwindow->theme); @@ -1162,6 +1162,8 @@ int MWindowGUI::keypress_event() int result = mbuttons->keypress_event(); if( result ) return result; + Track *this_track = 0; + switch(get_keypress()) { case 'e': mwindow->toggle_editing_mode(); @@ -1170,9 +1172,7 @@ int MWindowGUI::keypress_event() case 'k': case 'K': if( alt_down() ) break; - unlock_window(); - mbuttons->transport->handle_transport(STOP, 1, 0, 0); - lock_window("MWindowGUI::keypress_event 1"); + stop_transport("MWindowGUI::keypress_event 1"); mwindow->nearest_plugin_keyframe(shift_down(), !ctrl_down() ? PLAY_FORWARD : PLAY_REVERSE); result = 1; @@ -1188,9 +1188,7 @@ int MWindowGUI::keypress_event() case LEFT: if( !ctrl_down() ) { if( alt_down() ) { - unlock_window(); - mbuttons->transport->handle_transport(STOP, 1, 0, 0); - lock_window("MWindowGUI::keypress_event 1"); + stop_transport("MWindowGUI::keypress_event 1"); mwindow->prev_edit_handle(shift_down()); } else @@ -1199,12 +1197,17 @@ int MWindowGUI::keypress_event() } break; + case ',': + if( !ctrl_down() && !alt_down() ) { + mwindow->move_left(); + result = 1; + } + break; + case RIGHT: if( !ctrl_down() ) { if( alt_down() ) { - unlock_window(); - mbuttons->transport->handle_transport(STOP, 1, 0, 0); - lock_window("MWindowGUI::keypress_event 2"); + stop_transport("MWindowGUI::keypress_event 2"); mwindow->next_edit_handle(shift_down()); } else @@ -1213,6 +1216,13 @@ int MWindowGUI::keypress_event() } break; + case '.': + if( !ctrl_down() && !alt_down() ) { + mwindow->move_right(); + result = 1; + } + break; + case UP: if( ctrl_down() && !alt_down() ) mwindow->expand_y(); @@ -1255,7 +1265,6 @@ int MWindowGUI::keypress_event() case TAB: case LEFTTAB: - Track *this_track = 0; for( int i=0; iover_track()) != 0 ) break; @@ -1279,10 +1288,23 @@ int MWindowGUI::keypress_event() update(0, 1, 0, 0, 1, 0, 1); unlock_window(); mwindow->cwindow->update(0, 1, 1); - lock_window("TrackCanvas::keypress_event 3"); + lock_window("MWindowGUI::keypress_event 3"); result = 1; break; + + case KEY_F1: + case KEY_F2: + case KEY_F3: + case KEY_F4: + case KEY_F5: + case KEY_F6: + case KEY_F7: + case KEY_F8: + case KEY_F9: + case KEY_F10: + resend_event(mwindow->cwindow->gui); + return 1; } // since things under cursor have changed... @@ -2263,6 +2285,15 @@ void MWindowGUI::update_mixers(Track *track, int v) } } +void MWindowGUI::stop_transport(const char *lock_msg) +{ + if( !mbuttons->transport->is_stopped() ) { + if( lock_msg ) unlock_window(); + mbuttons->transport->handle_transport(STOP, 1, 0, 0); + if( lock_msg ) lock_window(lock_msg); + } +} + PaneButton::PaneButton(MWindow *mwindow, int x, int y) : BC_Button(x, y, mwindow->theme->get_image_set("pane")) { @@ -2297,7 +2328,8 @@ int PaneButton::cursor_motion_event() int PaneButton::button_release_event() { - mwindow->gui->stop_pane_drag(); + if( get_buttonpress() != WHEEL_DOWN && get_buttonpress() != WHEEL_UP ) + mwindow->gui->stop_pane_drag(); int result = BC_Button::button_release_event(); return result; }