diff options
author | David Robillard <d@drobilla.net> | 2015-04-05 23:10:42 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-04-05 23:10:42 +0000 |
commit | 85a945468c6b065ee43ce1dc2f6e4c03eb9fe3c3 (patch) | |
tree | c8aa67df530bebc00c20bac738a0a2e1c3e770a2 /src | |
parent | 1d01e09da3d45af72c04b007bccd240ec16fbe36 (diff) | |
download | ingen-85a945468c6b065ee43ce1dc2f6e4c03eb9fe3c3.tar.gz ingen-85a945468c6b065ee43ce1dc2f6e4c03eb9fe3c3.tar.bz2 ingen-85a945468c6b065ee43ce1dc2f6e4c03eb9fe3c3.zip |
Hide close/quit menu items in plugin GUI.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5669 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/App.cpp | 1 | ||||
-rw-r--r-- | src/gui/App.hpp | 4 | ||||
-rw-r--r-- | src/gui/GraphBox.cpp | 6 | ||||
-rw-r--r-- | src/gui/ingen_gui.ui | 6 | ||||
-rw-r--r-- | src/gui/ingen_gui_lv2.cpp | 1 |
5 files changed, 12 insertions, 6 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 882aec2d..0c7aea8c 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -75,6 +75,7 @@ App::App(Ingen::World* world) , _sample_rate(48000) , _enable_signal(true) , _requested_plugins(false) + , _is_plugin(false) { _world->conf().load_default("ingen", "gui.ttl"); diff --git a/src/gui/App.hpp b/src/gui/App.hpp index db7af77b..c609fa36 100644 --- a/src/gui/App.hpp +++ b/src/gui/App.hpp @@ -106,6 +106,9 @@ public: uint32_t sample_rate() const; + bool is_plugin() const { return _is_plugin; } + void set_is_plugin(bool b) { _is_plugin = b; } + ConnectWindow* connect_window() const { return _connect_window; } MessagesWindow* messages_dialog() const { return _messages_window; } GraphTreeWindow* graph_tree() const { return _graph_tree_window; } @@ -160,6 +163,7 @@ protected: bool _enable_signal; bool _requested_plugins; + bool _is_plugin; }; } // namespace GUI diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp index 693d0c04..2b84b16f 100644 --- a/src/gui/GraphBox.cpp +++ b/src/gui/GraphBox.cpp @@ -182,6 +182,12 @@ GraphBox::create(App& app, SPtr<const GraphModel> graph) xml->get_widget_derived("graph_win_vbox", result); result->init_box(app); result->set_graph(graph, SPtr<GraphView>()); + + if (app.is_plugin()) { + result->_menu_close->set_sensitive(false); + result->_menu_quit->set_sensitive(false); + } + return SPtr<GraphBox>(result); } diff --git a/src/gui/ingen_gui.ui b/src/gui/ingen_gui.ui index 95ea2424..21d67543 100644 --- a/src/gui/ingen_gui.ui +++ b/src/gui/ingen_gui.ui @@ -837,12 +837,6 @@ See COPYING file included with this distribution, or http://www.gnu.org/licenses </object> </child> <child> - <object class="GtkSeparatorMenuItem" id="separator6"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - </child> - <child> <object class="GtkImageMenuItem" id="graph_quit_menuitem"> <property name="label">gtk-quit</property> <property name="use_action_appearance">False</property> diff --git a/src/gui/ingen_gui_lv2.cpp b/src/gui/ingen_gui_lv2.cpp index a8e48007..386f30c0 100644 --- a/src/gui/ingen_gui_lv2.cpp +++ b/src/gui/ingen_gui_lv2.cpp @@ -133,6 +133,7 @@ instantiate(const LV2UI_Descriptor* descriptor, ui->app = Ingen::GUI::App::create(ui->world); ui->client = SPtr<Ingen::Client::SigClientInterface>( new Ingen::Client::SigClientInterface()); + ui->app->set_is_plugin(true); ui->app->attach(ui->client); ui->reader = SPtr<Ingen::AtomReader>( |