summaryrefslogtreecommitdiffstats
path: root/src/gui/Port.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-07-04 19:15:50 +0000
committerDavid Robillard <d@drobilla.net>2011-07-04 19:15:50 +0000
commit86560309aa26b8cbb08bcfab85c7bc50a87794ab (patch)
tree6732b1b5ac06e0cfdaeefad56250fba92f5b8561 /src/gui/Port.cpp
parent6201df44e0187cb0606aaf1b9858c099db2a93c6 (diff)
downloadingen-86560309aa26b8cbb08bcfab85c7bc50a87794ab.tar.gz
ingen-86560309aa26b8cbb08bcfab85c7bc50a87794ab.tar.bz2
ingen-86560309aa26b8cbb08bcfab85c7bc50a87794ab.zip
Simplify FlowCanvas menu API, and fix crashing Ingen menus (ticket #721).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3411 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/Port.cpp')
-rw-r--r--src/gui/Port.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index bc623950..ab48f30b 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -75,9 +75,6 @@ Port::Port(FlowCanvas::Module& module,
{
assert(pm);
- delete _menu;
- _menu = NULL;
-
ArtVpathDash* dash = this->dash();
_rect.property_dash() = dash;
set_border_width(dash ? 2.0 : 0.0);
@@ -121,13 +118,14 @@ Port::update_metadata()
}
}
-void
-Port::create_menu()
+bool
+Port::show_menu(GdkEventButton* ev)
{
PortMenu* menu = NULL;
- WidgetFactory::get_widget_derived("object_menu", menu);
+ WidgetFactory::get_widget_derived("port_menu", menu);
menu->init(model(), _flipped);
- set_menu(menu);
+ menu->popup(ev->button, ev->time);
+ return true;
}
void