diff options
author | David Robillard <d@drobilla.net> | 2015-10-24 01:10:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-10-24 01:10:19 +0000 |
commit | 64e08b177f873ecacc914e966968f5240b5f8297 (patch) | |
tree | 711021bdcae7dffde1f6465da368be9f1ed1083a /src | |
parent | ae84d83a49ff577152b5a26a03cd919a3c43644c (diff) | |
download | ingen-64e08b177f873ecacc914e966968f5240b5f8297.tar.gz ingen-64e08b177f873ecacc914e966968f5240b5f8297.tar.bz2 ingen-64e08b177f873ecacc914e966968f5240b5f8297.zip |
Remove excess toolbar buttons
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5773 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/GraphBox.cpp | 9 | ||||
-rw-r--r-- | src/gui/GraphBox.hpp | 2 | ||||
-rw-r--r-- | src/gui/GraphView.cpp | 10 | ||||
-rw-r--r-- | src/gui/GraphView.hpp | 3 | ||||
-rw-r--r-- | src/gui/ingen_gui.ui | 54 |
5 files changed, 23 insertions, 55 deletions
diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp index 2b84b16f..2f48e164 100644 --- a/src/gui/GraphBox.cpp +++ b/src/gui/GraphBox.cpp @@ -87,6 +87,7 @@ GraphBox::GraphBox(BaseObjectType* cobject, xml->get_widget("graph_view_control_window_menuitem", _menu_view_control_window); xml->get_widget("graph_view_engine_window_menuitem", _menu_view_engine_window); xml->get_widget("graph_properties_menuitem", _menu_view_graph_properties); + xml->get_widget("graph_refresh_menuitem", _menu_refresh); xml->get_widget("graph_fullscreen_menuitem", _menu_fullscreen); xml->get_widget("graph_animate_signals_menuitem", _menu_animate_signals); xml->get_widget("graph_sprung_layout_menuitem", _menu_sprung_layout); @@ -129,6 +130,8 @@ GraphBox::GraphBox(BaseObjectType* cobject, sigc::mem_fun(this, &GraphBox::event_close)); _menu_quit->signal_activate().connect( sigc::mem_fun(this, &GraphBox::event_quit)); + _menu_refresh->signal_activate().connect( + sigc::mem_fun(this, &GraphBox::event_refresh_toggled)); _menu_fullscreen->signal_activate().connect( sigc::mem_fun(this, &GraphBox::event_fullscreen_toggled)); _menu_animate_signals->signal_activate().connect( @@ -744,6 +747,12 @@ GraphBox::event_arrange() } void +GraphBox::event_refresh_toggled() +{ + _app->interface()->get(_graph->uri()); +} + +void GraphBox::event_fullscreen_toggled() { // FIXME: ugh, use GTK signals to track state and know for sure diff --git a/src/gui/GraphBox.hpp b/src/gui/GraphBox.hpp index 1cc04d20..c5a31677 100644 --- a/src/gui/GraphBox.hpp +++ b/src/gui/GraphBox.hpp @@ -114,6 +114,7 @@ private: void event_select_all(); void event_close(); void event_quit(); + void event_refresh_toggled(); void event_fullscreen_toggled(); void event_doc_pane_toggled(); void event_status_bar_toggled(); @@ -166,6 +167,7 @@ private: Gtk::MenuItem* _menu_increase_font_size; Gtk::MenuItem* _menu_decrease_font_size; Gtk::MenuItem* _menu_normal_font_size; + Gtk::MenuItem* _menu_refresh; Gtk::MenuItem* _menu_fullscreen; Gtk::MenuItem* _menu_arrange; Gtk::MenuItem* _menu_view_engine_window; diff --git a/src/gui/GraphView.cpp b/src/gui/GraphView.cpp index a2140b37..591536ac 100644 --- a/src/gui/GraphView.cpp +++ b/src/gui/GraphView.cpp @@ -49,8 +49,6 @@ GraphView::GraphView(BaseObjectType* cobject, xml->get_widget("graph_view_toolbar", _toolbar); xml->get_widget("graph_view_process_but", _process_but); xml->get_widget("graph_view_poly_spin", _poly_spin); - xml->get_widget("graph_view_refresh_but", _refresh_but); - xml->get_widget("graph_view_save_but", _save_but); xml->get_widget("graph_view_scrolledwindow", _canvas_scrolledwindow); _toolbar->set_toolbar_style(Gtk::TOOLBAR_ICONS); @@ -96,8 +94,6 @@ GraphView::set_graph(SPtr<const GraphModel> graph) // Connect widget signals to do things _process_but->signal_toggled().connect( sigc::mem_fun(this, &GraphView::process_toggled)); - _refresh_but->signal_clicked().connect( - sigc::mem_fun(this, &GraphView::refresh_clicked)); _poly_spin->signal_value_changed().connect( sigc::mem_fun(*this, &GraphView::poly_changed)); @@ -139,12 +135,6 @@ GraphView::poly_changed() } void -GraphView::refresh_clicked() -{ - _app->interface()->get(_graph->uri()); -} - -void GraphView::property_changed(const Raul::URI& predicate, const Atom& value) { _enable_signal = false; diff --git a/src/gui/GraphView.hpp b/src/gui/GraphView.hpp index 18e1c125..54d47c72 100644 --- a/src/gui/GraphView.hpp +++ b/src/gui/GraphView.hpp @@ -76,7 +76,6 @@ private: void process_toggled(); void poly_changed(); void clear_clicked(); - void refresh_clicked(); void property_changed(const Raul::URI& predicate, const Atom& value); @@ -89,8 +88,6 @@ private: Gtk::Toolbar* _toolbar; Gtk::ToggleToolButton* _process_but; Gtk::SpinButton* _poly_spin; - Gtk::ToolButton* _refresh_but; - Gtk::ToolButton* _save_but; Gtk::ToolItem* _breadcrumb_container; bool _enable_signal; diff --git a/src/gui/ingen_gui.ui b/src/gui/ingen_gui.ui index f3c61d23..d9caaad4 100644 --- a/src/gui/ingen_gui.ui +++ b/src/gui/ingen_gui.ui @@ -1156,6 +1156,18 @@ See COPYING file included with this distribution, or http://www.gnu.org/licenses </object> </child> <child> + <object class="GtkImageMenuItem" id="graph_refresh_menuitem"> + <property name="label">gtk-refresh</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="use_underline">True</property> + <property name="use_stock">True</property> + <accelerator key="F5" signal="activate"/> + <signal name="activate" handler="graph_refresh_menuitem" swapped="no"/> + </object> + </child> + <child> <object class="GtkImageMenuItem" id="graph_fullscreen_menuitem"> <property name="label">gtk-fullscreen</property> <property name="use_action_appearance">False</property> @@ -2892,48 +2904,6 @@ See COPYING file included with this distribution, or http://www.gnu.org/licenses <property name="expand">False</property> </packing> </child> - <child> - <object class="GtkSeparatorToolItem" id="separatortoolitem18"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - </packing> - </child> - <child> - <object class="GtkToolButton" id="graph_view_save_but"> - <property name="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock_id">gtk-save</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> - <child> - <object class="GtkSeparatorToolItem" id="separatortoolitem22"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - </packing> - </child> - <child> - <object class="GtkToolButton" id="graph_view_refresh_but"> - <property name="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock_id">gtk-refresh</property> - </object> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> </object> <packing> <property name="expand">False</property> |