X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Feditpanel.C;h=b370723a0a4a8f0f49acec859d6eae32c38df2e4;hb=0d3917a4eda0344055badf0bd6e235c15c3b6cb8;hp=a5d8df9b50c2d6e5bfae4ec913abf2b5d5513810;hpb=ccd23c15fae578be22d48b1a1e8b09cb43d593ae;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/editpanel.C b/cinelerra-5.1/cinelerra/editpanel.C index a5d8df9b..b370723a 100644 --- a/cinelerra-5.1/cinelerra/editpanel.C +++ b/cinelerra-5.1/cinelerra/editpanel.C @@ -835,7 +835,9 @@ int EditOverwrite::handle_event() } int EditOverwrite::keypress_event() { - if( get_keypress() == 'b' ) { + if( alt_down() ) return 0; + if( get_keypress() == 'b' || + (panel->is_vwindow() && get_keypress() == 'B') ) { handle_event(); return 1; } @@ -876,7 +878,9 @@ int EditToClip::handle_event() int EditToClip::keypress_event() { - if( get_keypress() == 'i' && !alt_down() ) { + if( alt_down() ) return 0; + if( get_keypress() == 'i' || + (panel->is_vwindow() && get_keypress() == 'I') ) { handle_event(); return 1; } @@ -928,7 +932,9 @@ int EditSplice::handle_event() } int EditSplice::keypress_event() { - if( get_keypress() == 'v' ) { + if( alt_down() ) return 0; + if( get_keypress() == 'v' || + (panel->is_vwindow() && get_keypress() == 'V') ) { handle_event(); return 1; } @@ -940,13 +946,15 @@ EditCut::EditCut(MWindow *mwindow, EditPanel *panel, int x, int y) { this->mwindow = mwindow; this->panel = panel; - set_tooltip(_("Cut ( x )")); + set_tooltip(_("Split | Cut ( x )")); } EditCut::~EditCut() { } int EditCut::keypress_event() { + if( ctrl_down() || shift_down() || alt_down() ) + return 0; if( get_keypress() == 'x' ) return handle_event(); return 0; @@ -973,7 +981,7 @@ EditClick2Play::EditClick2Play(MWindow *mwindow, EditPanel *panel, int x, int y) { this->mwindow = mwindow; this->panel = panel; - set_tooltip(_("Click to play")); + set_tooltip(_("Click to play (p)")); } int EditClick2Play::handle_event() { @@ -984,20 +992,37 @@ int EditClick2Play::handle_event() mwindow->edl->session->vwindow_click2play = value; return 1; } +int EditClick2Play::keypress_event() +{ + int key = get_keypress(); + if( key == 'p' && !ctrl_down() && !shift_down() && !alt_down() ) { + int value = get_value() ? 0 : 1; + update(value); + if( !panel->is_vwindow() ) + mwindow->edl->session->cwindow_click2play = value; + else + mwindow->edl->session->vwindow_click2play = value; + return 1; + } + return 0; +} + EditCommercial::EditCommercial(MWindow *mwindow, EditPanel *panel, int x, int y) : BC_Button(x, y, mwindow->theme->get_image_set("commercial")) { this->mwindow = mwindow; this->panel = panel; - set_tooltip(_("Commercial ( shift X )")); + set_tooltip(_("Commercial ( shift A )")); } EditCommercial::~EditCommercial() { } int EditCommercial::keypress_event() { - if( get_keypress() == 'X' ) + if( ctrl_down() || !shift_down() || alt_down() ) + return 0; + if( get_keypress() == 'A' ) return handle_event(); return 0; } @@ -1035,8 +1060,11 @@ EditCopy::~EditCopy() int EditCopy::keypress_event() { - if( get_keypress() == 'c' ) + if( alt_down() ) return 0; + if( get_keypress() == 'c' || + (panel->is_vwindow() && get_keypress() == 'C') ) { return handle_event(); + } return 0; } int EditCopy::handle_event() @@ -1156,6 +1184,8 @@ EditUndo::~EditUndo() } int EditUndo::keypress_event() { + if( ctrl_down() || shift_down() || alt_down() ) + return 0; if( get_keypress() == 'z' ) return handle_event(); return 0; @@ -1178,6 +1208,8 @@ EditRedo::~EditRedo() } int EditRedo::keypress_event() { + if( ctrl_down() || !shift_down() || alt_down() ) + return 0; if( get_keypress() == 'Z' ) return handle_event(); return 0; @@ -1344,7 +1376,7 @@ KeyFrameButton::KeyFrameButton(MWindow *mwindow, EditPanel *panel, int x, int y) { this->mwindow = mwindow; this->panel = panel; - set_tooltip(_("Generate keyframes while tweeking")); + set_tooltip(_("Generate keyframes while tweeking (j)")); } int KeyFrameButton::handle_event() @@ -1354,6 +1386,18 @@ int KeyFrameButton::handle_event() return 1; } +int KeyFrameButton::keypress_event() +{ + int key = get_keypress(); + if( key == 'j' && !ctrl_down() && !shift_down() && !alt_down() ) { + int value = get_value() ? 0 : 1; + update(value); + mwindow->set_auto_keyframes(value, + !panel->is_mwindow(), panel->is_mwindow()); + return 1; + } + return 0; +} LockLabelsButton::LockLabelsButton(MWindow *mwindow, int x, int y) : BC_Toggle(x, y, @@ -1362,7 +1406,7 @@ LockLabelsButton::LockLabelsButton(MWindow *mwindow, int x, int y) "", 0, 0, 0) { this->mwindow = mwindow; - set_tooltip(_("Lock labels from moving")); + set_tooltip(_("Lock labels from moving with edits")); } int LockLabelsButton::handle_event()