summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/ardour_ui.cc23
-rw-r--r--gtk2_ardour/ardour_ui.h1
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc7
-rw-r--r--gtk2_ardour/rc_option_editor.cc21
-rw-r--r--gtk2_ardour/rc_option_editor.h1
-rw-r--r--gtk2_ardour/window_manager.cc4
6 files changed, 52 insertions, 5 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 2c27c8db7c..96df17a5f9 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -3574,6 +3574,11 @@ ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name,
new_session->add_instant_xml (*n, false);
}
+ n = Config->instant_xml (X_("Preferences"));
+ if (n) {
+ new_session->add_instant_xml (*n, false);
+ }
+
/* Put the playhead at 0 and scroll fully left */
n = new_session->instant_xml (X_("Editor"));
if (n) {
@@ -4545,6 +4550,24 @@ ARDOUR_UI::export_video (bool range)
}
XMLNode*
+ARDOUR_UI::preferences_settings () const
+{
+ XMLNode* node = 0;
+
+ if (_session) {
+ node = _session->instant_xml(X_("Preferences"));
+ } else {
+ node = Config->instant_xml(X_("Preferences"));
+ }
+
+ if (!node) {
+ node = new XMLNode (X_("Preferences"));
+ }
+
+ return node;
+}
+
+XMLNode*
ARDOUR_UI::mixer_settings () const
{
XMLNode* node = 0;
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index de2528d865..59a3c963e5 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -232,6 +232,7 @@ public:
XMLNode* main_window_settings() const;
XMLNode* editor_settings() const;
+ XMLNode* preferences_settings() const;
XMLNode* mixer_settings () const;
XMLNode* keyboard_settings () const;
XMLNode* tearoff_settings (const char*) const;
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 5c9fbd04aa..5882e45afb 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -733,6 +733,7 @@ ARDOUR_UI::save_ardour_state ()
XMLNode& enode (editor->get_state());
XMLNode& mnode (mixer->get_state());
XMLNode& bnode (meterbridge->get_state());
+ XMLNode& pnode (rc_option_editor->get_state());
Config->add_extra_xml (*window_node);
Config->add_extra_xml (audio_midi_setup->get_state());
@@ -745,6 +746,7 @@ ARDOUR_UI::save_ardour_state ()
_session->add_instant_xml (main_window_node);
_session->add_instant_xml (enode);
_session->add_instant_xml (mnode);
+ _session->add_instant_xml (pnode);
_session->add_instant_xml (bnode);
if (location_ui) {
_session->add_instant_xml (location_ui->ui().get_state ());
@@ -753,12 +755,17 @@ ARDOUR_UI::save_ardour_state ()
Config->add_instant_xml (main_window_node);
Config->add_instant_xml (enode);
Config->add_instant_xml (mnode);
+ Config->add_instant_xml (pnode);
Config->add_instant_xml (bnode);
if (location_ui) {
Config->add_instant_xml (location_ui->ui().get_state ());
}
}
+
delete &enode;
+ delete &mnode;
+ delete &bnode;
+ delete &pnode;
Keyboard::save_keybindings ();
}
diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc
index 8af06568d7..8b4c795cbb 100644
--- a/gtk2_ardour/rc_option_editor.cc
+++ b/gtk2_ardour/rc_option_editor.cc
@@ -1362,7 +1362,7 @@ public:
edit_box->set_spacing(3);
_box->pack_start (*edit_box, false, false);
edit_box->show ();
-
+
Label* label = manage (new Label);
label->set_text (_("Click to edit the settings for selected protocol ( it must be ENABLED first ):"));
edit_box->pack_start (*label, false, false);
@@ -1432,7 +1432,7 @@ private:
else
edit_button->set_sensitive (false);
}
-
+
void view_changed (TreeModel::Path const &, TreeModel::iterator const & i)
{
TreeModel::Row r = *i;
@@ -1854,6 +1854,13 @@ RCOptionEditor::RCOptionEditor ()
, _rc_config (Config)
, _mixer_strip_visibility ("mixer-element-visibility")
{
+ XMLNode* node = ARDOUR_UI::instance()->preferences_settings();
+ if (node) {
+ /* gcc4 complains about ambiguity with Gtk::Widget::set_state
+ (Gtk::StateType) here !!!
+ */
+ Tabbable::set_state (*node, Stateful::loading_state_version);
+ }
UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &RCOptionEditor::parameter_changed));
@@ -2337,7 +2344,7 @@ if (!Profile->get_mixbus()) {
rsas->add(ExistingNewlyCreatedBoth, _("existing selection and newly-created regions"));
add_option (_("Editor"), rsas);
-
+
add_option (_("Editor/Waveforms"), new OptionEditorHeading (_("Waveforms")));
if (!Profile->get_mixbus()) {
@@ -3482,3 +3489,11 @@ RCOptionEditor::use_own_window (bool and_fill_it)
return win;
}
+
+XMLNode&
+RCOptionEditor::get_state ()
+{
+ XMLNode* node = new XMLNode (X_("Preferences"));
+ node->add_child_nocopy (Tabbable::get_state());
+ return *node;
+}
diff --git a/gtk2_ardour/rc_option_editor.h b/gtk2_ardour/rc_option_editor.h
index ebacbb7075..d6c5bed4a7 100644
--- a/gtk2_ardour/rc_option_editor.h
+++ b/gtk2_ardour/rc_option_editor.h
@@ -42,6 +42,7 @@ public:
void populate_sync_options ();
Gtk::Window* use_own_window (bool and_fill_it);
+ XMLNode& get_state ();
private:
void parameter_changed (std::string const &);
diff --git a/gtk2_ardour/window_manager.cc b/gtk2_ardour/window_manager.cc
index 73260b1f56..c9c8d78b6a 100644
--- a/gtk2_ardour/window_manager.cc
+++ b/gtk2_ardour/window_manager.cc
@@ -68,7 +68,7 @@ Manager::register_window (ProxyBase* info)
if (!window_actions) {
window_actions = ARDOUR_UI::instance()->global_actions.create_action_group (X_("Window"));
}
-
+
info->set_action (ARDOUR_UI::instance()->global_actions.register_toggle_action (window_actions,
info->action_name().c_str(), info->menu_name().c_str(),
sigc::bind (sigc::mem_fun (*this, &Manager::toggle_window), info)));
@@ -159,7 +159,7 @@ Manager::show_visible() const
* ::signal_response(). This means we need to
* destroy the window as well, so that the code
* which checks if it should be created will
- * find that it is missing and will create it
+ * find that it is missing and will create it
* and connect to any necessary signals.
*/
(*i)->drop_window ();