diff options
author | Carl Hetherington <carl@carlh.net> | 2011-01-03 03:11:31 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-01-03 03:11:31 +0000 |
commit | 5b8472314e0471eb19244b6e949bde0ce90cc3e8 (patch) | |
tree | 776fadc13962358b5891813c335ec2587a3e53a4 /gtk2_ardour | |
parent | cf45b07f73c9b2c8d19365d27b4f8f5004822095 (diff) |
Add option to show or hide zoom toolbar.
git-svn-id: svn://localhost/ardour2/branches/3.0@8413 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor.cc | 16 | ||||
-rw-r--r-- | gtk2_ardour/editor_actions.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/rc_option_editor.cc | 8 |
3 files changed, 21 insertions, 7 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index f231a93f6a..8c49af3cf4 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -810,16 +810,14 @@ Editor::set_entered_track (TimeAxisView* tav) void Editor::show_window () { - if (! is_visible ()) { + if (!is_visible ()) { show_all (); - /* re-hide editor list if necessary */ + /* re-hide stuff if necessary */ editor_list_button_toggled (); - - /* re-hide summary widget if necessary */ parameter_changed ("show-summary"); - parameter_changed ("show-edit-group-tabs"); + parameter_changed ("show-zoom-tools"); /* now reset all audio_time_axis heights, because widgets might need to be re-hidden @@ -3969,7 +3967,9 @@ Editor::maximise_editing_space () if (Config->get_keep_tearoffs()) { _mouse_mode_tearoff->set_visible (true); _tools_tearoff->set_visible (true); - _zoom_tearoff->set_visible (true); + if (Config->get_show_zoom_tools ()) { + _zoom_tearoff->set_visible (true); + } } } @@ -3991,7 +3991,9 @@ Editor::restore_editing_space () _mouse_mode_tearoff->set_visible (true); _tools_tearoff->set_visible (true); - _zoom_tearoff->set_visible (true); + if (Config->get_show_zoom_tools ()) { + _zoom_tearoff->set_visible (true); + } post_maximal_editor_width = this->get_width(); post_maximal_editor_height = this->get_height(); diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index c2ff86d1a8..a33d76132b 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -20,6 +20,8 @@ #include <gio/gio.h> #include <gtk/gtkiconfactory.h> +#include "gtkmm2ext/tearoff.h" + #include "ardour/ardour.h" #include "ardour/profile.h" #include "ardour/session.h" @@ -1243,6 +1245,8 @@ Editor::parameter_changed (std::string p) } } else if (p == "timecode-offset" || p == "timecode-offset-negative") { update_just_timecode (); + } else if (p == "show-zoom-tools") { + _zoom_tearoff->set_visible (Config->get_show_zoom_tools(), true); } } diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 0c3d4f2562..be65cef513 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -1041,6 +1041,14 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_waveforms_while_recording) )); + add_option (_("Editor"), + new BoolOption ( + "show-zoom-tools", + _("Show zoom toolbar"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_zoom_tools), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_zoom_tools) + )); + /* AUDIO */ add_option (_("Audio"), new OptionEditorHeading (_("Buffering"))); |