summaryrefslogtreecommitdiff
path: root/libs/ardour/rc_configuration.cc
diff options
context:
space:
mode:
authorBen Loftis <ben@glw.com>2012-04-18 17:46:29 +0000
committerBen Loftis <ben@glw.com>2012-04-18 17:46:29 +0000
commit45ac9c8861be4b4290fdf64f2bea8e300ab13e8f (patch)
treeedfef34a7500d6e8be05cc677b333f57f4f21be3 /libs/ardour/rc_configuration.cc
parentc7c9c1bd2622b86ca4494098c80463fe15afeca4 (diff)
add User metadata. user metadata is edited from the same dialog and read/writable using the same mechanism as session metadata, but it is stored in the ardour.rc file instead of with the session. Importing metadata from another session does not change user metadata. SessionMetadata is now a singleton that is available to the session object and the various config objects.
git-svn-id: svn://localhost/ardour2/branches/3.0@12014 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/rc_configuration.cc')
-rw-r--r--libs/ardour/rc_configuration.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/ardour/rc_configuration.cc b/libs/ardour/rc_configuration.cc
index 8c4650b2e6..d5bfc7a9a8 100644
--- a/libs/ardour/rc_configuration.cc
+++ b/libs/ardour/rc_configuration.cc
@@ -36,6 +36,7 @@
#include "ardour/audio_diskstream.h"
#include "ardour/control_protocol_manager.h"
#include "ardour/filesystem_paths.h"
+#include "ardour/session_metadata.h"
#include "i18n.h"
@@ -208,6 +209,8 @@ RCConfiguration::get_state ()
root->add_child_nocopy (get_variables ());
+ root->add_child_nocopy (SessionMetadata::Metadata()->get_user_state());
+
if (_extra_xml) {
root->add_child_copy (*_extra_xml);
}
@@ -239,7 +242,7 @@ RCConfiguration::get_variables ()
}
int
-RCConfiguration::set_state (const XMLNode& root, int /*version*/)
+RCConfiguration::set_state (const XMLNode& root, int version)
{
if (root.name() != "Ardour") {
return -1;
@@ -263,6 +266,8 @@ RCConfiguration::set_state (const XMLNode& root, int /*version*/)
if (node->name() == "Config") {
set_variables (*node);
+ } else if (node->name() == "Metadata") {
+ SessionMetadata::Metadata()->set_state (*node, version);
} else if (node->name() == ControlProtocolManager::state_node_name) {
_control_protocol_state = new XMLNode (*node);
} else if (node->name() == MIDI::Port::state_node_name) {