From 60d6a432cd9a9754e4e3112aee023d0189ab93bc Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 22 Feb 2008 19:54:29 +0000 Subject: FlowCanvas performance improvements. git-svn-id: http://svn.drobilla.net/lad/patchage@1154 a436a847-0d15-0410-975c-d299462d15a1 --- src/Patchage.cpp | 4 ++-- src/PatchageModule.hpp | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Patchage.cpp b/src/Patchage.cpp index b5e195e..a499d0d 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -313,8 +313,8 @@ Patchage::idle_callback() if (_jack_driver) { while (!_jack_driver->events().empty()) { PatchageEvent& ev = _jack_driver->events().front(); - _jack_driver->events().pop(); ev.execute(this); + _jack_driver->events().pop(); } } @@ -323,8 +323,8 @@ Patchage::idle_callback() if (_alsa_driver) { while (!_alsa_driver->events().empty()) { PatchageEvent& ev = _alsa_driver->events().front(); - _alsa_driver->events().pop(); ev.execute(this); + _alsa_driver->events().pop(); } } #endif diff --git a/src/PatchageModule.hpp b/src/PatchageModule.hpp index 9004143..b06efc0 100644 --- a/src/PatchageModule.hpp +++ b/src/PatchageModule.hpp @@ -39,9 +39,15 @@ public: , _app(app) , _type(type) { + + } + + virtual ~PatchageModule() { delete _menu; _menu = NULL; } + + void create_menu() { _menu = new Gtk::Menu(); Gtk::Menu::MenuList& items = _menu->items(); - if (type == InputOutput) { + if (_type == InputOutput) { items.push_back(Gtk::Menu_Helpers::MenuElem("Split", sigc::mem_fun(this, &PatchageModule::split))); } else { @@ -51,8 +57,6 @@ public: items.push_back(Gtk::Menu_Helpers::MenuElem("Disconnect All", sigc::mem_fun(this, &PatchageModule::menu_disconnect_all))); } - - virtual ~PatchageModule() { delete _menu; } void move(double dx, double dy) { FlowCanvas::Module::move(dx, dy); -- cgit v1.2.1