From d1c3c41bf7a76d2eb9de79c44c04824c1bfc7768 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 21 Dec 2012 17:38:24 +0000 Subject: Add canvas menu items for adding CV ports. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4874 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/GraphCanvas.cpp | 10 +++++++++- src/gui/GraphCanvas.hpp | 2 ++ src/gui/ingen_gui.ui | 20 ++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index 4405cbb6..6f6bd0eb 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -86,6 +86,8 @@ GraphCanvas::GraphCanvas(App& app, xml->get_widget("canvas_menu_add_audio_input", _menu_add_audio_input); xml->get_widget("canvas_menu_add_audio_output", _menu_add_audio_output); + xml->get_widget("canvas_menu_add_cv_input", _menu_add_cv_input); + xml->get_widget("canvas_menu_add_cv_output", _menu_add_cv_output); xml->get_widget("canvas_menu_add_control_input", _menu_add_control_input); xml->get_widget("canvas_menu_add_control_output", _menu_add_control_output); xml->get_widget("canvas_menu_add_event_input", _menu_add_event_input); @@ -104,6 +106,12 @@ GraphCanvas::GraphCanvas(App& app, _menu_add_audio_output->signal_activate().connect( sigc::bind(sigc::mem_fun(this, &GraphCanvas::menu_add_port), "audio_out", "Audio Out", uris.lv2_AudioPort, true)); + _menu_add_cv_input->signal_activate().connect( + sigc::bind(sigc::mem_fun(this, &GraphCanvas::menu_add_port), + "cv_in", "CV In", uris.lv2_CVPort, false)); + _menu_add_cv_output->signal_activate().connect( + sigc::bind(sigc::mem_fun(this, &GraphCanvas::menu_add_port), + "cv_out", "CV Out", uris.lv2_CVPort, true)); _menu_add_control_input->signal_activate().connect( sigc::bind(sigc::mem_fun(this, &GraphCanvas::menu_add_port), "control_in", "Control In", uris.lv2_ControlPort, false)); @@ -176,7 +184,7 @@ GraphCanvas::build_menus() } else { _menu->items().push_back( Gtk::Menu_Helpers::ImageMenuElem( - "I_nternal", + "In_ternal", *(manage(new Gtk::Image(Gtk::Stock::EXECUTE, Gtk::ICON_SIZE_MENU))))); Gtk::MenuItem* internal_menu_item = &(_menu->items().back()); _internal_menu = Gtk::manage(new Gtk::Menu()); diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp index 5151476e..d3aa43dc 100644 --- a/src/gui/GraphCanvas.hpp +++ b/src/gui/GraphCanvas.hpp @@ -157,6 +157,8 @@ private: Gtk::MenuItem* _menu_add_audio_output; Gtk::MenuItem* _menu_add_control_input; Gtk::MenuItem* _menu_add_control_output; + Gtk::MenuItem* _menu_add_cv_input; + Gtk::MenuItem* _menu_add_cv_output; Gtk::MenuItem* _menu_add_event_input; Gtk::MenuItem* _menu_add_event_output; Gtk::MenuItem* _menu_load_plugin; diff --git a/src/gui/ingen_gui.ui b/src/gui/ingen_gui.ui index 3f939608..c104897b 100644 --- a/src/gui/ingen_gui.ui +++ b/src/gui/ingen_gui.ui @@ -81,6 +81,16 @@ Contributors: + + + True + False + False + C_V + True + + + True @@ -126,6 +136,16 @@ Contributors: + + + True + False + False + C_V + True + + + True -- cgit v1.2.1