diff options
author | David Robillard <d@drobilla.net> | 2008-10-05 23:14:48 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-10-05 23:14:48 +0000 |
commit | 6b0d22268b85f7033eb7ddcfe9e50e21b86eec34 (patch) | |
tree | f339432b60ee666d47a3bddd59c63b8c3b27a69b /gtk2_ardour | |
parent | 14a40f32f696c0d2b4a51fe762c5038a52079706 (diff) |
Normalize XML property name style, preserving old session loading (on load _ will be converted to -).
Still to go: Non-consistent PBD tag names, colours.
git-svn-id: svn://localhost/ardour2/branches/3.0@3872 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/audio_time_axis.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/automation_time_axis.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor.cc | 30 | ||||
-rw-r--r-- | gtk2_ardour/midi_time_axis.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 10 | ||||
-rw-r--r-- | gtk2_ardour/mixer_ui.cc | 16 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 6 |
8 files changed, 40 insertions, 40 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 13b38b1ed4..bf1a5bb5b4 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -463,16 +463,16 @@ ARDOUR_UI::set_transport_controllable_state (const XMLNode& node) if ((prop = node.property ("stop")) != 0) { stop_controllable->set_id (prop->value()); } - if ((prop = node.property ("goto_start")) != 0) { + if ((prop = node.property ("goto-start")) != 0) { goto_start_controllable->set_id (prop->value()); } - if ((prop = node.property ("goto_end")) != 0) { + if ((prop = node.property ("goto-end")) != 0) { goto_end_controllable->set_id (prop->value()); } - if ((prop = node.property ("auto_loop")) != 0) { + if ((prop = node.property ("auto-loop")) != 0) { auto_loop_controllable->set_id (prop->value()); } - if ((prop = node.property ("play_selection")) != 0) { + if ((prop = node.property ("play-selection")) != 0) { play_selection_controllable->set_id (prop->value()); } if ((prop = node.property ("rec")) != 0) { diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 20a5be2dcf..0e1bf20204 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -148,7 +148,7 @@ guint32 AudioTimeAxisView::show_at (double y, int& nth, Gtk::VBox *parent) { ensure_xml_node (); - xml_node->add_property ("shown_editor", "yes"); + xml_node->add_property ("shown-editor", "yes"); return TimeAxisView::show_at (y, nth, parent); } @@ -157,7 +157,7 @@ void AudioTimeAxisView::hide () { ensure_xml_node (); - xml_node->add_property ("shown_editor", "no"); + xml_node->add_property ("shown-editor", "no"); TimeAxisView::hide (); } diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index acb0921b7f..f2144131ad 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -885,7 +885,7 @@ AutomationTimeAxisView::set_state (const XMLNode& node) XMLProperty* type = (*iter)->property("automation-id"); if (type && type->value() == ARDOUR::EventTypeMap::instance().to_symbol(_control->parameter())) { - XMLProperty *shown = (*iter)->property("shown_editor"); + XMLProperty *shown = (*iter)->property("shown-editor"); if (shown && shown->value() == "yes") { set_marked_for_display(true); diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 38b13b8aab..a04df8d1ad 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -2434,12 +2434,12 @@ Editor::set_state (const XMLNode& node) } else { - g.base_width = atoi(geometry->property("x_size")->value()); - g.base_height = atoi(geometry->property("y_size")->value()); - x = atoi(geometry->property("x_pos")->value()); - y = atoi(geometry->property("y_pos")->value()); - xoff = atoi(geometry->property("x_off")->value()); - yoff = atoi(geometry->property("y_off")->value()); + g.base_width = atoi(geometry->property("x-size")->value()); + g.base_height = atoi(geometry->property("y-size")->value()); + x = atoi(geometry->property("x-pos")->value()); + y = atoi(geometry->property("y-pos")->value()); + xoff = atoi(geometry->property("x-off")->value()); + yoff = atoi(geometry->property("y-off")->value()); } set_default_size (g.base_width, g.base_height); @@ -2607,17 +2607,17 @@ Editor::get_state () XMLNode* geometry = new XMLNode ("geometry"); snprintf(buf, sizeof(buf), "%d", width); - geometry->add_property("x_size", string(buf)); + geometry->add_property("x-size", string(buf)); snprintf(buf, sizeof(buf), "%d", height); - geometry->add_property("y_size", string(buf)); + geometry->add_property("y-size", string(buf)); snprintf(buf, sizeof(buf), "%d", x); - geometry->add_property("x_pos", string(buf)); + geometry->add_property("x-pos", string(buf)); snprintf(buf, sizeof(buf), "%d", y); - geometry->add_property("y_pos", string(buf)); + geometry->add_property("y-pos", string(buf)); snprintf(buf, sizeof(buf), "%d", xoff); - geometry->add_property("x_off", string(buf)); + geometry->add_property("x-off", string(buf)); snprintf(buf, sizeof(buf), "%d", yoff); - geometry->add_property("y_off", string(buf)); + geometry->add_property("y-off", string(buf)); snprintf(buf,sizeof(buf), "%d",gtk_paned_get_position (static_cast<Paned*>(&edit_pane)->gobj())); geometry->add_property("edit_pane_pos", string(buf)); @@ -3920,8 +3920,8 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which) width = default_width; height = default_height; } else { - width = atoi(geometry->property("x_size")->value()); - height = atoi(geometry->property("y_size")->value()); + width = atoi(geometry->property("x-size")->value()); + height = atoi(geometry->property("y-size")->value()); } if (which == static_cast<Paned*> (&edit_pane)) { @@ -3930,7 +3930,7 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which) return; } - if (!geometry || (prop = geometry->property ("edit_pane_pos")) == 0) { + if (!geometry || (prop = geometry->property ("edit-pane-pos")) == 0) { /* initial allocation is 90% to canvas, 10% to notebook */ pos = (int) floor (alloc.get_width() * 0.90f); snprintf (buf, sizeof(buf), "%d", pos); diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index ef66779f47..9453a05611 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -175,7 +175,7 @@ guint32 MidiTimeAxisView::show_at (double y, int& nth, Gtk::VBox *parent) { ensure_xml_node (); - xml_node->add_property ("shown_editor", "yes"); + xml_node->add_property ("shown-editor", "yes"); guint32 ret = TimeAxisView::show_at (y, nth, parent); return ret; @@ -185,7 +185,7 @@ void MidiTimeAxisView::hide () { ensure_xml_node (); - xml_node->add_property ("shown_editor", "no"); + xml_node->add_property ("shown-editor", "no"); TimeAxisView::hide (); } diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index f98469eb7b..373babf417 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -424,11 +424,11 @@ MixerStrip::set_stuff_from_route () /* if width is not set, it will be set by the MixerUI or editor */ - if ((prop = xml_node->property ("strip_width")) != 0) { + if ((prop = xml_node->property ("strip-width")) != 0) { set_width (Width (string_2_enum (prop->value(), _width)), this); } - if ((prop = xml_node->property ("shown_mixer")) != 0) { + if ((prop = xml_node->property ("shown-mixer")) != 0) { if (prop->value() == "no") { _marked_for_display = false; } else { @@ -459,7 +459,7 @@ MixerStrip::set_width (Width w, void* owner) _width = w; if (_width_owner == this) { - xml_node->add_property ("strip_width", enum_2_string (_width)); + xml_node->add_property ("strip-width", enum_2_string (_width)); } switch (w) { @@ -526,9 +526,9 @@ MixerStrip::set_packed (bool yn) ensure_xml_node (); if (_packed) { - xml_node->add_property ("shown_mixer", "yes"); + xml_node->add_property ("shown-mixer", "yes"); } else { - xml_node->add_property ("shown_mixer", "no"); + xml_node->add_property ("shown-mixer", "no"); } } diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 64e8ea0909..2b4eb09e16 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -1267,10 +1267,10 @@ Mixer_UI::set_state (const XMLNode& node) } else { - m_width = atoi(geometry->property("x_size")->value().c_str()); - m_height = atoi(geometry->property("y_size")->value().c_str()); - m_root_x = atoi(geometry->property("x_pos")->value().c_str()); - m_root_y = atoi(geometry->property("y_pos")->value().c_str()); + m_width = atoi(geometry->property("x-size")->value().c_str()); + m_height = atoi(geometry->property("y-size")->value().c_str()); + m_root_x = atoi(geometry->property("x-pos")->value().c_str()); + m_root_y = atoi(geometry->property("y-pos")->value().c_str()); } set_window_pos_and_size (); @@ -1350,8 +1350,8 @@ Mixer_UI::pane_allocation_handler (Allocation& alloc, Gtk::Paned* which) width = default_width; height = default_height; } else { - width = atoi(geometry->property("x_size")->value()); - height = atoi(geometry->property("y_size")->value()); + width = atoi(geometry->property("x-size")->value()); + height = atoi(geometry->property("y-size")->value()); } if (which == static_cast<Gtk::Paned*> (&rhs_pane1)) { @@ -1360,7 +1360,7 @@ Mixer_UI::pane_allocation_handler (Allocation& alloc, Gtk::Paned* which) return; } - if (!geometry || (prop = geometry->property("mixer_rhs_pane1_pos")) == 0) { + if (!geometry || (prop = geometry->property("mixer-rhs-pane1-pos")) == 0) { pos = height / 3; snprintf (buf, sizeof(buf), "%d", pos); } else { @@ -1377,7 +1377,7 @@ Mixer_UI::pane_allocation_handler (Allocation& alloc, Gtk::Paned* which) return; } - if (!geometry || (prop = geometry->property("mixer_list_hpane_pos")) == 0) { + if (!geometry || (prop = geometry->property("mixer-list-hpane-pos")) == 0) { pos = 75; snprintf (buf, sizeof(buf), "%d", pos); } else { diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 9db77c1649..f36a6b71c0 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -982,7 +982,7 @@ TimeAxisView::get_state () snprintf (buf, sizeof(buf), "%u", height); node->add_property ("height", buf); - node->add_property ("marked_for_display", (_marked_for_display ? "1" : "0")); + node->add_property ("marked-for-display", (_marked_for_display ? "1" : "0")); return *node; } @@ -991,11 +991,11 @@ TimeAxisView::set_state (const XMLNode& node) { const XMLProperty *prop; - if ((prop = node.property ("marked_for_display")) != 0) { + if ((prop = node.property ("marked-for-display")) != 0) { _marked_for_display = (prop->value() == "1"); } - if ((prop = node.property ("track_height")) != 0) { + if ((prop = node.property ("track-height")) != 0) { if (prop->value() == "largest") { set_height (hLargest); |