summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-03 05:38:03 +0000
committerDavid Robillard <d@drobilla.net>2007-10-03 05:38:03 +0000
commitf1081b5eafd1f686d9623312103c78fdeddfb6b5 (patch)
tree988e95a67c0ba00c53ea9d5ec1cb831ac77b4ab4
parent00cc6439dc4241bb1c8ba99632b6627b0f1617d7 (diff)
downloadingen-f1081b5eafd1f686d9623312103c78fdeddfb6b5.tar.gz
ingen-f1081b5eafd1f686d9623312103c78fdeddfb6b5.tar.bz2
ingen-f1081b5eafd1f686d9623312103c78fdeddfb6b5.zip
Hide LV2 GUI context menu items for non-LV2 nodes.
git-svn-id: http://svn.drobilla.net/lad/ingen@805 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/libs/gui/NodeMenu.cpp16
-rw-r--r--src/libs/gui/NodeModule.cpp4
2 files changed, 9 insertions, 11 deletions
diff --git a/src/libs/gui/NodeMenu.cpp b/src/libs/gui/NodeMenu.cpp
index 93c76cc6..bd82fcca 100644
--- a/src/libs/gui/NodeMenu.cpp
+++ b/src/libs/gui/NodeMenu.cpp
@@ -59,13 +59,15 @@ NodeMenu::init(SharedPtr<NodeModel> node)
sigc::mem_fun(App::instance().window_factory(), &WindowFactory::present_controls),
node));
- //if (node->plugin()->ui(App::instance().engine().get(), node.get()))
- _popup_gui_menuitem->signal_activate().connect(sigc::mem_fun(signal_popup_gui,
- &sigc::signal<void>::emit));
- _embed_gui_menuitem->signal_toggled().connect(sigc::mem_fun(this,
- &NodeMenu::on_menu_embed_gui));
- //else
- // _gui_menuitem->hide();
+ _popup_gui_menuitem->signal_activate().connect(sigc::mem_fun(signal_popup_gui,
+ &sigc::signal<void>::emit));
+ _embed_gui_menuitem->signal_toggled().connect(sigc::mem_fun(this,
+ &NodeMenu::on_menu_embed_gui));
+
+ if ((!node->plugin()) || node->plugin()->type() != PluginModel::LV2) {
+ _popup_gui_menuitem->hide();
+ _embed_gui_menuitem->hide();
+ }
_enable_signal = true;
}
diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp
index d7d5ccfc..7e183377 100644
--- a/src/libs/gui/NodeModule.cpp
+++ b/src/libs/gui/NodeModule.cpp
@@ -92,12 +92,8 @@ NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> n
for (MetadataMap::const_iterator m = node->metadata().begin(); m != node->metadata().end(); ++m)
ret->set_metadata(m->first, m->second);
- //uint32_t index = 0;
for (PortModelList::const_iterator p = node->ports().begin(); p != node->ports().end(); ++p) {
ret->add_port(*p, false);
- //(*p)->signal_control.connect(sigc::bind<0>(
- // sigc::mem_fun(ret.get(), &NodeModule::control_change), index));
- //++index;
}
ret->resize();