diff options
author | David Robillard <d@drobilla.net> | 2007-09-24 04:52:21 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-09-24 04:52:21 +0000 |
commit | 97faa683045e44563d25befe463e76f42c7d1a9b (patch) | |
tree | 1d1a476ee29075d835af8add80435c06bdcc9a20 /src/libs/gui/Port.cpp | |
parent | 5b706499e0a2ad3056afd2f9db1487ad169ec059 (diff) | |
download | ingen-97faa683045e44563d25befe463e76f42c7d1a9b.tar.gz ingen-97faa683045e44563d25befe463e76f42c7d1a9b.tar.bz2 ingen-97faa683045e44563d25befe463e76f42c7d1a9b.zip |
Avoid thread creation and glade stuff on module/port creation (defer until menu requested).
git-svn-id: http://svn.drobilla.net/lad/ingen@776 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui/Port.cpp')
-rw-r--r-- | src/libs/gui/Port.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/libs/gui/Port.cpp b/src/libs/gui/Port.cpp index b6c64cf0..a75d9cee 100644 --- a/src/libs/gui/Port.cpp +++ b/src/libs/gui/Port.cpp @@ -44,12 +44,6 @@ Port::Port(boost::shared_ptr<FlowCanvas::Module> module, SharedPtr<PortModel> pm { assert(module); assert(_port_model); - - PortMenu* menu = NULL; - Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference(); - xml->get_widget_derived("object_menu", menu); - menu->init(pm); - set_menu(menu); _port_model->signal_renamed.connect(sigc::mem_fun(this, &Port::renamed)); @@ -73,6 +67,17 @@ Port::Port(boost::shared_ptr<FlowCanvas::Module> module, SharedPtr<PortModel> pm void +Port::create_menu() +{ + PortMenu* menu = NULL; + Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference(); + xml->get_widget_derived("object_menu", menu); + menu->init(_port_model); + set_menu(menu); +} + + +void Port::renamed() { set_name(_port_model->path().name()); |