forward port save/goto visual state changes from 2.X (now uses ctrl-Fn to save, Fn to goto)
git-svn-id: svn://localhost/ardour2/branches/3.0@11703 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e945505731
commit
0d4825d62e
|
@ -503,10 +503,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void swap_visual_state ();
|
||||
|
||||
std::vector<VisualState*> visual_states;
|
||||
sigc::connection visual_state_op_connection;
|
||||
void start_visual_state_op (uint32_t n);
|
||||
void cancel_visual_state_op (uint32_t n);
|
||||
bool end_visual_state_op (uint32_t n);
|
||||
|
||||
framepos_t leftmost_frame;
|
||||
double frames_per_unit;
|
||||
|
|
|
@ -6567,7 +6567,9 @@ Editor::save_visual_state (uint32_t n)
|
|||
visual_states.push_back (0);
|
||||
}
|
||||
|
||||
delete visual_states[n];
|
||||
if (visual_states[n] != 0) {
|
||||
delete visual_states[n];
|
||||
}
|
||||
|
||||
visual_states[n] = current_visual_state (true);
|
||||
gdk_beep ();
|
||||
|
@ -6590,38 +6592,19 @@ Editor::goto_visual_state (uint32_t n)
|
|||
void
|
||||
Editor::start_visual_state_op (uint32_t n)
|
||||
{
|
||||
if (visual_state_op_connection.empty()) {
|
||||
visual_state_op_connection = Glib::signal_timeout().connect (sigc::bind (sigc::mem_fun (*this, &Editor::end_visual_state_op), n), 1000);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::cancel_visual_state_op (uint32_t n)
|
||||
{
|
||||
if (!visual_state_op_connection.empty()) {
|
||||
visual_state_op_connection.disconnect();
|
||||
goto_visual_state (n);
|
||||
} else {
|
||||
//we land here if called from the menu OR if end_visual_state_op has been called
|
||||
//so check if we are already in visual state n
|
||||
// XXX not yet checking it at all, but redoing does not hurt
|
||||
goto_visual_state (n);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
Editor::end_visual_state_op (uint32_t n)
|
||||
{
|
||||
visual_state_op_connection.disconnect();
|
||||
save_visual_state (n);
|
||||
|
||||
|
||||
PopUp* pup = new PopUp (WIN_POS_MOUSE, 1000, true);
|
||||
char buf[32];
|
||||
snprintf (buf, sizeof (buf), _("Saved view %u"), n+1);
|
||||
pup->set_text (buf);
|
||||
pup->touch();
|
||||
}
|
||||
|
||||
return false; // do not call again
|
||||
void
|
||||
Editor::cancel_visual_state_op (uint32_t n)
|
||||
{
|
||||
goto_visual_state (n);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -312,18 +312,18 @@ This mode provides many different operations on both regions and control points,
|
|||
@-group|Editor/save-visual-state-11|<@PRIMARY@>F11|some text
|
||||
@-group|Editor/save-visual-state-12|<@PRIMARY@>F12|some text
|
||||
|
||||
@-group|Editor/goto-visual-state-1|<Release><@PRIMARY@>F1|some text
|
||||
@-group|Editor/goto-visual-state-2|<Release><@PRIMARY@>F2|some text
|
||||
@-group|Editor/goto-visual-state-3|<Release><@PRIMARY@>F3|some text
|
||||
@-group|Editor/goto-visual-state-4|<Release><@PRIMARY@>F4|some text
|
||||
@-group|Editor/goto-visual-state-5|<Release><@PRIMARY@>F5|some text
|
||||
@-group|Editor/goto-visual-state-6|<Release><@PRIMARY@>F6|some text
|
||||
@-group|Editor/goto-visual-state-7|<Release><@PRIMARY@>F7|some text
|
||||
@-group|Editor/goto-visual-state-8|<Release><@PRIMARY@>F8|some text
|
||||
@-group|Editor/goto-visual-state-9|<Release><@PRIMARY@>F9|some text
|
||||
@-group|Editor/goto-visual-state-10|<Release><@PRIMARY@>F10|some text
|
||||
@-group|Editor/goto-visual-state-11|<Release><@PRIMARY@>F11|some text
|
||||
@-group|Editor/goto-visual-state-12|<Release><@PRIMARY@>F12|some text
|
||||
@-group|Editor/goto-visual-state-1|F1|some text
|
||||
@-group|Editor/goto-visual-state-2|F2|some text
|
||||
@-group|Editor/goto-visual-state-3|F3|some text
|
||||
@-group|Editor/goto-visual-state-4|F4|some text
|
||||
@-group|Editor/goto-visual-state-5|F5|some text
|
||||
@-group|Editor/goto-visual-state-6|F6|some text
|
||||
@-group|Editor/goto-visual-state-7|F7|some text
|
||||
@-group|Editor/goto-visual-state-8|F8|some text
|
||||
@-group|Editor/goto-visual-state-9|F9|some text
|
||||
@-group|Editor/goto-visual-state-10|F10|some text
|
||||
@-group|Editor/goto-visual-state-11|F11|some text
|
||||
@-group|Editor/goto-visual-state-12|F12|some text
|
||||
|
||||
|
||||
;; numbers
|
||||
|
|
Loading…
Reference in New Issue