Much simplier implementation of: "Show Toolbar" act immediately, i.e., even when already maximized, changing this toggle changes whenever toolbar is shown or not.
git-svn-id: svn://localhost/ardour2/branches/3.0@12695 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
1bd34a34f7
commit
f9ed2ced4a
|
@ -166,7 +166,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||||
void new_midi_tracer_window ();
|
void new_midi_tracer_window ();
|
||||||
void toggle_route_params_window ();
|
void toggle_route_params_window ();
|
||||||
void toggle_editing_space();
|
void toggle_editing_space();
|
||||||
void toggle_editing_space_force(bool force);
|
|
||||||
void toggle_keep_tearoffs();
|
void toggle_keep_tearoffs();
|
||||||
|
|
||||||
Gtk::Tooltips& tooltips() { return _tooltips; }
|
Gtk::Tooltips& tooltips() { return _tooltips; }
|
||||||
|
@ -241,8 +240,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||||
|
|
||||||
gint exit_on_main_window_close (GdkEventAny *);
|
gint exit_on_main_window_close (GdkEventAny *);
|
||||||
|
|
||||||
void maximise_editing_space (bool force);
|
void maximise_editing_space ();
|
||||||
void restore_editing_space (bool force);
|
void restore_editing_space ();
|
||||||
|
|
||||||
|
void update_tearoff_visibility ();
|
||||||
|
|
||||||
void setup_profile ();
|
void setup_profile ();
|
||||||
void setup_tooltips ();
|
void setup_tooltips ();
|
||||||
|
|
|
@ -606,18 +606,26 @@ ARDOUR_UI::editor_realized ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::maximise_editing_space (bool force)
|
ARDOUR_UI::update_tearoff_visibility ()
|
||||||
{
|
{
|
||||||
if (editor) {
|
if (editor) {
|
||||||
editor->maximise_editing_space (force);
|
editor->update_tearoff_visibility ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::restore_editing_space (bool force)
|
ARDOUR_UI::maximise_editing_space ()
|
||||||
{
|
{
|
||||||
if (editor) {
|
if (editor) {
|
||||||
editor->restore_editing_space (force);
|
editor->maximise_editing_space ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::restore_editing_space ()
|
||||||
|
{
|
||||||
|
if (editor) {
|
||||||
|
editor->restore_editing_space ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ ARDOUR_UI::toggle_keep_tearoffs ()
|
||||||
{
|
{
|
||||||
ActionManager::toggle_config_state ("Common", "KeepTearoffs", &RCConfiguration::set_keep_tearoffs, &RCConfiguration::get_keep_tearoffs);
|
ActionManager::toggle_config_state ("Common", "KeepTearoffs", &RCConfiguration::set_keep_tearoffs, &RCConfiguration::get_keep_tearoffs);
|
||||||
|
|
||||||
ARDOUR_UI::toggle_editing_space_force (true);
|
ARDOUR_UI::update_tearoff_visibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -276,21 +276,15 @@ ARDOUR_UI::toggle_video_sync()
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_editing_space()
|
ARDOUR_UI::toggle_editing_space()
|
||||||
{
|
|
||||||
toggle_editing_space_force(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ARDOUR_UI::toggle_editing_space_force(bool force)
|
|
||||||
{
|
{
|
||||||
Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMaximalEditor");
|
Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMaximalEditor");
|
||||||
|
|
||||||
if (act) {
|
if (act) {
|
||||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
if (tact->get_active()) {
|
if (tact->get_active()) {
|
||||||
maximise_editing_space (force);
|
maximise_editing_space ();
|
||||||
} else {
|
} else {
|
||||||
restore_editing_space (force);
|
restore_editing_space ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3929,36 +3929,35 @@ Editor::session_state_saved (string)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::maximise_editing_space (bool force)
|
Editor::update_tearoff_visibility()
|
||||||
{
|
{
|
||||||
if (_maximised && !force) {
|
bool visible = Config->get_keep_tearoffs();
|
||||||
|
_mouse_mode_tearoff->set_visible (visible);
|
||||||
|
_tools_tearoff->set_visible (visible);
|
||||||
|
_zoom_tearoff->set_visible (visible);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::maximise_editing_space ()
|
||||||
|
{
|
||||||
|
if (_maximised) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fullscreen ();
|
fullscreen ();
|
||||||
|
|
||||||
bool visible = Config->get_keep_tearoffs();
|
|
||||||
_mouse_mode_tearoff->set_visible (visible);
|
|
||||||
_tools_tearoff->set_visible (visible);
|
|
||||||
_zoom_tearoff->set_visible (visible);
|
|
||||||
|
|
||||||
_maximised = true;
|
_maximised = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::restore_editing_space (bool force)
|
Editor::restore_editing_space ()
|
||||||
{
|
{
|
||||||
if (!_maximised && !force) {
|
if (!_maximised) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
unfullscreen();
|
unfullscreen();
|
||||||
|
|
||||||
bool visible = Config->get_keep_tearoffs();
|
|
||||||
_mouse_mode_tearoff->set_visible (visible);
|
|
||||||
_tools_tearoff->set_visible (visible);
|
|
||||||
_zoom_tearoff->set_visible (visible);
|
|
||||||
|
|
||||||
_maximised = false;
|
_maximised = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -397,8 +397,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void prepare_for_cleanup ();
|
void prepare_for_cleanup ();
|
||||||
void finish_cleanup ();
|
void finish_cleanup ();
|
||||||
|
|
||||||
void maximise_editing_space(bool force);
|
void maximise_editing_space();
|
||||||
void restore_editing_space(bool force);
|
void restore_editing_space();
|
||||||
|
|
||||||
|
void update_tearoff_visibility();
|
||||||
|
|
||||||
void reset_x_origin (framepos_t);
|
void reset_x_origin (framepos_t);
|
||||||
void reset_x_origin_to_follow_playhead ();
|
void reset_x_origin_to_follow_playhead ();
|
||||||
|
|
|
@ -272,8 +272,9 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
||||||
virtual void finish_cleanup () = 0;
|
virtual void finish_cleanup () = 0;
|
||||||
virtual void reset_x_origin (framepos_t frame) = 0;
|
virtual void reset_x_origin (framepos_t frame) = 0;
|
||||||
virtual void remove_last_capture () = 0;
|
virtual void remove_last_capture () = 0;
|
||||||
virtual void maximise_editing_space (bool force) = 0;
|
virtual void maximise_editing_space () = 0;
|
||||||
virtual void restore_editing_space (bool force) = 0;
|
virtual void restore_editing_space () = 0;
|
||||||
|
virtual void update_tearoff_visibility () = 0;
|
||||||
virtual framepos_t get_preferred_edit_position (bool ignore_playhead = false, bool from_context_menu = false) = 0;
|
virtual framepos_t get_preferred_edit_position (bool ignore_playhead = false, bool from_context_menu = false) = 0;
|
||||||
virtual void toggle_meter_updating() = 0;
|
virtual void toggle_meter_updating() = 0;
|
||||||
virtual void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false) = 0;
|
virtual void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false) = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user