From f1081b5eafd1f686d9623312103c78fdeddfb6b5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 3 Oct 2007 05:38:03 +0000 Subject: 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 --- src/libs/gui/NodeMenu.cpp | 16 +++++++++------- src/libs/gui/NodeModule.cpp | 4 ---- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'src/libs/gui') 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 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::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::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 canvas, SharedPtr 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(); -- cgit v1.2.1