diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-10-15 18:56:11 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-10-15 18:56:11 +0000 |
commit | 8713667ec1a6cc9ba56c07f763e5a422cc47fbef (patch) | |
tree | 56727634d8a1567679a7ba76cff93bf06e7c271f /gtk2_ardour | |
parent | 79f91c7a205d981d2b8cc15e32a6da02d8423065 (diff) |
rework Stateful::set_state() patch to avoid default version argument
git-svn-id: svn://localhost/ardour2/branches/3.0@5787 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/audio_time_axis.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/automation_line.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/automation_line.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/automation_time_axis.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/automation_time_axis.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/editor.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/keyboard.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/keyboard.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/midi_time_axis.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/session_metadata_dialog.cc | 5 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/ui_config.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/ui_config.h | 2 |
16 files changed, 24 insertions, 21 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 7f239f4e67..281bedafe1 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -100,7 +100,7 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh ensure_xml_node (); - set_state (*xml_node); + set_state (*xml_node, Stateful::loading_state_version); /* if set_state above didn't create a gain automation child, we need to make one */ if (automation_track (GainAutomation) == 0) { diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index 73727ca987..3e89826cad 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -1264,7 +1264,7 @@ int AutomationLine::set_state (const XMLNode &node, int version) { /* function as a proxy for the model */ - return alist->set_state (node); + return alist->set_state (node, version); } void diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h index 817f66c1d2..c8c265c307 100644 --- a/gtk2_ardour/automation_line.h +++ b/gtk2_ardour/automation_line.h @@ -125,7 +125,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin bool is_first_point (ControlPoint &); XMLNode& get_state (void); - int set_state (const XMLNode&, int version = 3000); + int set_state (const XMLNode&, int version); void set_colors(); void modify_point_y (ControlPoint&, double); diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 1fffe564fb..e18ab441bc 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -194,7 +194,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro _control->parameter()); if (xml_node) { - set_state (*xml_node); + set_state (*xml_node, Stateful::loading_state_version); } /* ask for notifications of any new RegionViews */ @@ -867,7 +867,7 @@ AutomationTimeAxisView::color_handler () int AutomationTimeAxisView::set_state (const XMLNode& node, int version) { - TimeAxisView::set_state (node); + TimeAxisView::set_state (node, version); XMLProperty const * type = node.property ("automation-id"); if (type && type->value () == ARDOUR::EventTypeMap::instance().to_symbol (_control->parameter())) { diff --git a/gtk2_ardour/automation_time_axis.h b/gtk2_ardour/automation_time_axis.h index f6239314ab..f4d71f93c2 100644 --- a/gtk2_ardour/automation_time_axis.h +++ b/gtk2_ardour/automation_time_axis.h @@ -90,7 +90,7 @@ class AutomationTimeAxisView : public TimeAxisView { bool paste (nframes_t, float times, Selection&, size_t nth); void reset_objects (PointSelection&); - int set_state (const XMLNode&, int version = 3000); + int set_state (const XMLNode&, int version); guint32 show_at (double y, int& nth, Gtk::VBox *parent); void hide (); diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index fec836210c..daeb5aa23f 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -614,7 +614,7 @@ Editor::Editor () set_edit_point_preference (EditAtMouse, true); XMLNode* node = ARDOUR_UI::instance()->editor_settings(); - set_state (*node); + set_state (*node, Stateful::loading_state_version); _playlist_selector = new PlaylistSelector(); _playlist_selector->signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), static_cast<Window *> (_playlist_selector))); @@ -1061,7 +1061,7 @@ Editor::connect_to_session (Session *t) sensitize_the_right_region_actions (false); XMLNode* node = ARDOUR_UI::instance()->editor_settings(); - set_state (*node); + set_state (*node, Stateful::loading_state_version); /* catch up with the playhead */ @@ -4245,7 +4245,7 @@ Editor::use_visual_state (VisualState& vs) /* check if the track still exists - it could have been deleted */ if ((t = find (track_views.begin(), track_views.end(), i->first)) != track_views.end()) { - (*t)->set_state (*(i->second)); + (*t)->set_state (*(i->second), Stateful::loading_state_version); } } diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index f2779d353c..34d402c049 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -180,7 +180,7 @@ class Editor : public PublicEditor void redo (uint32_t n = 1); XMLNode& get_state (); - int set_state (const XMLNode&, int version = 3000); + int set_state (const XMLNode&, int version); void set_mouse_mode (Editing::MouseMode, bool force=true); void step_mouse_mode (bool next); diff --git a/gtk2_ardour/keyboard.cc b/gtk2_ardour/keyboard.cc index 9333f15b51..635ac8137c 100644 --- a/gtk2_ardour/keyboard.cc +++ b/gtk2_ardour/keyboard.cc @@ -129,7 +129,7 @@ Keyboard::Keyboard () snooper_id = gtk_key_snooper_install (_snooper, (gpointer) this); XMLNode* node = ARDOUR_UI::instance()->keyboard_settings(); - set_state (*node); + set_state (*node, Stateful::loading_state_version); } Keyboard::~Keyboard () diff --git a/gtk2_ardour/keyboard.h b/gtk2_ardour/keyboard.h index 9f354f38e3..e34c424329 100644 --- a/gtk2_ardour/keyboard.h +++ b/gtk2_ardour/keyboard.h @@ -40,7 +40,7 @@ class Keyboard : public sigc::trackable, PBD::Stateful ~Keyboard (); XMLNode& get_state (void); - int set_state (const XMLNode&, int version = 3000); + int set_state (const XMLNode&, int version); typedef std::vector<uint32_t> State; typedef uint32_t ModifierMask; diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 8460b6ab37..6aaf33854c 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -136,7 +136,7 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess, ensure_xml_node (); - set_state (*xml_node); + set_state (*xml_node, Stateful::loading_state_version); _route->processors_changed.connect (mem_fun(*this, &MidiTimeAxisView::processors_changed)); diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 52eceb2058..e21e1f734a 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -385,7 +385,7 @@ RouteTimeAxisView::automation_click () int RouteTimeAxisView::set_state (const XMLNode& node, int version) { - TimeAxisView::set_state (node); + TimeAxisView::set_state (node, version); XMLNodeList kids = node.children(); XMLNodeConstIterator iter; diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h index 7ca88aefd4..19715fe99d 100644 --- a/gtk2_ardour/route_time_axis.h +++ b/gtk2_ardour/route_time_axis.h @@ -114,7 +114,7 @@ public: void remove_underlay (StreamView*); void build_underlay_menu(Gtk::Menu*); - int set_state (const XMLNode&, int version = 3000); + int set_state (const XMLNode&, int version); /* This is a bit nasty to expose :/ */ struct RouteAutomationNode { diff --git a/gtk2_ardour/session_metadata_dialog.cc b/gtk2_ardour/session_metadata_dialog.cc index be2e6fe012..62ea31918c 100644 --- a/gtk2_ardour/session_metadata_dialog.cc +++ b/gtk2_ardour/session_metadata_dialog.cc @@ -709,6 +709,9 @@ SessionMetadataImporter::run () return; } + /* XXX GET VERSION FROM TREE */ + int version = 3000; + XMLNode * node = session_tree.root()->child ("Metadata"); if (!node) { @@ -717,7 +720,7 @@ SessionMetadataImporter::run () } ARDOUR::SessionMetadata data; - data.set_state (*node); + data.set_state (*node, version); init_data (); load_extra_data (data); diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h index 1597e32a55..e8860cb907 100644 --- a/gtk2_ardour/time_axis_view.h +++ b/gtk2_ardour/time_axis_view.h @@ -93,7 +93,7 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful virtual ~TimeAxisView (); XMLNode& get_state (); - int set_state (const XMLNode&, int version = 3000); + int set_state (const XMLNode&, int version); /** @return index of this TimeAxisView within its parent */ int order () const { return _order; } diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc index 1f1f25f239..d0878073b7 100644 --- a/gtk2_ardour/ui_config.cc +++ b/gtk2_ardour/ui_config.cc @@ -86,7 +86,7 @@ UIConfiguration::load_defaults () return -1; } - if (set_state (*tree.root())) { + if (set_state (*tree.root(), Stateful::loading_state_version)) { error << string_compose(_("Ardour: default ui configuration file \"%1\" not loaded successfully."), rcfile) << endmsg; return -1; } @@ -116,7 +116,7 @@ UIConfiguration::load_state () return -1; } - if (set_state (*tree.root())) { + if (set_state (*tree.root(), Stateful::loading_state_version)) { error << string_compose(_("Ardour: default ui configuration file \"%1\" not loaded successfully."), rcfile) << endmsg; return -1; } @@ -139,7 +139,7 @@ UIConfiguration::load_state () return -1; } - if (set_state (*tree.root())) { + if (set_state (*tree.root(), Stateful::loading_state_version)) { error << string_compose(_("Ardour: user ui configuration file \"%1\" not loaded successfully."), rcfile) << endmsg; return -1; } diff --git a/gtk2_ardour/ui_config.h b/gtk2_ardour/ui_config.h index 857df3f7e3..09e8448831 100644 --- a/gtk2_ardour/ui_config.h +++ b/gtk2_ardour/ui_config.h @@ -80,7 +80,7 @@ class UIConfiguration : public PBD::Stateful int save_state (); int load_defaults (); - int set_state (const XMLNode&, int version = 3000); + int set_state (const XMLNode&, int version); XMLNode& get_state (void); XMLNode& get_variables (std::string); void set_variables (const XMLNode&); |