diff options
author | David Robillard <d@drobilla.net> | 2007-09-21 04:32:06 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-09-21 04:32:06 +0000 |
commit | d79150e42e4494d83128762d4d21da793725b31e (patch) | |
tree | d0924e505aa9117c605221959d21c7529fb860de | |
parent | 83f9aac1a8355702e4587bdca57451854bab2753 (diff) | |
download | patchage-d79150e42e4494d83128762d4d21da793725b31e.tar.gz patchage-d79150e42e4494d83128762d4d21da793725b31e.tar.bz2 patchage-d79150e42e4494d83128762d4d21da793725b31e.zip |
Show context menu for patch ports when clicking on anonymous module, as well as actual port.
git-svn-id: http://svn.drobilla.net/lad/patchage@746 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/PatchageModule.hpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/PatchageModule.hpp b/src/PatchageModule.hpp index fe74ac2..cb7fb60 100644 --- a/src/PatchageModule.hpp +++ b/src/PatchageModule.hpp @@ -41,7 +41,8 @@ public: _app(app), _type(type) { - Gtk::Menu::MenuList& items = _menu.items(); + _menu = new Gtk::Menu(); + Gtk::Menu::MenuList& items = _menu->items(); if (type == InputOutput) { items.push_back(Gtk::Menu_Helpers::MenuElem("Split", sigc::mem_fun(this, &PatchageModule::split))); @@ -55,7 +56,7 @@ public: //signal_clicked.connect(sigc::mem_fun(this, &PatchageModule::on_click)); } - virtual ~PatchageModule() { } + virtual ~PatchageModule() { delete _menu; } /*virtual void add_patchage_port(const string& port_name, bool is_input, PortType type) { @@ -110,12 +111,6 @@ public: virtual void show_dialog() {} - virtual void on_click(GdkEventButton* ev) { - if (ev->button == 3) - _menu.popup(ev->button, ev->time); - FlowCanvas::Item::on_click(ev); - } - virtual void menu_disconnect_all() { for (PortVector::iterator p = _ports.begin(); p != _ports.end(); ++p) (*p)->disconnect_all(); @@ -125,7 +120,6 @@ public: protected: Patchage* _app; - Gtk::Menu _menu; ModuleType _type; }; |