X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Feditpanel.C;h=1c357b549332165af74ebc32a0a5bc507fc19351;hb=568bf4145a8bc66472ea3625741dacbd3b56ccc0;hp=7d21602f26f5ec15738fc8ab6c75e7dcf37e2805;hpb=d371c5ba45b7c98941a6775603eeb5c50014c438;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/editpanel.C b/cinelerra-5.1/cinelerra/editpanel.C index 7d21602f..1c357b54 100644 --- a/cinelerra-5.1/cinelerra/editpanel.C +++ b/cinelerra-5.1/cinelerra/editpanel.C @@ -552,6 +552,10 @@ void EditPanel::reposition_buttons(int x, int y) mangoto->reposition_window(x1, y1); x1 += mangoto->get_w(); } + if( use_clk2play ) { + click2play->reposition_window(x1, y1+5); + x1 += click2play->get_w(); + } } @@ -831,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; } @@ -872,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; } @@ -924,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; } @@ -936,7 +946,7 @@ 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() { @@ -969,7 +979,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() { @@ -980,6 +990,21 @@ 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")) @@ -1031,8 +1056,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() @@ -1340,7 +1368,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() @@ -1350,6 +1378,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, @@ -1358,7 +1398,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()