From ce208602f25d443d4f721d75c9bd9c884ba9e9a6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 14 Aug 2008 05:09:14 +0000 Subject: Defer menu creation until it is actually requested (speeds up startup time-to-patch-window considerably). Handle new plugins being presented after initialization in plugin menu and dialog. git-svn-id: http://svn.drobilla.net/lad/ingen@1372 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/gui/PatchCanvas.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/libs/gui/PatchCanvas.hpp') diff --git a/src/libs/gui/PatchCanvas.hpp b/src/libs/gui/PatchCanvas.hpp index bb766314..3998532d 100644 --- a/src/libs/gui/PatchCanvas.hpp +++ b/src/libs/gui/PatchCanvas.hpp @@ -67,6 +67,7 @@ public: void build(); void arrange(bool use_length_hints); + void add_plugin(SharedPtr pm); void add_node(SharedPtr nm); void remove_node(SharedPtr nm); void add_port(SharedPtr pm); @@ -79,8 +80,7 @@ public: void destroy_selection(); void copy_selection(); - void show_menu(GdkEvent* event) - { _menu->popup(event->button.button, event->button.time); } + void show_menu(GdkEvent* event); bool canvas_key_event(GdkEventKey* event); @@ -123,7 +123,10 @@ private: int _last_click_x; int _last_click_y; + bool _refresh_menu; Gtk::Menu* _menu; + Gtk::Menu* _internal_menu; + Gtk::Menu* _plugin_menu; /*Gtk::MenuItem* _menu_add_number_control; Gtk::MenuItem* _menu_add_button_control;*/ Gtk::MenuItem* _menu_add_audio_input; -- cgit v1.2.1