Add option to show or hide zoom toolbar.
git-svn-id: svn://localhost/ardour2/branches/3.0@8413 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
cf45b07f73
commit
5b8472314e
@ -810,16 +810,14 @@ Editor::set_entered_track (TimeAxisView* tav)
|
|||||||
void
|
void
|
||||||
Editor::show_window ()
|
Editor::show_window ()
|
||||||
{
|
{
|
||||||
if (! is_visible ()) {
|
if (!is_visible ()) {
|
||||||
show_all ();
|
show_all ();
|
||||||
|
|
||||||
/* re-hide editor list if necessary */
|
/* re-hide stuff if necessary */
|
||||||
editor_list_button_toggled ();
|
editor_list_button_toggled ();
|
||||||
|
|
||||||
/* re-hide summary widget if necessary */
|
|
||||||
parameter_changed ("show-summary");
|
parameter_changed ("show-summary");
|
||||||
|
|
||||||
parameter_changed ("show-edit-group-tabs");
|
parameter_changed ("show-edit-group-tabs");
|
||||||
|
parameter_changed ("show-zoom-tools");
|
||||||
|
|
||||||
/* now reset all audio_time_axis heights, because widgets might need
|
/* now reset all audio_time_axis heights, because widgets might need
|
||||||
to be re-hidden
|
to be re-hidden
|
||||||
@ -3969,8 +3967,10 @@ Editor::maximise_editing_space ()
|
|||||||
if (Config->get_keep_tearoffs()) {
|
if (Config->get_keep_tearoffs()) {
|
||||||
_mouse_mode_tearoff->set_visible (true);
|
_mouse_mode_tearoff->set_visible (true);
|
||||||
_tools_tearoff->set_visible (true);
|
_tools_tearoff->set_visible (true);
|
||||||
|
if (Config->get_show_zoom_tools ()) {
|
||||||
_zoom_tearoff->set_visible (true);
|
_zoom_tearoff->set_visible (true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3991,7 +3991,9 @@ Editor::restore_editing_space ()
|
|||||||
|
|
||||||
_mouse_mode_tearoff->set_visible (true);
|
_mouse_mode_tearoff->set_visible (true);
|
||||||
_tools_tearoff->set_visible (true);
|
_tools_tearoff->set_visible (true);
|
||||||
|
if (Config->get_show_zoom_tools ()) {
|
||||||
_zoom_tearoff->set_visible (true);
|
_zoom_tearoff->set_visible (true);
|
||||||
|
}
|
||||||
post_maximal_editor_width = this->get_width();
|
post_maximal_editor_width = this->get_width();
|
||||||
post_maximal_editor_height = this->get_height();
|
post_maximal_editor_height = this->get_height();
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#include <gtk/gtkiconfactory.h>
|
#include <gtk/gtkiconfactory.h>
|
||||||
|
|
||||||
|
#include "gtkmm2ext/tearoff.h"
|
||||||
|
|
||||||
#include "ardour/ardour.h"
|
#include "ardour/ardour.h"
|
||||||
#include "ardour/profile.h"
|
#include "ardour/profile.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
@ -1243,6 +1245,8 @@ Editor::parameter_changed (std::string p)
|
|||||||
}
|
}
|
||||||
} else if (p == "timecode-offset" || p == "timecode-offset-negative") {
|
} else if (p == "timecode-offset" || p == "timecode-offset-negative") {
|
||||||
update_just_timecode ();
|
update_just_timecode ();
|
||||||
|
} else if (p == "show-zoom-tools") {
|
||||||
|
_zoom_tearoff->set_visible (Config->get_show_zoom_tools(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1041,6 +1041,14 @@ RCOptionEditor::RCOptionEditor ()
|
|||||||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_waveforms_while_recording)
|
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 */
|
/* AUDIO */
|
||||||
|
|
||||||
add_option (_("Audio"), new OptionEditorHeading (_("Buffering")));
|
add_option (_("Audio"), new OptionEditorHeading (_("Buffering")));
|
||||||
|
@ -157,3 +157,6 @@ CONFIG_VARIABLE (int32_t, processor_usage, "processor-usage", -1)
|
|||||||
CONFIG_VARIABLE (bool, denormal_protection, "denormal-protection", false)
|
CONFIG_VARIABLE (bool, denormal_protection, "denormal-protection", false)
|
||||||
CONFIG_VARIABLE (DenormalModel, denormal_model, "denormal-model", DenormalNone)
|
CONFIG_VARIABLE (DenormalModel, denormal_model, "denormal-model", DenormalNone)
|
||||||
|
|
||||||
|
/* visibility of toolbar components */
|
||||||
|
|
||||||
|
CONFIG_VARIABLE (bool, show_zoom_tools, "show-zoom-tools", true)
|
||||||
|
@ -35,7 +35,7 @@ class TearOff : public Gtk::HBox
|
|||||||
TearOff (Gtk::Widget& contents, bool allow_resize = false);
|
TearOff (Gtk::Widget& contents, bool allow_resize = false);
|
||||||
virtual ~TearOff ();
|
virtual ~TearOff ();
|
||||||
|
|
||||||
void set_visible (bool yn);
|
void set_visible (bool yn, bool force = false);
|
||||||
void set_can_be_torn_off (bool);
|
void set_can_be_torn_off (bool);
|
||||||
bool can_be_torn_off () const { return _can_be_torn_off; }
|
bool can_be_torn_off () const { return _can_be_torn_off; }
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ TearOff::set_can_be_torn_off (bool yn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TearOff::set_visible (bool yn)
|
TearOff::set_visible (bool yn, bool force)
|
||||||
{
|
{
|
||||||
/* don't change visibility if torn off */
|
/* don't change visibility if torn off */
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ TearOff::set_visible (bool yn)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_visible != yn) {
|
if (_visible != yn || force) {
|
||||||
_visible = yn;
|
_visible = yn;
|
||||||
if (yn) {
|
if (yn) {
|
||||||
show_all();
|
show_all();
|
||||||
|
Loading…
Reference in New Issue
Block a user