summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-06-24 10:14:07 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-24 10:14:07 -0400
commita12f43fa46bc643e9c48fd638915da616191b995 (patch)
treec97152d18944db46f6cdd362b7154358e8942aba /gtk2_ardour
parentf147846863c27dfa13ef83b696f198a5092721fa (diff)
add a modal lock dialog for better testing (and someone might find it useful, too)
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor.cc1
-rw-r--r--gtk2_ardour/editor.h1
-rw-r--r--gtk2_ardour/editor_ops.cc11
3 files changed, 13 insertions, 0 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index e0e11e3f49..7787b89ef5 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -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;
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 0c05b7c2f2..1356c16834 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -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;
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 0c36a4587d..71b80d7148 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -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 ();
}