diff options
author | David Robillard <d@drobilla.net> | 2006-10-15 03:29:39 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-10-15 03:29:39 +0000 |
commit | 4de1556353332eeb98a50bf46a51771702231bd4 (patch) | |
tree | 224be7830f3fdd91a69eecd638722e8f9b90ac44 /src/progs | |
parent | 3bb20af7d115cabc13cb7d7a9a58fdad465d76a6 (diff) | |
download | ingen-4de1556353332eeb98a50bf46a51771702231bd4.tar.gz ingen-4de1556353332eeb98a50bf46a51771702231bd4.tar.bz2 ingen-4de1556353332eeb98a50bf46a51771702231bd4.zip |
Fixed patch ports and some bugs.
git-svn-id: http://svn.drobilla.net/lad/ingen@172 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs')
-rw-r--r-- | src/progs/ingenuity/NodeControlWindow.cpp | 3 | ||||
-rw-r--r-- | src/progs/ingenuity/PatchPortModule.cpp | 14 | ||||
-rw-r--r-- | src/progs/ingenuity/PatchPortModule.h | 4 | ||||
-rw-r--r-- | src/progs/ingenuity/ingenuity.glade | 2 |
4 files changed, 11 insertions, 12 deletions
diff --git a/src/progs/ingenuity/NodeControlWindow.cpp b/src/progs/ingenuity/NodeControlWindow.cpp index bd93e749..78574196 100644 --- a/src/progs/ingenuity/NodeControlWindow.cpp +++ b/src/progs/ingenuity/NodeControlWindow.cpp @@ -50,9 +50,6 @@ NodeControlWindow::NodeControlWindow(SharedPtr<NodeModel> node, size_t poly) show_all_children(); resize(); - // FIXME: not working - //set_icon_from_file(string(PKGDATADIR) + "/om-icon.png"); - m_callback_enabled = true; } diff --git a/src/progs/ingenuity/PatchPortModule.cpp b/src/progs/ingenuity/PatchPortModule.cpp index 6da63805..315aacab 100644 --- a/src/progs/ingenuity/PatchPortModule.cpp +++ b/src/progs/ingenuity/PatchPortModule.cpp @@ -41,11 +41,9 @@ PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPt assert(canvas); assert(port); - //if (PtrCast<PatchModel>(port->parent())) { - // m_patch_port = boost::shared_ptr<Port>(new Port(shared_from_this(), port, true)); - //} - - resize(); + assert(PtrCast<PatchModel>(port->parent())); + + /*resize(); const Atom& x_atom = port->get_metadata("ingenuity:canvas-x"); const Atom& y_atom = port->get_metadata("ingenuity:canvas-y"); @@ -57,7 +55,7 @@ PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPt double default_y; canvas->get_new_module_location(default_x, default_y); move_to(default_x, default_y); - } + }*/ port->metadata_update_sig.connect(sigc::mem_fun(this, &PatchPortModule::metadata_update)); } @@ -68,10 +66,14 @@ PatchPortModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortMod { boost::shared_ptr<PatchPortModule> ret = boost::shared_ptr<PatchPortModule>( new PatchPortModule(canvas, port)); + assert(ret); for (MetadataMap::const_iterator m = port->metadata().begin(); m != port->metadata().end(); ++m) ret->metadata_update(m->first, m->second); + ret->m_patch_port = boost::shared_ptr<Port>(new Port(ret->shared_from_this(), port, true)); + ret->add_port(ret->m_patch_port); + ret->resize(); return ret; diff --git a/src/progs/ingenuity/PatchPortModule.h b/src/progs/ingenuity/PatchPortModule.h index 89a9ce68..516d912d 100644 --- a/src/progs/ingenuity/PatchPortModule.h +++ b/src/progs/ingenuity/PatchPortModule.h @@ -44,7 +44,7 @@ class Port; * * \ingroup Ingenuity */ -class PatchPortModule : public LibFlowCanvas::Module//, public boost::enable_shared_from_this<LibFlowCanvas::Module> +class PatchPortModule : public boost::enable_shared_from_this<LibFlowCanvas::Module>, public LibFlowCanvas::Module { public: static boost::shared_ptr<PatchPortModule> create (boost::shared_ptr<PatchCanvas> canvas, @@ -66,7 +66,7 @@ protected: void metadata_update(const string& key, const Atom& value); - SharedPtr<PortModel> m_port; + SharedPtr<PortModel> m_port; boost::shared_ptr<Port> m_patch_port; ///< Port on this 'anonymous' module }; diff --git a/src/progs/ingenuity/ingenuity.glade b/src/progs/ingenuity/ingenuity.glade index a41ae758..684bbd0c 100644 --- a/src/progs/ingenuity/ingenuity.glade +++ b/src/progs/ingenuity/ingenuity.glade @@ -3207,7 +3207,7 @@ Contributors: <property name="artists">Usability / UI Design: Thorsten Wilms</property> <property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property> - <property name="logo">om-icon.png</property> + <property name="logo">ingen-icon.png</property> </widget> <widget class="GtkWindow" id="patch_tree_win"> |