X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Fmwindowgui.C;h=ec33eba7b24fe9e4998bc968fe48be937d5f2784;hb=60f8df69db9ddd8148bfc41a17bb0955b52a45e6;hp=7587d46dee0fbbfa8e296eecd22c21335875d4de;hpb=b78e8ac7987fbf35a4ba60534c4a3d2b290562b9;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/mwindowgui.C b/cinelerra-5.1/cinelerra/mwindowgui.C index 7587d46d..ec33eba7 100644 --- a/cinelerra-5.1/cinelerra/mwindowgui.C +++ b/cinelerra-5.1/cinelerra/mwindowgui.C @@ -1168,6 +1168,14 @@ int MWindowGUI::keypress_event() result = 1; break; + case 'k': case 'K': + if( alt_down() ) break; + stop_transport("MWindowGUI::keypress_event 1"); + mwindow->nearest_plugin_keyframe(shift_down(), + !ctrl_down() ? PLAY_FORWARD : PLAY_REVERSE); + result = 1; + break; + case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': if( !alt_down() || shift_down() ) break; @@ -1178,9 +1186,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 @@ -1192,9 +1198,7 @@ int MWindowGUI::keypress_event() 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 @@ -2236,6 +2240,32 @@ void MWindowGUI::draw_trackmovement() } +void MWindowGUI::update_mixers(Track *track, int v) +{ + for( int i=0; ipatchbay; + if( !patchbay ) continue; + for( int j=0; jpatches.total; ++j ) { + PatchGUI *patchgui = patchbay->patches.values[j]; + if( !patchgui->mix ) continue; + if( !track || patchgui->track == track ) { + patchgui->mix->update(v>=0 ? v : + mwindow->mixer_track_active(patchgui->track)); + } + } + } +} + +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")) {