break out window ops for Tabbables into show/hide/attach/detach
This commit is contained in:
parent
fd938d95bf
commit
cf93eaec98
|
@ -511,8 +511,24 @@
|
|||
<menu action = 'WindowMenu'>
|
||||
<menuitem action='toggle-audio-midi-setup'/>
|
||||
<separator/>
|
||||
<menuitem action='show-editor'/>
|
||||
<menuitem action='show-mixer'/>
|
||||
<menu action='EditorMenu'>
|
||||
<menuitem action='show-editor'/>
|
||||
<menuitem action='hide-editor'/>
|
||||
<menuitem action='attach-editor'/>
|
||||
<menuitem action='detach-editor'/>
|
||||
</menu>
|
||||
<menu action='MixerMenu'>
|
||||
<menuitem action='show-mixer'/>
|
||||
<menuitem action='hide-mixer'/>
|
||||
<menuitem action='attach-mixer'/>
|
||||
<menuitem action='detach-mixer'/>
|
||||
</menu>
|
||||
<menu action='PrefsMenu'>
|
||||
<menuitem action='show-application-preferences'/>
|
||||
<menuitem action='hide-application-preferences'/>
|
||||
<menuitem action='attach-application-preferences'/>
|
||||
<menuitem action='detach-application-preferences'/>
|
||||
</menu>
|
||||
<menuitem action='toggle-meterbridge'/>
|
||||
<separator/>
|
||||
<menuitem action='toggle-inspector'/>
|
||||
|
|
|
@ -374,9 +374,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
|
||||
Gtkmm2ext::Bindings _global_bindings;
|
||||
|
||||
void show_editor ();
|
||||
void show_mixer ();
|
||||
void show_application_preferences ();
|
||||
void show_tabbable (Gtkmm2ext::Tabbable*);
|
||||
void hide_tabbable (Gtkmm2ext::Tabbable*);
|
||||
void detach_tabbable (Gtkmm2ext::Tabbable*);
|
||||
void attach_tabbable (Gtkmm2ext::Tabbable*);
|
||||
|
||||
void toggle_meterbridge ();
|
||||
|
||||
int setup_windows ();
|
||||
|
|
|
@ -97,6 +97,10 @@ ARDOUR_UI::setup_windows ()
|
|||
return -1;
|
||||
}
|
||||
|
||||
rc_option_editor = new RCOptionEditor;
|
||||
rc_option_editor->add_to_notebook (_tabs, _("Preferences"));
|
||||
rc_option_editor->contents().show_all ();
|
||||
|
||||
/* all other dialogs are created conditionally */
|
||||
|
||||
we_have_dependents ();
|
||||
|
@ -181,10 +185,6 @@ ARDOUR_UI::setup_windows ()
|
|||
_main_window.show_all ();
|
||||
setup_toplevel_window (_main_window, "", this);
|
||||
|
||||
rc_option_editor = new RCOptionEditor;
|
||||
rc_option_editor->add_to_notebook (_tabs, _("Preferences"));
|
||||
rc_option_editor->contents().show_all ();
|
||||
|
||||
_tabs.signal_switch_page().connect (sigc::mem_fun (*this, &ARDOUR_UI::tabs_switch));
|
||||
_tabs.signal_page_removed().connect (sigc::mem_fun (*this, &ARDOUR_UI::tabs_page_removed));
|
||||
_tabs.signal_page_added().connect (sigc::mem_fun (*this, &ARDOUR_UI::tabs_page_added));
|
||||
|
|
|
@ -330,38 +330,38 @@ _hide_splash (gpointer arg)
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::show_application_preferences ()
|
||||
ARDOUR_UI::show_tabbable (Tabbable* t)
|
||||
{
|
||||
if (splash && splash->is_visible()) {
|
||||
// in 2 seconds, hide the splash screen
|
||||
Glib::signal_timeout().connect (sigc::bind (sigc::ptr_fun (_hide_splash), this), 2000);
|
||||
}
|
||||
|
||||
rc_option_editor->make_visible ();
|
||||
t->make_visible ();
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::show_editor ()
|
||||
ARDOUR_UI::hide_tabbable (Tabbable* t)
|
||||
{
|
||||
if (splash && splash->is_visible()) {
|
||||
// in 2 seconds, hide the splash screen
|
||||
Glib::signal_timeout().connect (sigc::bind (sigc::ptr_fun (_hide_splash), this), 2000);
|
||||
}
|
||||
|
||||
editor->make_visible ();
|
||||
t->make_invisible ();
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::show_mixer ()
|
||||
ARDOUR_UI::attach_tabbable (Tabbable* t)
|
||||
{
|
||||
if (splash && splash->is_visible()) {
|
||||
// in 2 seconds, hide the splash screen
|
||||
Glib::signal_timeout().connect (sigc::bind (sigc::ptr_fun (_hide_splash), this), 2000);
|
||||
}
|
||||
|
||||
mixer->make_visible ();
|
||||
t->attach ();
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::detach_tabbable (Tabbable* t)
|
||||
{
|
||||
t->detach ();
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::toggle_meterbridge ()
|
||||
|
|
|
@ -106,6 +106,10 @@ ARDOUR_UI::install_actions ()
|
|||
ActionManager::register_action (main_menu_actions, X_("Sync"), _("Sync"));
|
||||
ActionManager::register_action (main_menu_actions, X_("TransportOptions"), _("Options"));
|
||||
ActionManager::register_action (main_menu_actions, X_("WindowMenu"), _("Window"));
|
||||
ActionManager::register_action (main_menu_actions, X_("MixerMenu"), _("Mixer"));
|
||||
ActionManager::register_action (main_menu_actions, X_("EditorMenu"), _("Editor"));
|
||||
ActionManager::register_action (main_menu_actions, X_("PrefsMenu"), _("Preferences"));
|
||||
ActionManager::register_action (main_menu_actions, X_("DetachMenu"), _("Detach"));
|
||||
ActionManager::register_action (main_menu_actions, X_("Help"), _("Help"));
|
||||
ActionManager::register_action (main_menu_actions, X_("KeyMouseActions"), _("Misc. Shortcuts"));
|
||||
ActionManager::register_action (main_menu_actions, X_("AudioFileFormat"), _("Audio File Format"));
|
||||
|
@ -215,9 +219,22 @@ ARDOUR_UI::install_actions ()
|
|||
common_actions = ActionGroup::create (X_("Common"));
|
||||
ActionManager::register_action (common_actions, X_("Quit"), _("Quit"), (hide_return (sigc::mem_fun(*this, &ARDOUR_UI::finish))));
|
||||
ActionManager::register_action (common_actions, X_("Hide"), _("Hide"), sigc::mem_fun (*this, &ARDOUR_UI::hide_application));
|
||||
ActionManager::register_action (common_actions, X_("show-editor"), _("Show Editor"), sigc::mem_fun (*this, &ARDOUR_UI::show_editor));
|
||||
ActionManager::register_action (common_actions, X_("show-mixer"), _("Show Mixer"), sigc::mem_fun (*this, &ARDOUR_UI::show_mixer));
|
||||
ActionManager::register_action (common_actions, X_("show-application-preferences"), _("Preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_application_preferences));
|
||||
|
||||
ActionManager::register_action (common_actions, X_("show-editor"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), editor));
|
||||
ActionManager::register_action (common_actions, X_("show-mixer"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), mixer));
|
||||
ActionManager::register_action (common_actions, X_("show-application-preferences"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), rc_option_editor));
|
||||
|
||||
ActionManager::register_action (common_actions, X_("hide-editor"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), editor));
|
||||
ActionManager::register_action (common_actions, X_("hide-mixer"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), mixer));
|
||||
ActionManager::register_action (common_actions, X_("hide-application-preferences"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), rc_option_editor));
|
||||
|
||||
ActionManager::register_action (common_actions, X_("attach-editor"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), editor));
|
||||
ActionManager::register_action (common_actions, X_("attach-mixer"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), mixer));
|
||||
ActionManager::register_action (common_actions, X_("attach-application-preferences"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), rc_option_editor));
|
||||
|
||||
ActionManager::register_action (common_actions, X_("detach-editor"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), editor));
|
||||
ActionManager::register_action (common_actions, X_("detach-mixer"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), mixer));
|
||||
ActionManager::register_action (common_actions, X_("detach-application-preferences"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), rc_option_editor));
|
||||
|
||||
/* windows visibility actions */
|
||||
|
||||
|
|
Loading…
Reference in New Issue