add a modal lock dialog for better testing (and someone might find it useful, too)
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 24 Jun 2014 14:14:07 +0000 (10:14 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 24 Jun 2014 14:14:07 +0000 (10:14 -0400)
gtk2_ardour/editor.cc
gtk2_ardour/editor.h
gtk2_ardour/editor_ops.cc

index e0e11e3f49726d08f3abd9e3fdd97042227ac180..7787b89ef598000adb4bdb59c08769736391deb7 100644 (file)
@@ -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;
 
index 0c05b7c2f295c3b6d610d54b3b51e2c5051e3f6a..1356c16834d764928f0ae3edb24306d0174a5f63 100644 (file)
@@ -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;
 
index 0c36a4587d86c62eb7bccf50a820eb562a841bce..71b80d7148d5f49e6bafd22abfccdcef680f7b07 100644 (file)
@@ -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 ();
 }