projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
repeat play, in/out <> shortcuts, append to proj wording, cleanup
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
editpanel.C
diff --git
a/cinelerra-5.1/cinelerra/editpanel.C
b/cinelerra-5.1/cinelerra/editpanel.C
index 8de70d83341aa62c585592fb4d6cc2d5a0e45fc8..9714c4beafa65ac072a8bdd3aca29281693f1f55 100644
(file)
--- a/
cinelerra-5.1/cinelerra/editpanel.C
+++ b/
cinelerra-5.1/cinelerra/editpanel.C
@@
-329,6
+329,13
@@
SET_TRACE
SET_TRACE
}
SET_TRACE
}
+void EditPanel::stop_transport(const char *lock_msg)
+{
+ int have_subwindow_lock = subwindow->get_window_lock();
+ if( have_subwindow_lock ) subwindow->unlock_window();
+ mwindow->stop_transport();
+ if( have_subwindow_lock ) subwindow->lock_window(lock_msg);
+}
void EditPanel::toggle_label()
void EditPanel::toggle_label()
@@
-339,50
+346,36
@@
void EditPanel::toggle_label()
void EditPanel::prev_label()
{
int shift_down = subwindow->shift_down();
void EditPanel::prev_label()
{
int shift_down = subwindow->shift_down();
+ int snap = subwindow->ctrl_down() && subwindow->alt_down();
int have_mwindow_lock = mwindow->gui->get_window_lock();
int have_mwindow_lock = mwindow->gui->get_window_lock();
- int have_subwindow_lock =
- subwindow->get_top_level() == mwindow->gui->get_top_level() ?
- 0 : subwindow->get_window_lock();
- if(have_mwindow_lock)
- mwindow->gui->unlock_window();
- if(have_subwindow_lock)
- subwindow->unlock_window();
+ if( have_mwindow_lock ) mwindow->gui->unlock_window();
- mwindow->gui->mbuttons->transport->handle_transport(STOP, 1, 0, 0);
-
- if(have_subwindow_lock)
- subwindow->lock_window("EditPanel::prev_label 1");
+ stop_transport("EditPanel::prev_label 1");
mwindow->gui->lock_window("EditPanel::prev_label 2");
mwindow->gui->lock_window("EditPanel::prev_label 2");
-
- mwindow->prev_label(shift_down);
-
- if(!have_mwindow_lock)
+ if( snap )
+ mwindow->snap_left_label();
+ else
+ mwindow->prev_label(shift_down);
+ if( !have_mwindow_lock )
mwindow->gui->unlock_window();
}
void EditPanel::next_label()
{
int shift_down = subwindow->shift_down();
mwindow->gui->unlock_window();
}
void EditPanel::next_label()
{
int shift_down = subwindow->shift_down();
+ int snap = subwindow->ctrl_down() && subwindow->alt_down();
int have_mwindow_lock = mwindow->gui->get_window_lock();
int have_mwindow_lock = mwindow->gui->get_window_lock();
- int have_subwindow_lock =
- subwindow->get_top_level() == mwindow->gui->get_top_level() ?
- 0 : subwindow->get_window_lock();
- if(have_mwindow_lock)
- mwindow->gui->unlock_window();
- if(have_subwindow_lock)
- subwindow->unlock_window();
+ if( have_mwindow_lock ) mwindow->gui->unlock_window();
- mwindow->gui->mbuttons->transport->handle_transport(STOP, 1, 0, 0);
-
- if(have_subwindow_lock)
- subwindow->lock_window("EditPanel::next_label 1");
+ stop_transport("EditPanel::next_label 1");
mwindow->gui->lock_window("EditPanel::next_label 2");
mwindow->gui->lock_window("EditPanel::next_label 2");
-
- mwindow->next_label(shift_down);
-
- if(!have_mwindow_lock)
+ if( snap )
+ mwindow->snap_right_label();
+ else
+ mwindow->next_label(shift_down);
+ if( !have_mwindow_lock )
mwindow->gui->unlock_window();
}
mwindow->gui->unlock_window();
}
@@
-391,50
+384,40
@@
void EditPanel::next_label()
void EditPanel::prev_edit()
{
int shift_down = subwindow->shift_down();
void EditPanel::prev_edit()
{
int shift_down = subwindow->shift_down();
+ int snap = subwindow->ctrl_down() && subwindow->alt_down();
int have_mwindow_lock = mwindow->gui->get_window_lock();
int have_mwindow_lock = mwindow->gui->get_window_lock();
- int have_subwindow_lock =
- subwindow->get_top_level() == mwindow->gui->get_top_level() ?
- 0 : subwindow->get_window_lock();
- if(have_mwindow_lock)
- mwindow->gui->unlock_window();
- if(have_subwindow_lock)
- subwindow->unlock_window();
+ if( have_mwindow_lock ) mwindow->gui->unlock_window();
- mwindow->gui->mbuttons->transport->handle_transport(STOP, 1, 0, 0);
-
- if(have_subwindow_lock)
- subwindow->lock_window("EditPanel::prev_edit 1");
+ stop_transport("EditPanel::prev_edit 1");
mwindow->gui->lock_window("EditPanel::prev_edit 2");
mwindow->gui->lock_window("EditPanel::prev_edit 2");
- mwindow->prev_edit_handle(shift_down);
+ if( snap )
+ mwindow->snap_left_edit();
+ else
+ mwindow->prev_edit_handle(shift_down);
- if(
!have_mwindow_lock
)
+ if(
!have_mwindow_lock
)
mwindow->gui->unlock_window();
}
void EditPanel::next_edit()
{
int shift_down = subwindow->shift_down();
mwindow->gui->unlock_window();
}
void EditPanel::next_edit()
{
int shift_down = subwindow->shift_down();
+ int snap = subwindow->ctrl_down() && subwindow->alt_down();
int have_mwindow_lock = mwindow->gui->get_window_lock();
int have_mwindow_lock = mwindow->gui->get_window_lock();
- int have_subwindow_lock =
- subwindow->get_top_level() == mwindow->gui->get_top_level() ?
- 0 : subwindow->get_window_lock();
- if(have_mwindow_lock)
- mwindow->gui->unlock_window();
- if(have_subwindow_lock)
- subwindow->unlock_window();
+ if( have_mwindow_lock ) mwindow->gui->unlock_window();
- mwindow->gui->mbuttons->transport->handle_transport(STOP, 1, 0, 0);
-
- if(have_subwindow_lock)
- subwindow->lock_window("EditPanel::next_edit 1");
+ stop_transport("EditPanel::next_edit 1");
mwindow->gui->lock_window("EditPanel::next_edit 2");
mwindow->gui->lock_window("EditPanel::next_edit 2");
- mwindow->next_edit_handle(shift_down);
+ if( snap )
+ mwindow->snap_right_edit();
+ else
+ mwindow->next_edit_handle(shift_down);
- if(
!have_mwindow_lock
)
+ if(
!have_mwindow_lock
)
mwindow->gui->unlock_window();
}
mwindow->gui->unlock_window();
}
@@
-626,14
+609,9
@@
void EditPanel::set_outpoint()
mwindow->set_outpoint(1);
}
mwindow->set_outpoint(1);
}
-void EditPanel::
clear_in
point()
+void EditPanel::
unset_inout
point()
{
{
- mwindow->delete_inpoint();
-}
-
-void EditPanel::clear_outpoint()
-{
- mwindow->delete_outpoint();
+ mwindow->unset_inoutpoint(1);
}
}
@@
-654,9
+632,14
@@
int EditInPoint::handle_event()
}
int EditInPoint::keypress_event()
{
}
int EditInPoint::keypress_event()
{
- if(get_keypress() == '[')
+ int key = get_keypress();
+ if( key == '[' || key == '<' ) {
+ panel->set_inpoint();
+ return 1;
+ }
+ if(ctrl_down() && get_keypress() == 't')
{
{
- panel->
set_in
point();
+ panel->
unset_inout
point();
return 1;
}
return 0;
return 1;
}
return 0;
@@
-679,11
+662,16
@@
int EditOutPoint::handle_event()
}
int EditOutPoint::keypress_event()
{
}
int EditOutPoint::keypress_event()
{
- i
f(get_keypress() == ']')
- {
+ i
nt key = get_keypress();
+
if( key == ']' || key == '>' )
{
panel->set_outpoint();
return 1;
}
panel->set_outpoint();
return 1;
}
+ if(ctrl_down() && get_keypress() == 't')
+ {
+ panel->unset_inoutpoint();
+ return 1;
+ }
return 0;
}
return 0;
}
@@
-705,7
+693,7
@@
EditNextLabel::~EditNextLabel()
}
int EditNextLabel::keypress_event()
{
}
int EditNextLabel::keypress_event()
{
- if(
get_keypress() == RIGHT && ctrl_down()
)
+ if(
ctrl_down() && get_keypress() == (!alt_down() ? RIGHT : '>')
)
return handle_event();
return 0;
}
return handle_event();
return 0;
}
@@
-732,7
+720,7
@@
EditPrevLabel::~EditPrevLabel()
}
int EditPrevLabel::keypress_event()
{
}
int EditPrevLabel::keypress_event()
{
- if(
get_keypress() == LEFT && ctrl_down()
)
+ if(
ctrl_down() && get_keypress() == (!alt_down() ? LEFT : '<')
)
return handle_event();
return 0;
}
return handle_event();
return 0;
}
@@
-761,7
+749,7
@@
EditNextEdit::~EditNextEdit()
}
int EditNextEdit::keypress_event()
{
}
int EditNextEdit::keypress_event()
{
- if(
get_keypress() == RIGHT && alt_down()
)
+ if(
alt_down() && get_keypress() == (!ctrl_down() ? RIGHT : '.')
)
return handle_event();
return 0;
}
return handle_event();
return 0;
}
@@
-788,7
+776,7
@@
EditPrevEdit::~EditPrevEdit()
}
int EditPrevEdit::keypress_event()
{
}
int EditPrevEdit::keypress_event()
{
- if(
get_keypress() == LEFT && alt_down()
)
+ if(
alt_down() && get_keypress() == (!ctrl_down() ? LEFT : ',')
)
return handle_event();
return 0;
}
return handle_event();
return 0;
}
@@
-874,7
+862,7
@@
int EditToClip::handle_event()
int EditToClip::keypress_event()
{
int EditToClip::keypress_event()
{
- if(get_keypress() == 'i')
+ if(get_keypress() == 'i'
&& !alt_down()
)
{
handle_event();
return 1;
{
handle_event();
return 1;
@@
-1186,7
+1174,7
@@
EditLabelbutton::~EditLabelbutton()
}
int EditLabelbutton::keypress_event()
{
}
int EditLabelbutton::keypress_event()
{
- if(get_keypress() == 'l')
+ if(get_keypress() == 'l'
&& !alt_down()
)
return handle_event();
return 0;
}
return handle_event();
return 0;
}