X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fcwindowgui.C;h=37dd35bf20c3c244aead401cf5705b10e811dac6;hb=86bd203ac1fc29d93f63d13e2979468f06bdc3a2;hp=11114bc91223807af309babfeac40c86c77db88a;hpb=576087eacf577a0fa5d3008d37c4d5b597f0990a;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index 11114bc9..37dd35bf 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -298,6 +298,7 @@ int CWindowGUI::button_press_event() { if( current_operation == CWINDOW_NONE && mwindow->edl != 0 && canvas->get_canvas() && + mwindow->edl->session->cwindow_click2play && canvas->get_canvas()->get_cursor_over_window() ) { switch( get_buttonpress() ) { case LEFT_BUTTON: @@ -503,32 +504,58 @@ int CWindowGUI::keypress_event() int shift_down = this->shift_down(); unlock_window(); stop_transport(0); - mwindow->gui->lock_window("CWindowGUI::keypress_event 2"); + mwindow->gui->lock_window("CWindowGUI::keypress_event 5"); if( alt_down ) mwindow->prev_edit_handle(shift_down); else mwindow->move_left(); mwindow->gui->unlock_window(); - lock_window("CWindowGUI::keypress_event 2"); + lock_window("CWindowGUI::keypress_event 6"); result = 1; } break; + + case ',': + if( !ctrl_down() && !alt_down() ) { + unlock_window(); + stop_transport(0); + mwindow->gui->lock_window("CWindowGUI::keypress_event 7"); + mwindow->move_left(); + mwindow->gui->unlock_window(); + lock_window("CWindowGUI::keypress_event 8"); + result = 1; + } + break; + case RIGHT: if( !ctrl_down() ) { int alt_down = this->alt_down(); int shift_down = this->shift_down(); unlock_window(); stop_transport(0); - mwindow->gui->lock_window("CWindowGUI::keypress_event 2"); + mwindow->gui->lock_window("CWindowGUI::keypress_event 8"); if( alt_down ) mwindow->next_edit_handle(shift_down); else mwindow->move_right(); mwindow->gui->unlock_window(); - lock_window("CWindowGUI::keypress_event 2"); + lock_window("CWindowGUI::keypress_event 9"); + result = 1; + } + break; + + case '.': + if( !ctrl_down() && !alt_down() ) { + unlock_window(); + stop_transport(0); + mwindow->gui->lock_window("CWindowGUI::keypress_event 10"); + mwindow->move_right(); + mwindow->gui->unlock_window(); + lock_window("CWindowGUI::keypress_event 11"); result = 1; } break; + } if(!result) result = transport->keypress_event(); @@ -686,28 +713,27 @@ void CWindowGUI::stop_transport(const char *lock_msg) CWindowEditing::CWindowEditing(MWindow *mwindow, CWindow *cwindow) - : EditPanel(mwindow, - cwindow->gui, - mwindow->theme->cedit_x, - mwindow->theme->cedit_y, + : EditPanel(mwindow, cwindow->gui, CWINDOW_ID, + mwindow->theme->cedit_x, mwindow->theme->cedit_y, mwindow->edl->session->editing_mode, - 0, - 1, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 0, + 0, // use_editing_mode + 1, // use_keyframe + 0, // use_splice + 0, // use_overwrite + 1, // use_lift + 1, // use_extract + 1, // use_copy + 1, // use_paste + 1, // use_undo + 0, // use_fit 0, // locklabels - 1, - 1, - 1, - 0, - 1, - 0) + 1, // use_labels + 1, // use_toclip + 1, // use_meters + 1, // use_cut + 0, // use_commerical + 0, // use_goto + 1) // use_clk2play { this->mwindow = mwindow; this->cwindow = cwindow; @@ -726,14 +752,20 @@ CWrapper(set_inpoint) CWrapper(set_outpoint) CWrapper(unset_inoutpoint) CWrapper(toggle_label) -CWrapper(prev_label) -CWrapper(next_label) -CWrapper(prev_edit) -CWrapper(next_edit) + +#define CWrapper_cut(fn) void CWindowEditing::fn(int cut) { \ + mwindow->gui->lock_window("CWrapper::" #fn); \ + EditPanel::fn(cut); \ + mwindow->gui->unlock_window(); \ +} +CWrapper_cut(prev_label) +CWrapper_cut(next_label) +CWrapper_cut(prev_edit) +CWrapper_cut(next_edit) void CWindowEditing::to_clip() { - mwindow->to_clip(mwindow->edl, _("composer window: ")); + mwindow->to_clip(mwindow->edl, _("composer window: "), 0); }