summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-03-14 21:39:55 -0400
committerDavid Robillard <d@drobilla.net>2016-03-14 21:39:55 -0400
commit2d4a4dbec4ca321baee46f640429fc52b451eb47 (patch)
treefe36cf8b28008a36888ae8f87a4809069c4fc405 /src
parent9da2840ce1fc9de08d3bd052fc535c925416c45a (diff)
downloadingen-2d4a4dbec4ca321baee46f640429fc52b451eb47.tar.gz
ingen-2d4a4dbec4ca321baee46f640429fc52b451eb47.tar.bz2
ingen-2d4a4dbec4ca321baee46f640429fc52b451eb47.zip
Enable graph port menu items in external view
Diffstat (limited to 'src')
-rw-r--r--src/gui/PortMenu.cpp10
-rw-r--r--src/gui/PortMenu.hpp5
2 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp
index 9b91008c..7079d9c4 100644
--- a/src/gui/PortMenu.cpp
+++ b/src/gui/PortMenu.cpp
@@ -34,7 +34,7 @@ namespace GUI {
PortMenu::PortMenu(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: ObjectMenu(cobject, xml)
- , _is_graph_port(false)
+ , _internal_graph_port(false)
{
xml->get_widget("object_menu", _port_menu);
xml->get_widget("port_set_min_menuitem", _set_min_menuitem);
@@ -44,12 +44,12 @@ PortMenu::PortMenu(BaseObjectType* cobject,
}
void
-PortMenu::init(App& app, SPtr<const PortModel> port, bool is_graph_port)
+PortMenu::init(App& app, SPtr<const PortModel> port, bool internal_graph_port)
{
const URIs& uris = app.uris();
ObjectMenu::init(app, port);
- _is_graph_port = is_graph_port;
+ _internal_graph_port = internal_graph_port;
_set_min_menuitem->signal_activate().connect(
sigc::mem_fun(this, &PortMenu::on_menu_set_min));
@@ -67,7 +67,7 @@ PortMenu::init(App& app, SPtr<const PortModel> port, bool is_graph_port)
const bool is_on_graph(dynamic_ptr_cast<GraphModel>(port->parent()));
const bool is_input(port->is_input());
- if (!_is_graph_port) {
+ if (!is_on_graph) {
_polyphonic_menuitem->set_sensitive(false);
_rename_menuitem->set_sensitive(false);
_destroy_menuitem->set_sensitive(false);
@@ -94,7 +94,7 @@ PortMenu::init(App& app, SPtr<const PortModel> port, bool is_graph_port)
void
PortMenu::on_menu_disconnect()
{
- if (_is_graph_port) {
+ if (_internal_graph_port) {
_app->interface()->disconnect_all(
_object->parent()->path(), _object->path());
} else {
diff --git a/src/gui/PortMenu.hpp b/src/gui/PortMenu.hpp
index c3460a2a..db567980 100644
--- a/src/gui/PortMenu.hpp
+++ b/src/gui/PortMenu.hpp
@@ -41,7 +41,7 @@ public:
void init(App& app,
SPtr<const Client::PortModel> port,
- bool is_graph_port = false);
+ bool internal_graph_port = false);
private:
void on_menu_disconnect();
@@ -56,7 +56,8 @@ private:
Gtk::MenuItem* _reset_range_menuitem;
Gtk::MenuItem* _expose_menuitem;
- bool _is_graph_port;
+ /// True iff this is a (flipped) port on a GraphPortModule in its graph
+ bool _internal_graph_port;
};
} // namespace GUI