add a modal lock dialog for better testing (and someone might find it useful, too)
This commit is contained in:
parent
f147846863
commit
a12f43fa46
|
@ -301,6 +301,7 @@ Editor::Editor ()
|
|||
last_update_frame = 0;
|
||||
pre_press_cursor = 0;
|
||||
_drags = new DragManager (this);
|
||||
lock_dialog = 0;
|
||||
current_mixer_strip = 0;
|
||||
tempo_lines = 0;
|
||||
|
||||
|
|
|
@ -1358,6 +1358,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void escape ();
|
||||
void lock ();
|
||||
void unlock ();
|
||||
ArdourDialog* lock_dialog;
|
||||
|
||||
Gtk::Menu fade_context_menu;
|
||||
|
||||
|
|
|
@ -7121,11 +7121,22 @@ Editor::toggle_midi_input_active (bool flip_others)
|
|||
void
|
||||
Editor::lock ()
|
||||
{
|
||||
if (!lock_dialog) {
|
||||
lock_dialog = new ArdourDialog (string_compose (_("%1 is Locked"), PROGRAM_NAME), true);
|
||||
Gtk::Button* b = manage (new Gtk::Button (_("Click me to unlock")));
|
||||
b->signal_clicked().connect (sigc::mem_fun (*this, &Editor::unlock));
|
||||
|
||||
lock_dialog->get_vbox()->pack_start (*b);
|
||||
lock_dialog->get_vbox()->show_all ();
|
||||
}
|
||||
|
||||
ActionManager::disable_all_actions ();
|
||||
lock_dialog->present ();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::unlock ()
|
||||
{
|
||||
lock_dialog->hide ();
|
||||
ActionManager::pop_action_state ();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue