From 05a6390a50ab811572b805f90f89d551aab35123 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 21 Dec 2012 23:14:30 +0000 Subject: Provide access to properties window for Graphs from canvas menu. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4884 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/GraphCanvas.cpp | 9 +++++++++ src/gui/GraphCanvas.hpp | 2 ++ src/gui/PropertiesWindow.cpp | 4 ++++ src/gui/ingen_gui.ui | 23 +++++++++++++++++------ 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index 6f6bd0eb..86b21cc2 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -96,6 +96,7 @@ GraphCanvas::GraphCanvas(App& app, xml->get_widget("canvas_menu_load_graph", _menu_load_graph); xml->get_widget("canvas_menu_new_graph", _menu_new_graph); xml->get_widget("canvas_menu_edit", _menu_edit); + xml->get_widget("canvas_menu_properties", _menu_properties); const URIs& uris = _app.uris(); @@ -156,6 +157,8 @@ GraphCanvas::GraphCanvas(App& app, sigc::mem_fun(this, &GraphCanvas::menu_load_graph)); _menu_new_graph->signal_activate().connect( sigc::mem_fun(this, &GraphCanvas::menu_new_graph)); + _menu_properties->signal_activate().connect( + sigc::mem_fun(this, &GraphCanvas::menu_properties)); show_human_names(app.world()->conf().option("human-names").get_bool()); show_port_names(app.world()->conf().option("port-labels").get_bool()); @@ -913,5 +916,11 @@ GraphCanvas::menu_new_graph() _graph, get_initial_data(Resource::EXTERNAL)); } +void +GraphCanvas::menu_properties() +{ + _app.window_factory()->present_properties(_graph); +} + } // namespace GUI } // namespace Ingen diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp index d3aa43dc..3fb00619 100644 --- a/src/gui/GraphCanvas.hpp +++ b/src/gui/GraphCanvas.hpp @@ -95,6 +95,7 @@ private: void menu_load_plugin(); void menu_new_graph(); void menu_load_graph(); + void menu_properties(); void load_plugin(WeakPtr plugin); void build_menus(); @@ -164,6 +165,7 @@ private: Gtk::MenuItem* _menu_load_plugin; Gtk::MenuItem* _menu_load_graph; Gtk::MenuItem* _menu_new_graph; + Gtk::MenuItem* _menu_properties; Gtk::CheckMenuItem* _menu_edit; bool _human_names; diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index cafa84ff..f439de87 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -112,6 +112,10 @@ get_types(World* world, SharedPtr model) PropRange range = model->properties().equal_range(world->uris().rdf_type); for (PropIter t = range.first; t != range.second; ++t) { types.insert(Raul::URI(t->second.get_uri())); + if (world->uris().ingen_Graph == t->second.get_uri()) { + // Add lv2:Plugin as a type for graphs so plugin properties show up + types.insert(world->uris().lv2_Plugin); + } } LilvNode* rdfs_subClassOf = lilv_new_uri( diff --git a/src/gui/ingen_gui.ui b/src/gui/ingen_gui.ui index c104897b..9d79a353 100644 --- a/src/gui/ingen_gui.ui +++ b/src/gui/ingen_gui.ui @@ -181,12 +181,6 @@ Contributors: - - - True - False - - _Load Graph... @@ -209,6 +203,23 @@ Contributors: + + + True + False + + + + + P_roperties... + True + False + False + True + False + + + False -- cgit v1.2.1