summaryrefslogtreecommitdiffstats
path: root/src/progs/gtk/PatchController.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-15 08:22:48 +0000
committerDavid Robillard <d@drobilla.net>2006-06-15 08:22:48 +0000
commit55c6e4c46d388189e35329a6519b9afa86f029fa (patch)
treea65e43a34a7dce7aa2c599ce39e7388e14c193cc /src/progs/gtk/PatchController.cpp
parent94c0fff479da5e81dede855cf5c382cf23aadf7d (diff)
downloadingen-55c6e4c46d388189e35329a6519b9afa86f029fa.tar.gz
ingen-55c6e4c46d388189e35329a6519b9afa86f029fa.tar.bz2
ingen-55c6e4c46d388189e35329a6519b9afa86f029fa.zip
Switched patch "description" window into a properties window (hopefully to extend
in the future) git-svn-id: http://svn.drobilla.net/lad/grauph@40 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/gtk/PatchController.cpp')
-rw-r--r--src/progs/gtk/PatchController.cpp34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/progs/gtk/PatchController.cpp b/src/progs/gtk/PatchController.cpp
index 8246efa6..20dcc096 100644
--- a/src/progs/gtk/PatchController.cpp
+++ b/src/progs/gtk/PatchController.cpp
@@ -40,6 +40,7 @@
#include "PortController.h"
#include "App.h"
#include "PatchTreeWindow.h"
+#include "PatchPropertiesWindow.h"
#include "DSSIController.h"
#include "PatchModel.h"
#include "Store.h"
@@ -53,6 +54,7 @@ namespace OmGtk {
PatchController::PatchController(CountedPtr<PatchModel> model)
: NodeController(model),
+ m_properties_window(NULL),
m_window(NULL),
m_patch_view(NULL),
m_patch_model(model),
@@ -349,6 +351,20 @@ PatchController::create_view()
}
+void
+PatchController::show_properties_window()
+{
+ if (!m_properties_window) {
+ Glib::RefPtr<Gnome::Glade::Xml> glade_xml = GladeFactory::new_glade_reference();
+ glade_xml->get_widget_derived("patch_properties_win", m_properties_window);
+ m_properties_window->patch_model(patch_model());
+ }
+
+ m_properties_window->show();
+
+}
+
+
/** Create a connection in the view (canvas).
*/
void
@@ -387,11 +403,14 @@ PatchController::create_connection(CountedPtr<ConnectionModel> cm)
}
+/** Add a child node to this patch.
+ *
+ * This is for plugin nodes and patches, and is responsible for creating the
+ * GtkObjectController for @a object (and through that the View if necessary)
+ */
void
PatchController::add_node(CountedPtr<NodeModel> object)
{
- cerr << "ADD NODE\n";
-
assert(object);
assert(object->parent() == m_patch_model);
assert(object->path().parent() == m_patch_model->path());
@@ -405,19 +424,15 @@ PatchController::add_node(CountedPtr<NodeModel> object)
CountedPtr<NodeModel> node(object);
if (node) {
- cerr << "\tNode Child\n";
assert(node->parent() == m_patch_model);
NodeController* nc = NULL;
CountedPtr<PatchModel> patch(node);
if (patch) {
- cerr << "\t.. is a Patch Child\n";
assert(patch->parent() == m_patch_model);
-
nc = new PatchController(patch);
} else {
- cerr << "\t... is a Plugin Node Child\n";
assert(node->plugin());
if (node->plugin()->type() == PluginModel::DSSI)
nc = new DSSIController(node);
@@ -465,13 +480,6 @@ PatchController::add_node(CountedPtr<NodeModel> object)
}
}
-
-
- /*CountedPtr<PortModel> port(object);
- if (port) {
- cerr << "\tPort Child??\n";
- //assert(port->parent() == m_patch_model);
- }*/
}