summaryrefslogtreecommitdiffstats
path: root/src/progs/gtk/OmFlowCanvas.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-16 17:52:50 +0000
committerDavid Robillard <d@drobilla.net>2006-06-16 17:52:50 +0000
commit2b9b38d0a6a69327fa2f4c49ec82fc3ab8f338c9 (patch)
tree3ace658a5ed7f2fa4c63f711822790304ec5e8dc /src/progs/gtk/OmFlowCanvas.cpp
parent8741b1a57fd2752595edc08aa9fc4464022a9ec8 (diff)
downloadingen-2b9b38d0a6a69327fa2f4c49ec82fc3ab8f338c9.tar.gz
ingen-2b9b38d0a6a69327fa2f4c49ec82fc3ab8f338c9.tar.bz2
ingen-2b9b38d0a6a69327fa2f4c49ec82fc3ab8f338c9.zip
Removed Add menu from patch window (in favour of context menu only), other
GUI tweaks git-svn-id: http://svn.drobilla.net/lad/grauph@44 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/gtk/OmFlowCanvas.cpp')
-rw-r--r--src/progs/gtk/OmFlowCanvas.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/progs/gtk/OmFlowCanvas.cpp b/src/progs/gtk/OmFlowCanvas.cpp
index cac5b87d..863ba014 100644
--- a/src/progs/gtk/OmFlowCanvas.cpp
+++ b/src/progs/gtk/OmFlowCanvas.cpp
@@ -27,7 +27,7 @@
#include "OmPort.h"
#include "NodeModel.h"
#include "OmModule.h"
-
+#include "GladeFactory.h"
namespace OmGtk {
@@ -40,13 +40,27 @@ OmFlowCanvas::OmFlowCanvas(PatchController* controller, int width, int height)
{
assert(controller != NULL);
- Gtk::Menu::MenuList& items = m_menu.items();
+ /*Gtk::Menu::MenuList& items = m_menu.items();
items.push_back(Gtk::Menu_Helpers::MenuElem("Load Plugin...",
sigc::mem_fun(this, &OmFlowCanvas::menu_load_plugin)));
items.push_back(Gtk::Menu_Helpers::MenuElem("Load Subpatch...",
sigc::mem_fun(this, &OmFlowCanvas::menu_load_subpatch)));
items.push_back(Gtk::Menu_Helpers::MenuElem("New Subpatch...",
- sigc::mem_fun(this, &OmFlowCanvas::menu_create_subpatch)));
+ sigc::mem_fun(this, &OmFlowCanvas::menu_create_subpatch)));*/
+
+ Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference();
+ xml->get_widget("canvas_menu", m_menu);
+
+ xml->get_widget("canvas_menu_load_plugin", m_menu_load_plugin);
+ xml->get_widget("canvas_menu_load_patch", m_menu_load_patch);
+ xml->get_widget("canvas_menu_new_patch", m_menu_new_patch);
+
+ m_menu_load_plugin->signal_activate().connect(
+ sigc::mem_fun<void>(this, &OmFlowCanvas::menu_load_plugin));
+ m_menu_load_patch->signal_activate().connect(
+ sigc::mem_fun<void>(this, &OmFlowCanvas::menu_load_patch));
+ m_menu_new_patch->signal_activate().connect(
+ sigc::mem_fun<void>(this, &OmFlowCanvas::menu_new_patch));
}
@@ -145,7 +159,7 @@ OmFlowCanvas::menu_load_plugin()
void
-OmFlowCanvas::menu_load_subpatch()
+OmFlowCanvas::menu_load_patch()
{
m_patch_controller->window()->load_subpatch_window()->set_next_module_location(
m_last_click_x, m_last_click_y);
@@ -154,7 +168,7 @@ OmFlowCanvas::menu_load_subpatch()
void
-OmFlowCanvas::menu_create_subpatch()
+OmFlowCanvas::menu_new_patch()
{
m_patch_controller->window()->new_subpatch_window()->set_next_module_location(
m_last_click_x, m_last_click_y);