cont'd work & fix bug introduced in 03660573e
[ardour.git] / gtk2_ardour / ardour_ui_dialogs.cc
index b112418474b7c45b360d44e886eba11cc64d46a7..cc0d9f9d242c5ed768f1c7e91d0e1eae3a49437d 100644 (file)
 #include "main_clock.h"
 #include "meterbridge.h"
 #include "meter_patterns.h"
+#include "monitor_section.h"
 #include "midi_tracer.h"
 #include "mixer_ui.h"
 #include "public_editor.h"
+#include "processor_box.h"
 #include "rc_option_editor.h"
 #include "route_params_ui.h"
 #include "shuttle_control.h"
@@ -345,7 +347,7 @@ ARDOUR_UI::toggle_editor_and_mixer ()
        }
 
        if (editor->tabbed() && !mixer->tabbed()) {
-               if (!editor->fully_visible()) {
+               if (main_window_visibility && main_window_visibility->fully_visible()) {
                        if (_tabs.get_current_page() == _tabs.page_num (editor->contents())) {
                                mixer->make_visible ();
                        }
@@ -356,7 +358,7 @@ ARDOUR_UI::toggle_editor_and_mixer ()
        }
 
        if (mixer->tabbed () && !editor->tabbed()) {
-               if (!editor->fully_visible()) {
+               if (main_window_visibility && main_window_visibility->fully_visible()) {
                        if (_tabs.get_current_page() == _tabs.page_num (mixer->contents())) {
                                editor->make_visible ();
                        }
@@ -756,7 +758,6 @@ ARDOUR_UI::toggle_luawindow ()
        assert (editor && luawindow);
 
        bool show = false;
-       bool obscuring = false;
 
        if (luawindow->not_visible ()) {
                show = true;
@@ -802,16 +803,8 @@ ARDOUR_UI::create_key_editor ()
 {
        KeyEditor* kedit = new KeyEditor;
 
-       if (global_bindings) {
-               kedit->add_tab (_("Global"), *global_bindings);
-       }
-
-       if (editor->bindings) {
-               kedit->add_tab (_("Editing"), *editor->bindings);
-       }
-
-       if (mixer->bindings) {
-               kedit->add_tab (_("Mixing"), *mixer->bindings);
+       for (std::list<Bindings*>::iterator b = Bindings::bindings.begin(); b != Bindings::bindings.end(); ++b) {
+               kedit->add_tab ((*b)->name(), **b);
        }
 
        return kedit;
@@ -929,9 +922,3 @@ ARDOUR_UI::toggle_monitor_section_visibility ()
                        mixer->show_monitor_section (tact->get_active());
        }
 }
-
-void
-ARDOUR_UI::lua_script_manager ()
-{
-       lua_script_window.show ();
-}