summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-12-21 23:14:30 +0000
committerDavid Robillard <d@drobilla.net>2012-12-21 23:14:30 +0000
commit05a6390a50ab811572b805f90f89d551aab35123 (patch)
tree2ffb14b670ec40cc107ec97a41708658bdff33df /src/gui
parentb199a880010e8cae8e1b0328c86e6af9d79a2eb2 (diff)
downloadingen-05a6390a50ab811572b805f90f89d551aab35123.tar.gz
ingen-05a6390a50ab811572b805f90f89d551aab35123.tar.bz2
ingen-05a6390a50ab811572b805f90f89d551aab35123.zip
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
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/GraphCanvas.cpp9
-rw-r--r--src/gui/GraphCanvas.hpp2
-rw-r--r--src/gui/PropertiesWindow.cpp4
-rw-r--r--src/gui/ingen_gui.ui23
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<Client::PluginModel> 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<const ObjectModel> 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
@@ -182,12 +182,6 @@ Contributors:
</object>
</child>
<child>
- <object class="GtkSeparatorMenuItem" id="menuitem6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
- <child>
<object class="GtkImageMenuItem" id="canvas_menu_load_graph">
<property name="label">_Load Graph...</property>
<property name="visible">True</property>
@@ -209,6 +203,23 @@ Contributors:
<signal name="activate" handler="on_canvas_menu_new_graph_activate" swapped="no"/>
</object>
</child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="menuitem6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="canvas_menu_properties">
+ <property name="label">P_roperties...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">False</property>
+ <signal name="activate" handler="on_canvas_menu_properties_activate" swapped="no"/>
+ </object>
+ </child>
</object>
<object class="GtkWindow" id="config_win">
<property name="can_focus">False</property>