cleanup post-rebase-against-master messes
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 12 Jan 2016 02:36:44 +0000 (21:36 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 22 Feb 2016 20:31:25 +0000 (15:31 -0500)
gtk2_ardour/ardour_ui.cc
gtk2_ardour/ardour_ui_ed.cc
gtk2_ardour/mixer_ui.cc
gtk2_ardour/mixer_ui.h
gtk2_ardour/rc_option_editor.cc
libs/surfaces/faderport/gui.cc

index 344ca17d18f1084ef85af916009cc2d0d6bb3015..9e48335ff7959b86191bbc69140da3b572104ec3 100644 (file)
@@ -226,12 +226,7 @@ libxml_structured_error_func (void* /* parsing_context*/,
 
 
 ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
-<<<<<<< HEAD
-
        : Gtkmm2ext::UI (PROGRAM_NAME, X_("gui"), argcp, argvp)
-=======
-       : Gtkmm2ext::UI (PROGRAM_NAME, argcp, argvp)
->>>>>>> first compilable version of tabbable design.
        , session_loaded (false)
        , gui_object_state (new GUIObjectState)
        , primary_clock   (new MainClock (X_("primary"),   X_("transport"), true ))
@@ -2928,8 +2923,6 @@ ARDOUR_UI::load_from_application_api (const std::string& path)
                if (get_session_parameters (true, false)) {
                        exit (1);
                }
-
-               goto_editor_window ();
        }
 }
 
index e6a6821d7ebb3f10cdc88c20b219f71184d226c5..28fbdf88fb65a7a51279707c5713f0035606e20a 100644 (file)
@@ -138,13 +138,13 @@ ARDOUR_UI::install_actions ()
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::write_sensitive_actions.push_back (act);
 
-       act = Actions.register_action (main_actions, X_("duplicate-routes"), _("Duplicate Tracks/Busses..."),
+       act = global_actions.register_action (main_actions, X_("duplicate-routes"), _("Duplicate Tracks/Busses..."),
                                              sigc::mem_fun(*this, &ARDOUR_UI::start_duplicate_routes));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::write_sensitive_actions.push_back (act);
        ActionManager::track_selection_sensitive_actions.push_back (act);
 
-       act = Actions.register_action (main_actions, X_("cancel-solo"), _("Cancel Solo"), sigc::mem_fun(*this, &ARDOUR_UI::cancel_solo));
+       act = global_actions.register_action (main_actions, X_("cancel-solo"), _("Cancel Solo"), sigc::mem_fun(*this, &ARDOUR_UI::cancel_solo));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::write_sensitive_actions.push_back (act);
 
@@ -263,14 +263,15 @@ ARDOUR_UI::install_actions ()
        global_actions.register_toggle_action (common_actions, X_("ToggleMaximalMixer"), _("Maximise Mixer Space"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_space));
        ActionManager::session_sensitive_actions.push_back (act);
 
-       act = ActionManager::register_toggle_action (common_actions, X_("ToggleMixerList"), _("Toggle Mixer List"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_list));
+       act = global_actions.register_toggle_action (common_actions, X_("ToggleMixerList"), _("Toggle Mixer List"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_list));
        ActionManager::session_sensitive_actions.push_back (act);
 
-       act = ActionManager::register_toggle_action (common_actions, X_("ToggleMonitorSection"), _("Toggle Monitor Section Visibility"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_monitor_section_visibility));
+       act = global_actions.register_toggle_action (common_actions, X_("ToggleMonitorSection"), _("Toggle Monitor Section Visibility"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_monitor_section_visibility));
        act->set_sensitive (false);
 
-if (Profile->get_mixbus())
-       global_actions.register_action (common_actions, X_("show-ui-prefs"), _("Show more UI preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_ui_prefs));
+       if (Profile->get_mixbus()) {
+               global_actions.register_action (common_actions, X_("show-ui-prefs"), _("Show more UI preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_ui_prefs));
+       }
 
        global_actions.register_action (common_actions, X_("toggle-meterbridge"), S_("Window|Meterbridge"),  sigc::mem_fun(*this, &ARDOUR_UI::toggle_meterbridge));
 
index 762e7599aeb947b8391e90954b1f86d9c5ac84c2..d7a4fc791734a08751427be5f0a99837072d1e53 100644 (file)
@@ -305,7 +305,6 @@ Mixer_UI::track_editor_selection ()
        PublicEditor::instance().get_selection().TracksChanged.connect (sigc::mem_fun (*this, &Mixer_UI::follow_editor_selection));
 }
 
-void
 Gtk::Window*
 Mixer_UI::use_own_window (bool and_fill_it)
 {
@@ -325,70 +324,29 @@ Mixer_UI::use_own_window (bool and_fill_it)
        return win;
 }
 
+void
 Mixer_UI::show_window ()
 {
-       if (_parent_window) {
-               _parent_window->present ();
-       }
-
-       if (!_visible) { /* was hidden, update status */
-
-               set_window_pos_and_size ();
-
-               /* show/hide group tabs as required */
-               parameter_changed ("show-group-tabs");
+       Tabbable::show_window ();
 
-               /* now reset each strips width so the right widgets are shown */
-               MixerStrip* ms;
+       /* show/hide group tabs as required */
+       parameter_changed ("show-group-tabs");
 
-               TreeModel::Children rows = track_model->children();
-               TreeModel::Children::iterator ri;
+       /* now reset each strips width so the right widgets are shown */
+       MixerStrip* ms;
 
-               for (ri = rows.begin(); ri != rows.end(); ++ri) {
-                       ms = (*ri)[track_columns.strip];
-                       ms->set_width_enum (ms->get_width_enum (), ms->width_owner());
-                       /* Fix visibility of mixer strip stuff */
-                       ms->parameter_changed (X_("mixer-element-visibility"));
-               }
-       }
+       TreeModel::Children rows = track_model->children();
+       TreeModel::Children::iterator ri;
 
-       if (!_parent_window) {
-               /* not in its own window, just switch main tabs to show mixer */
-               int pagenum = ARDOUR_UI::instance()->tabs().page_num (*this);
-               ARDOUR_UI::instance()->tabs().set_current_page (pagenum);
+       for (ri = rows.begin(); ri != rows.end(); ++ri) {
+               ms = (*ri)[track_columns.strip];
+               ms->set_width_enum (ms->get_width_enum (), ms->width_owner());
+               /* Fix visibility of mixer strip stuff */
+               ms->parameter_changed (X_("mixer-element-visibility"));
        }
 
        /* force focus into main area */
        scroller_base.grab_focus ();
-       _visible = true;
-}
-
-bool
-Mixer_UI::hide_window (GdkEventAny *ev)
-{
-       if (_parent_window) {
-               /* unpack Mixer_UI from parent, put it back in the main tabbed
-                * notebook
-                */
-
-               get_window_pos_and_size ();
-
-               get_parent()->remove (*this);
-               ARDOUR_UI::instance()->tabs().insert_page (*this, _("Mixer"), 1);
-               ARDOUR_UI::instance()->tabs().set_tab_detachable (*this);
-               ARDOUR_UI::instance()->tabs().set_current_page (0);
-
-               show_all ();
-
-               delete_when_idle (_parent_window);
-               _parent_window = 0;
-       }
-
-       ARDOUR_UI::instance()->tabs().set_current_page (0);
-
-       _visible = false;
-
-       return true;
 }
 
 void
@@ -1001,31 +959,6 @@ Mixer_UI::fast_update_strips ()
        }
 }
 
-void
-Mixer_UI::show_window ()
-{
-       Tabbable::show_window ();
-
-       /* show/hide group tabs as required */
-       parameter_changed ("show-group-tabs");
-
-       /* now reset each strips width so the right widgets are shown */
-       MixerStrip* ms;
-
-       TreeModel::Children rows = track_model->children();
-       TreeModel::Children::iterator ri;
-
-       for (ri = rows.begin(); ri != rows.end(); ++ri) {
-               ms = (*ri)[track_columns.strip];
-               ms->set_width_enum (ms->get_width_enum (), ms->width_owner());
-               /* Fix visibility of mixer strip stuff */
-               ms->parameter_changed (X_("mixer-element-visibility"));
-       }
-
-       /* force focus into main area */
-       scroller_base.grab_focus ();
-}
-
 void
 Mixer_UI::set_all_strips_visibility (bool yn)
 {
@@ -1351,7 +1284,7 @@ Mixer_UI::strip_property_changed (const PropertyChange& what_changed, MixerStrip
                }
        }
 
-x      error << _("track display list item for renamed strip not found!") << endmsg;
+       error << _("track display list item for renamed strip not found!") << endmsg;
 }
 
 bool
@@ -1723,54 +1656,8 @@ int
 Mixer_UI::set_state (const XMLNode& node, int version)
 {
        const XMLProperty* prop;
-       XMLNode* geometry;
-
-       m_width = default_width;
-       m_height = default_height;
-       m_root_x = 1;
-       m_root_y = 1;
-
-       if ((geometry = find_named_node (node, "geometry")) != 0) {
 
-               /* if there's a geometry node, we have our own window */
-
-               create_own_window ();
-               Gtk::Notebook* notebook = (Gtk::Notebook*) _parent_window->get_child();
-               Gtk::Widget* parent = get_parent();
-               if (parent) {
-                       ((Gtk::Container*)parent)->remove (*this);
-               }
-               notebook->append_page (*this, _("Mixer"));
-
-               XMLProperty* prop;
-
-               if ((prop = geometry->property("x_size")) == 0) {
-                       prop = geometry->property ("x-size");
-               }
-               if (prop) {
-                       m_width = atoi(prop->value());
-               }
-               if ((prop = geometry->property("y_size")) == 0) {
-                       prop = geometry->property ("y-size");
-               }
-               if (prop) {
-                       m_height = atoi(prop->value());
-               }
-
-               if ((prop = geometry->property ("x_pos")) == 0) {
-                       prop = geometry->property ("x-pos");
-               }
-               if (prop) {
-                       m_root_x = atoi (prop->value());
-
-               }
-               if ((prop = geometry->property ("y_pos")) == 0) {
-                       prop = geometry->property ("y-pos");
-               }
-               if (prop) {
-                       m_root_y = atoi (prop->value());
-               }
-       }
+       Tabbable::set_state (node, version);
 
        if ((prop = node.property ("narrow-strips"))) {
                if (string_is_affirmative (prop->value())) {
index e5985f830c20ec180071b6c7b31d2be9862fac4d..916ef5aa21bea6255d05eaf4992686f0be8b0538 100644 (file)
@@ -43,7 +43,6 @@
 #include "ardour/plugin_manager.h"
 
 
-#include "gtkmm2ext/visibility_tracker.h"
 #include "gtkmm2ext/dndtreeview.h"
 #include "gtkmm2ext/treeutils.h"
 
@@ -75,7 +74,7 @@ protected:
        virtual bool row_drop_possible_vfunc (const Gtk::TreeModel::Path&, const Gtk::SelectionData&) const;
 };
 
-class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public MixerActor, public Gtkmm2ext::VisibilityTracker
+class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public MixerActor
 {
   public:
        static Mixer_UI* instance();
index 60e1ea2083cc2e851c3ea5240cf48b3964f57648..88d75a7c77d29848c3aebf03928c208fbd5fb596 100644 (file)
@@ -3206,10 +3206,10 @@ void RCOptionEditor::clear_au_blacklist () {
 void RCOptionEditor::edit_lxvst_path () {
        Glib::RefPtr<Gdk::Window> win = get_parent_window ();
        Gtkmm2ext::PathsDialog *pd = new Gtkmm2ext::PathsDialog (
-                       *this, _("Set Linux VST Search Path"),
-                       _rc_config->get_plugin_path_lxvst(),
-                       PluginManager::instance().get_default_lxvst_path()
-                       );
+               *current_toplevel(), _("Set Linux VST Search Path"),
+               _rc_config->get_plugin_path_lxvst(),
+               PluginManager::instance().get_default_lxvst_path()
+               );
        ResponseType r = (ResponseType) pd->run ();
        pd->hide();
        if (r == RESPONSE_ACCEPT) {
@@ -3220,10 +3220,10 @@ void RCOptionEditor::edit_lxvst_path () {
 
 void RCOptionEditor::edit_vst_path () {
        Gtkmm2ext::PathsDialog *pd = new Gtkmm2ext::PathsDialog (
-                       *this, _("Set Windows VST Search Path"),
-                       _rc_config->get_plugin_path_vst(),
-                       PluginManager::instance().get_default_windows_vst_path()
-                       );
+               *current_toplevel(), _("Set Windows VST Search Path"),
+               _rc_config->get_plugin_path_vst(),
+               PluginManager::instance().get_default_windows_vst_path()
+               );
        ResponseType r = (ResponseType) pd->run ();
        pd->hide();
        if (r == RESPONSE_ACCEPT) {
index f56512e52697039d0e8e2a2eaa40cfb68d461c67..dffd340e29eeabce55ad25109d8a4026b4a1479e 100644 (file)
@@ -25,7 +25,7 @@
 #include "pbd/strsplit.h"
 #include "pbd/file_utils.h"
 
-#include "gtkmm2ext/actions.h"
+#include "gtkmm2ext/bindings.h"
 #include "gtkmm2ext/gtk_ui.h"
 #include "gtkmm2ext/gui_thread.h"
 #include "gtkmm2ext/utils.h"
@@ -357,12 +357,14 @@ FPGUI::build_available_action_menu ()
        vector<string> labels;
        vector<string> tooltips;
        vector<string> keys;
-       vector<AccelKey> bindings;
+       vector<Glib::RefPtr<Gtk::Action> > actions;
+
+       Gtkmm2ext::ActionMap::get_all_actions (paths, labels, tooltips, keys, actions);
+
        typedef std::map<string,TreeIter> NodeMap;
        NodeMap nodes;
        NodeMap::iterator r;
 
-       ActionManager::get_all_actions (labels, paths, tooltips, keys, bindings);
 
        vector<string>::iterator k;
        vector<string>::iterator p;