mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
F11 now toggles maximal editor space
git-svn-id: svn://localhost/trunk/ardour2@280 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5eb4a701f3
commit
e1ad4e0a53
11 changed files with 111 additions and 4 deletions
|
|
@ -70,6 +70,7 @@
|
|||
|
||||
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-range-start" "F1")
|
||||
(gtk_accel_path "<Actions>/Editor/edit-cursor-to-range-end" "F2")
|
||||
(gtk_accel_path "<Actions>/Common/ToggleMaximalEditor" "F11")
|
||||
|
||||
(gtk_accel_path "<Actions>/Editor/jump-forward-to-mark" "<control>KP_Right")
|
||||
(gtk_accel_path "<Actions>/Editor/jump-backward-to-mark" "<control>KP_Left")
|
||||
|
|
|
|||
|
|
@ -158,6 +158,8 @@
|
|||
</menu>
|
||||
</menu>
|
||||
<menu name='Windows' action = 'Windows'>
|
||||
<menuitem action='ToggleMaximalEditor'/>
|
||||
<separator/>
|
||||
<menuitem action='GotoEditor'/>
|
||||
<menuitem action='GotoMixer'/>
|
||||
<menuitem action='ToggleOptionsEditor'/>
|
||||
|
|
@ -165,8 +167,8 @@
|
|||
<menuitem action='ToggleConnections'/>
|
||||
<menuitem action='ToggleLocations'/>
|
||||
<menuitem action='ToggleBigClock'/>
|
||||
<separator/>
|
||||
<menuitem action='About'/>
|
||||
<separator/>
|
||||
<menuitem action='About'/>
|
||||
</menu>
|
||||
<menu name='Options' action='Options'>
|
||||
<menu action='Autoconnect'>
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void toggle_connection_editor ();
|
||||
void toggle_route_params_window ();
|
||||
void toggle_tempo_window ();
|
||||
void toggle_editing_space();
|
||||
|
||||
gint32 select_diskstream (GdkEventButton *ev);
|
||||
|
||||
|
|
@ -202,6 +203,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
gint exit_on_main_window_close (GdkEventAny *);
|
||||
|
||||
void maximise_editing_space ();
|
||||
void restore_editing_space ();
|
||||
|
||||
protected:
|
||||
friend class PublicEditor;
|
||||
|
||||
|
|
|
|||
|
|
@ -225,7 +225,11 @@ ARDOUR_UI::setup_transport ()
|
|||
static_cast<Widget*>(&transport_frame)));
|
||||
transport_tearoff->Attach.connect (bind (mem_fun(*this, &ARDOUR_UI::reattach_tearoff), static_cast<Box*> (&top_packer),
|
||||
static_cast<Widget*> (&transport_frame), 1));
|
||||
|
||||
transport_tearoff->Hidden.connect (bind (mem_fun(*this, &ARDOUR_UI::detach_tearoff), static_cast<Box*>(&top_packer),
|
||||
static_cast<Widget*>(&transport_frame)));
|
||||
transport_tearoff->Visible.connect (bind (mem_fun(*this, &ARDOUR_UI::reattach_tearoff), static_cast<Box*> (&top_packer),
|
||||
static_cast<Widget*> (&transport_frame), 1));
|
||||
|
||||
shuttle_box.set_name ("TransportButton");
|
||||
goto_start_button.set_name ("TransportButton");
|
||||
goto_end_button.set_name ("TransportButton");
|
||||
|
|
@ -857,3 +861,25 @@ ARDOUR_UI::sync_option_changed ()
|
|||
session->request_slave_source (Session::JACK);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::maximise_editing_space ()
|
||||
{
|
||||
if (!editor) {
|
||||
return;
|
||||
}
|
||||
|
||||
transport_tearoff->set_visible (false);
|
||||
editor->maximise_editing_space ();
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::restore_editing_space ()
|
||||
{
|
||||
if (!editor) {
|
||||
return;
|
||||
}
|
||||
|
||||
transport_tearoff->set_visible (true);
|
||||
editor->restore_editing_space ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,6 +162,8 @@ ARDOUR_UI::install_actions ()
|
|||
|
||||
/* windows visibility actions */
|
||||
|
||||
ActionManager::register_toggle_action (common_actions, X_("ToggleMaximalEditor"), _("maximise editor space"), mem_fun (*this, &ARDOUR_UI::toggle_editing_space));
|
||||
|
||||
ActionManager::register_action (common_actions, X_("GotoEditor"), _("Editor"), mem_fun(*this, &ARDOUR_UI::goto_editor_window));
|
||||
ActionManager::register_action (common_actions, X_("GotoMixer"), _("Mixer"), mem_fun(*this, &ARDOUR_UI::goto_mixer_window));
|
||||
ActionManager::register_toggle_action (common_actions, X_("ToggleSoundFileBrowser"), _("Sound File Browser"), mem_fun(*this, &ARDOUR_UI::toggle_sound_file_browser));
|
||||
|
|
|
|||
|
|
@ -186,6 +186,20 @@ ARDOUR_UI::toggle_punch_out ()
|
|||
toggle_session_state ("Transport", "TogglePunchOut", &Session::set_punch_out, &Session::get_punch_out);
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_editing_space()
|
||||
{
|
||||
Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMaximalEditor");
|
||||
if (act) {
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||
if (tact->get_active()) {
|
||||
maximise_editing_space ();
|
||||
} else {
|
||||
restore_editing_space ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_UseHardwareMonitoring()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2484,6 +2484,10 @@ Editor::setup_toolbar ()
|
|||
&mouse_mode_tearoff->tearoff_window()));
|
||||
mouse_mode_tearoff->Attach.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
|
||||
&mouse_mode_tearoff->tearoff_window(), 1));
|
||||
mouse_mode_tearoff->Hidden.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
|
||||
&mouse_mode_tearoff->tearoff_window()));
|
||||
mouse_mode_tearoff->Visible.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
|
||||
&mouse_mode_tearoff->tearoff_window(), 1));
|
||||
|
||||
mouse_move_button.set_name ("MouseModeButton");
|
||||
mouse_select_button.set_name ("MouseModeButton");
|
||||
|
|
@ -2684,7 +2688,10 @@ Editor::setup_toolbar ()
|
|||
&tools_tearoff->tearoff_window()));
|
||||
tools_tearoff->Attach.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
|
||||
&tools_tearoff->tearoff_window(), 0));
|
||||
|
||||
tools_tearoff->Hidden.connect (bind (mem_fun(*this, &Editor::detach_tearoff), static_cast<Box*>(&toolbar_hbox),
|
||||
&tools_tearoff->tearoff_window()));
|
||||
tools_tearoff->Visible.connect (bind (mem_fun(*this, &Editor::reattach_tearoff), static_cast<Box*> (&toolbar_hbox),
|
||||
&tools_tearoff->tearoff_window(), 0));
|
||||
|
||||
toolbar_hbox.set_spacing (8);
|
||||
toolbar_hbox.set_border_width (2);
|
||||
|
|
@ -3684,6 +3691,7 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which)
|
|||
|
||||
if ((done = GTK_WIDGET(edit_pane.gobj())->allocation.width > pos)) {
|
||||
edit_pane.set_position (pos);
|
||||
pre_maximal_pane_position = pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3968,3 +3976,20 @@ Editor::session_state_saved (string snap_name)
|
|||
redisplay_snapshots ();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::maximise_editing_space ()
|
||||
{
|
||||
mouse_mode_tearoff->set_visible (false);
|
||||
tools_tearoff->set_visible (false);
|
||||
|
||||
pre_maximal_pane_position = edit_pane.get_position();
|
||||
edit_pane.set_position (edit_pane.get_width());
|
||||
}
|
||||
|
||||
void
|
||||
Editor::restore_editing_space ()
|
||||
{
|
||||
mouse_mode_tearoff->set_visible (true);
|
||||
tools_tearoff->set_visible (true);
|
||||
edit_pane.set_position (pre_maximal_pane_position);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -310,6 +310,9 @@ class Editor : public PublicEditor
|
|||
|
||||
void reposition_x_origin (jack_nframes_t sample);
|
||||
|
||||
void maximise_editing_space();
|
||||
void restore_editing_space();
|
||||
|
||||
protected:
|
||||
void map_transport_state ();
|
||||
void map_position_change (jack_nframes_t);
|
||||
|
|
@ -380,6 +383,7 @@ class Editor : public PublicEditor
|
|||
Editing::MouseMode mouse_mode;
|
||||
void mouse_insert (GdkEventButton *);
|
||||
|
||||
int pre_maximal_pane_position;
|
||||
void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*);
|
||||
|
||||
Gtk::Notebook the_notebook;
|
||||
|
|
|
|||
|
|
@ -122,6 +122,8 @@ class PublicEditor : public Gtk::Window, public Stateful {
|
|||
virtual void prepare_for_cleanup () = 0;
|
||||
virtual void reposition_x_origin (jack_nframes_t frame) = 0;
|
||||
virtual void remove_last_capture () = 0;
|
||||
virtual void maximise_editing_space() = 0;
|
||||
virtual void restore_editing_space() = 0;
|
||||
|
||||
sigc::signal<void,Editing::DisplayControl> DisplayControlChanged;
|
||||
sigc::signal<void> ZoomFocusChanged;
|
||||
|
|
|
|||
|
|
@ -34,8 +34,12 @@ class TearOff : public Gtk::HBox
|
|||
TearOff (Gtk::Widget& contents, bool allow_resize = false);
|
||||
virtual ~TearOff ();
|
||||
|
||||
void set_visible (bool yn);
|
||||
|
||||
sigc::signal<void> Detach;
|
||||
sigc::signal<void> Attach;
|
||||
sigc::signal<void> Visible;
|
||||
sigc::signal<void> Hidden;
|
||||
|
||||
Gtk::Window& tearoff_window() { return own_window; }
|
||||
bool torn_off() const;
|
||||
|
|
@ -51,6 +55,7 @@ class TearOff : public Gtk::HBox
|
|||
double drag_x;
|
||||
double drag_y;
|
||||
bool dragging;
|
||||
bool _visible;
|
||||
|
||||
gint tearoff_click (GdkEventButton*);
|
||||
gint close_click (GdkEventButton*);
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ TearOff::TearOff (Widget& c, bool allow_resize)
|
|||
close_arrow (ARROW_UP, SHADOW_OUT)
|
||||
{
|
||||
dragging = false;
|
||||
_visible = true;
|
||||
|
||||
tearoff_event_box.add (tearoff_arrow);
|
||||
tearoff_event_box.set_events (BUTTON_PRESS_MASK|BUTTON_RELEASE_MASK);
|
||||
|
|
@ -77,6 +78,27 @@ TearOff::~TearOff ()
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
TearOff::set_visible (bool yn)
|
||||
{
|
||||
/* don't change visibility if torn off */
|
||||
|
||||
if (own_window.is_visible()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_visible != yn) {
|
||||
_visible = yn;
|
||||
if (yn) {
|
||||
show_all();
|
||||
Visible ();
|
||||
} else {
|
||||
hide ();
|
||||
Hidden ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gint
|
||||
TearOff::tearoff_click (GdkEventButton* ev)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue