summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/NodeModule.cpp9
-rw-r--r--src/libs/gui/NodeModule.hpp2
-rw-r--r--src/libs/gui/PatchPortModule.cpp2
3 files changed, 3 insertions, 10 deletions
diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp
index fb2fbdab..e1839f37 100644
--- a/src/libs/gui/NodeModule.cpp
+++ b/src/libs/gui/NodeModule.cpp
@@ -44,6 +44,7 @@ NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeMode
Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference();
xml->get_widget_derived("object_menu", _menu);
_menu->init(node);
+ set_menu(_menu);
node->signal_new_port.connect(sigc::bind(sigc::mem_fun(this, &NodeModule::add_port), true));
node->signal_removed_port.connect(sigc::mem_fun(this, &NodeModule::remove_port));
@@ -152,14 +153,6 @@ NodeModule::store_location()
void
-NodeModule::on_click(GdkEventButton* event)
-{
- if (event->button == 3)
- _menu->popup(event->button, event->time);
-}
-
-
-void
NodeModule::set_metadata(const string& key, const Atom& value)
{
if (key == "ingenuity:canvas-x" && value.type() == Atom::FLOAT)
diff --git a/src/libs/gui/NodeModule.hpp b/src/libs/gui/NodeModule.hpp
index 58040989..e34b289f 100644
--- a/src/libs/gui/NodeModule.hpp
+++ b/src/libs/gui/NodeModule.hpp
@@ -61,8 +61,6 @@ public:
virtual void store_location();
- void on_click(GdkEventButton* event);
-
void show_control_window();
SharedPtr<NodeModel> node() const { return _node; }
diff --git a/src/libs/gui/PatchPortModule.cpp b/src/libs/gui/PatchPortModule.cpp
index f52785a4..863fc55e 100644
--- a/src/libs/gui/PatchPortModule.cpp
+++ b/src/libs/gui/PatchPortModule.cpp
@@ -72,6 +72,8 @@ PatchPortModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortMod
ret->_patch_port = boost::shared_ptr<Port>(new Port(ret, port, true));
ret->add_port(ret->_patch_port);
+
+ ret->set_menu(ret->_patch_port->menu());
for (MetadataMap::const_iterator m = port->metadata().begin(); m != port->metadata().end(); ++m)
ret->metadata_update(m->first, m->second);