summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-09-07 15:07:14 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-09-07 15:07:14 +0000
commitf2c8ae66c09d2caffa44743eef0a0ab873024d9a (patch)
tree8118a863600071cc545b4a127e7bb13d3e2c75fe /gtk2_ardour/editor.cc
parentbabf75d871ee253fbe32c50737aa110a4fffa36f (diff)
remove all duplicated _id members from children of PBD::Stateful.
Sources now know about Session. rearrange session directory heirarchy. remove tape_dir stuff. NSD allows absolute/relative paths to be typed straight into the text entry. Session history reloaded after all 3rd party registrations done. Editor restores its ID; other objects still need this. use g_mkdir_with_parents() instead of mkdir() one example of using g_file_test() instead of access. git-svn-id: svn://localhost/ardour2/trunk@908 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r--gtk2_ardour/editor.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 1b2d61a136..b9d14d4475 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -1327,6 +1327,7 @@ Editor::connect_to_session (Session *t)
}
/* register for undo history */
+
session->register_with_memento_command_factory(_id, this);
}
@@ -2109,6 +2110,9 @@ Editor::set_state (const XMLNode& node)
int x, y, xoff, yoff;
Gdk::Geometry g;
+ if ((prop = node.property ("id")) != 0) {
+ _id = prop->value ();
+ }
if ((geometry = find_named_node (node, "geometry")) == 0) {
@@ -2240,6 +2244,9 @@ Editor::get_state ()
XMLNode* node = new XMLNode ("Editor");
char buf[32];
+ _id.print (buf);
+ node->add_property ("id", buf);
+
if (is_realized()) {
Glib::RefPtr<Gdk::Window> win = get_window();
@@ -2249,7 +2256,7 @@ Editor::get_state ()
win->get_size(width, height);
XMLNode* geometry = new XMLNode ("geometry");
- char buf[32];
+
snprintf(buf, sizeof(buf), "%d", width);
geometry->add_property("x_size", string(buf));
snprintf(buf, sizeof(buf), "%d", height);