summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-14 20:22:45 +0000
committerDavid Robillard <d@drobilla.net>2008-08-14 20:22:45 +0000
commit406d7376bf8faf0965fb87feaf6401962d357962 (patch)
tree2c3505e577353f724cf3401766bdc641a7afd76e /src/libs/gui
parente075cfa10e698a21d68f89780dc61acd46459719 (diff)
downloadingen-406d7376bf8faf0965fb87feaf6401962d357962.tar.gz
ingen-406d7376bf8faf0965fb87feaf6401962d357962.tar.bz2
ingen-406d7376bf8faf0965fb87feaf6401962d357962.zip
Only show GUI menu items for nodes with available GUIs.
git-svn-id: http://svn.drobilla.net/lad/ingen@1378 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/NodeMenu.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libs/gui/NodeMenu.cpp b/src/libs/gui/NodeMenu.cpp
index 6051ec7c..05139540 100644
--- a/src/libs/gui/NodeMenu.cpp
+++ b/src/libs/gui/NodeMenu.cpp
@@ -64,7 +64,11 @@ NodeMenu::init(SharedPtr<NodeModel> node)
_embed_gui_menuitem->signal_toggled().connect(sigc::mem_fun(this,
&NodeMenu::on_menu_embed_gui));
- if ((!node->plugin()) || node->plugin()->type() != PluginModel::LV2) {
+ const PluginModel* plugin = dynamic_cast<const PluginModel*>(node->plugin());
+ if (plugin && plugin->type() == PluginModel::LV2 && plugin->has_ui()) {
+ _popup_gui_menuitem->show();
+ _embed_gui_menuitem->show();
+ } else {
_popup_gui_menuitem->hide();
_embed_gui_menuitem->hide();
}