summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp10
-rw-r--r--src/gui/App.hpp3
-rw-r--r--src/gui/GraphCanvas.cpp2
-rw-r--r--src/gui/WindowFactory.cpp2
-rw-r--r--src/gui/ingen_gui_lv2.cpp3
5 files changed, 17 insertions, 3 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index 96bb1254..4174fbac 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -72,6 +72,7 @@ App::App(Ingen::World* world)
, _world(world)
, _sample_rate(48000)
, _enable_signal(true)
+ , _requested_plugins(false)
{
Glib::set_application_name("Ingen");
gtk_window_set_default_icon_name("ingen");
@@ -187,6 +188,15 @@ App::detach()
}
}
+void
+App::request_plugins_if_necessary()
+{
+ if (!_requested_plugins) {
+ _world->interface()->get(Raul::URI("ingen:plugins"));
+ _requested_plugins = true;
+ }
+}
+
SharedPtr<Serialisation::Serialiser>
App::serialiser()
{
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index ac909b2f..8cf2b61e 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -78,6 +78,8 @@ public:
void detach();
+ void request_plugins_if_necessary();
+
void register_callbacks();
bool gtk_main_iteration();
@@ -170,6 +172,7 @@ protected:
ActivityPorts _activity_ports;
bool _enable_signal;
+ bool _requested_plugins;
};
} // namespace GUI
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp
index d6c4d01b..4eba15db 100644
--- a/src/gui/GraphCanvas.cpp
+++ b/src/gui/GraphCanvas.cpp
@@ -151,6 +151,8 @@ GraphCanvas::GraphCanvas(App& app,
void
GraphCanvas::show_menu(bool position, unsigned button, uint32_t time)
{
+ _app.request_plugins_if_necessary();
+
if (!_internal_menu)
build_menus();
diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp
index 717f1f63..57a21536 100644
--- a/src/gui/WindowFactory.cpp
+++ b/src/gui/WindowFactory.cpp
@@ -191,6 +191,8 @@ void
WindowFactory::present_load_plugin(SharedPtr<const GraphModel> graph,
Node::Properties data)
{
+ _app.request_plugins_if_necessary();
+
GraphWindowMap::iterator w = _graph_windows.find(graph->path());
if (w != _graph_windows.end())
diff --git a/src/gui/ingen_gui_lv2.cpp b/src/gui/ingen_gui_lv2.cpp
index 49795a83..40f37dc7 100644
--- a/src/gui/ingen_gui_lv2.cpp
+++ b/src/gui/ingen_gui_lv2.cpp
@@ -132,9 +132,6 @@ instantiate(const LV2UI_Descriptor* descriptor,
ui->world->forge(),
*ui->client.get()));
- // Request plugins
- ui->world->interface()->get(Raul::URI("ingen:plugins"));
-
// Create empty root graph model
Ingen::Resource::Properties props;
props.insert(std::make_pair(ui->app->uris().rdf_type,