remove "toggle-foo" style actions related to editor/mixer windows and provide new methods that just use Tabbable::make_visible()
This commit is contained in:
parent
347ba94bcd
commit
1158271f72
|
@ -275,6 +275,7 @@
|
||||||
<menuitem action='set-tempo-from-edit-range'/>
|
<menuitem action='set-tempo-from-edit-range'/>
|
||||||
</menu>
|
</menu>
|
||||||
<menuitem action='set-mouse-mode-object-range'/>
|
<menuitem action='set-mouse-mode-object-range'/>
|
||||||
|
<menuitem action='show-application-preferences'/>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
||||||
<menu name='RegionMenu' action='RegionMenu'>
|
<menu name='RegionMenu' action='RegionMenu'>
|
||||||
|
@ -510,9 +511,9 @@
|
||||||
<menu action = 'WindowMenu'>
|
<menu action = 'WindowMenu'>
|
||||||
<menuitem action='toggle-audio-midi-setup'/>
|
<menuitem action='toggle-audio-midi-setup'/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menuitem action='toggle-mixer'/>
|
<menuitem action='show-editor'/>
|
||||||
|
<menuitem action='show-mixer'/>
|
||||||
<menuitem action='toggle-meterbridge'/>
|
<menuitem action='toggle-meterbridge'/>
|
||||||
<menuitem action='toggle-editor-mixer'/>
|
|
||||||
<separator/>
|
<separator/>
|
||||||
<menuitem action='toggle-inspector'/>
|
<menuitem action='toggle-inspector'/>
|
||||||
<menuitem action='toggle-locations'/>
|
<menuitem action='toggle-locations'/>
|
||||||
|
|
|
@ -1031,8 +1031,6 @@ ARDOUR_UI::starting ()
|
||||||
|
|
||||||
use_config ();
|
use_config ();
|
||||||
|
|
||||||
goto_editor_window ();
|
|
||||||
|
|
||||||
WM::Manager::instance().show_visible ();
|
WM::Manager::instance().show_visible ();
|
||||||
|
|
||||||
/* We have to do this here since goto_editor_window() ends up calling show_all() on the
|
/* We have to do this here since goto_editor_window() ends up calling show_all() on the
|
||||||
|
@ -3170,8 +3168,6 @@ ARDOUR_UI::close_session()
|
||||||
if (get_session_parameters (true, false)) {
|
if (get_session_parameters (true, false)) {
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
goto_editor_window ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @param snap_name Snapshot name (without .ardour suffix).
|
/** @param snap_name Snapshot name (without .ardour suffix).
|
||||||
|
@ -3308,8 +3304,6 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
|
||||||
|
|
||||||
session_loaded = true;
|
session_loaded = true;
|
||||||
|
|
||||||
goto_editor_window ();
|
|
||||||
|
|
||||||
if (_session) {
|
if (_session) {
|
||||||
_session->set_clean ();
|
_session->set_clean ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -374,11 +374,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||||
|
|
||||||
Gtkmm2ext::Bindings _global_bindings;
|
Gtkmm2ext::Bindings _global_bindings;
|
||||||
|
|
||||||
void goto_editor_window ();
|
void show_editor ();
|
||||||
void goto_mixer_window ();
|
void show_mixer ();
|
||||||
void toggle_mixer_window ();
|
void show_application_preferences ();
|
||||||
void toggle_meterbridge ();
|
void toggle_meterbridge ();
|
||||||
void toggle_editor_mixer ();
|
|
||||||
|
|
||||||
int setup_windows ();
|
int setup_windows ();
|
||||||
void setup_transport ();
|
void setup_transport ();
|
||||||
|
|
|
@ -330,98 +330,39 @@ _hide_splash (gpointer arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::goto_editor_window ()
|
ARDOUR_UI::show_application_preferences ()
|
||||||
{
|
{
|
||||||
if (splash && splash->is_visible()) {
|
if (splash && splash->is_visible()) {
|
||||||
// in 2 seconds, hide the splash screen
|
// in 2 seconds, hide the splash screen
|
||||||
Glib::signal_timeout().connect (sigc::bind (sigc::ptr_fun (_hide_splash), this), 2000);
|
Glib::signal_timeout().connect (sigc::bind (sigc::ptr_fun (_hide_splash), this), 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!editor->window_visible()) {
|
rc_option_editor->make_visible ();
|
||||||
/* goto tab */
|
|
||||||
editor->show_tab ();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
editor->show_window ();
|
|
||||||
editor->present ();
|
|
||||||
|
|
||||||
/* editor should now be on top */
|
|
||||||
if (UIConfiguration::instance()->get_transients_follow_front()) {
|
|
||||||
WM::Manager::instance().set_transient_for (editor->own_window());
|
|
||||||
}
|
|
||||||
_mixer_on_top = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::goto_mixer_window ()
|
ARDOUR_UI::show_editor ()
|
||||||
{
|
{
|
||||||
Glib::RefPtr<Gdk::Window> win;
|
if (splash && splash->is_visible()) {
|
||||||
Glib::RefPtr<Gdk::Screen> screen;
|
// in 2 seconds, hide the splash screen
|
||||||
|
Glib::signal_timeout().connect (sigc::bind (sigc::ptr_fun (_hide_splash), this), 2000);
|
||||||
if (editor && editor->own_window()) {
|
|
||||||
win = editor->own_window ()->get_window();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (win) {
|
editor->make_visible ();
|
||||||
screen = win->get_screen();
|
|
||||||
} else {
|
|
||||||
screen = Gdk::Screen::get_default();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_getenv ("ARDOUR_LOVES_STUPID_TINY_SCREENS") == 0 && screen && screen->get_height() < 700) {
|
|
||||||
Gtk::MessageDialog msg (_("This screen is not tall enough to display the mixer window"));
|
|
||||||
msg.run ();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
mixer->show_window ();
|
|
||||||
|
|
||||||
// mixer->present ();
|
|
||||||
/* mixer should now be on top */
|
|
||||||
//if (UIConfiguration::instance().get_transients_follow_front()) {
|
|
||||||
// WM::Manager::instance().set_transient_for (mixer);
|
|
||||||
//}
|
|
||||||
|
|
||||||
_mixer_on_top = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_mixer_window ()
|
ARDOUR_UI::show_mixer ()
|
||||||
{
|
{
|
||||||
/* thse windows are created in ARDOUR_UI::setup_windows()
|
if (splash && splash->is_visible()) {
|
||||||
* it should be impossible to get here with any of them being NULL
|
// in 2 seconds, hide the splash screen
|
||||||
*/
|
Glib::signal_timeout().connect (sigc::bind (sigc::ptr_fun (_hide_splash), this), 2000);
|
||||||
assert (editor && mixer && meterbridge);
|
|
||||||
|
|
||||||
bool show = false;
|
|
||||||
bool obscuring = false;
|
|
||||||
|
|
||||||
if (!mixer->window_visible() || editor->window_visible()) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mixer->make_visible ();
|
||||||
|
|
||||||
if (!mixer->window_visible ()) {
|
|
||||||
show = true;
|
|
||||||
} else if ( (!editor->not_visible () && ARDOUR_UI_UTILS::windows_overlap (editor->own_window(), mixer->own_window()))
|
|
||||||
|| (!meterbridge->not_visible () && ARDOUR_UI_UTILS::windows_overlap (meterbridge, mixer->own_window()))
|
|
||||||
) {
|
|
||||||
obscuring = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (obscuring && (editor->own_window()->property_has_toplevel_focus() || meterbridge->property_has_toplevel_focus())) {
|
|
||||||
show = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (show) {
|
|
||||||
goto_mixer_window ();
|
|
||||||
} else {
|
|
||||||
mixer->own_window()->hide ();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::toggle_meterbridge ()
|
ARDOUR_UI::toggle_meterbridge ()
|
||||||
{
|
{
|
||||||
|
@ -450,47 +391,6 @@ ARDOUR_UI::toggle_meterbridge ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
ARDOUR_UI::toggle_editor_mixer ()
|
|
||||||
{
|
|
||||||
bool obscuring = false;
|
|
||||||
|
|
||||||
if (!mixer->window_visible() || !editor->window_visible()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (editor && mixer && mixer->own_window()) {
|
|
||||||
if (ARDOUR_UI_UTILS::windows_overlap (editor->own_window(), mixer->own_window())) {
|
|
||||||
obscuring = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mixer && !mixer->not_visible() && mixer->own_window() && mixer->own_window()->property_has_toplevel_focus()) {
|
|
||||||
if (obscuring) {
|
|
||||||
goto_editor_window();
|
|
||||||
}
|
|
||||||
} else if (editor && editor->window_visible() && editor->own_window()->property_has_toplevel_focus()) {
|
|
||||||
if (obscuring) {
|
|
||||||
goto_mixer_window();
|
|
||||||
}
|
|
||||||
} else if (mixer) {
|
|
||||||
if (obscuring) {
|
|
||||||
goto_mixer_window ();
|
|
||||||
}
|
|
||||||
} else if (editor) {
|
|
||||||
if (obscuring) {
|
|
||||||
goto_editor_window ();
|
|
||||||
}
|
|
||||||
} else if (obscuring) {
|
|
||||||
//it's unclear what to do here, so just do the opposite of what we did last time (old behavior)
|
|
||||||
if (_mixer_on_top) {
|
|
||||||
goto_editor_window ();
|
|
||||||
} else {
|
|
||||||
goto_mixer_window ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::new_midi_tracer_window ()
|
ARDOUR_UI::new_midi_tracer_window ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -215,6 +215,9 @@ ARDOUR_UI::install_actions ()
|
||||||
common_actions = ActionGroup::create (X_("Common"));
|
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_("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_("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));
|
||||||
|
|
||||||
/* windows visibility actions */
|
/* windows visibility actions */
|
||||||
|
|
||||||
|
@ -232,8 +235,6 @@ ARDOUR_UI::install_actions ()
|
||||||
if (Profile->get_mixbus())
|
if (Profile->get_mixbus())
|
||||||
ActionManager::register_action (common_actions, X_("show-ui-prefs"), _("Show more UI preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_ui_prefs));
|
ActionManager::register_action (common_actions, X_("show-ui-prefs"), _("Show more UI preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_ui_prefs));
|
||||||
|
|
||||||
ActionManager::register_action (common_actions, X_("toggle-mixer"), S_("Window|Mixer"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_mixer_window));
|
|
||||||
ActionManager::register_action (common_actions, X_("toggle-editor-mixer"), _("Toggle Editor+Mixer"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_editor_mixer));
|
|
||||||
ActionManager::register_action (common_actions, X_("toggle-meterbridge"), S_("Window|Meterbridge"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_meterbridge));
|
ActionManager::register_action (common_actions, X_("toggle-meterbridge"), S_("Window|Meterbridge"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_meterbridge));
|
||||||
|
|
||||||
ActionManager::register_action (common_actions, X_("reattach-all-tearoffs"), _("Reattach All Tearoffs"), sigc::mem_fun (*this, &ARDOUR_UI::reattach_all_tearoffs));
|
ActionManager::register_action (common_actions, X_("reattach-all-tearoffs"), _("Reattach All Tearoffs"), sigc::mem_fun (*this, &ARDOUR_UI::reattach_all_tearoffs));
|
||||||
|
|
|
@ -157,7 +157,7 @@ This mode provides many different operations on both regions and control points,
|
||||||
@sess|Main/ExportAudio|<@SECONDARY@>e|export session
|
@sess|Main/ExportAudio|<@SECONDARY@>e|export session
|
||||||
@select|Editor/select-all-after-edit-cursor|<@PRIMARY@><@TERTIARY@>e|select all after EP
|
@select|Editor/select-all-after-edit-cursor|<@PRIMARY@><@TERTIARY@>e|select all after EP
|
||||||
@vis|Editor/show-editor-mixer|<@TERTIARY@>e|toggle editor window mixer
|
@vis|Editor/show-editor-mixer|<@TERTIARY@>e|toggle editor window mixer
|
||||||
@wvis|Common/goto-editor|<@SECONDARY@>e|toggle editor window
|
@wvis|Common/goto-editor|<@SECONDARY@>e|show editor tab/window
|
||||||
@mmode|MouseMode/set-mouse-mode-range|r|range mode
|
@mmode|MouseMode/set-mouse-mode-range|r|range mode
|
||||||
@edit|Editor/redo|<@PRIMARY@>r|redo
|
@edit|Editor/redo|<@PRIMARY@>r|redo
|
||||||
@trans|Transport/Record|<@TERTIARY@>r|engage record
|
@trans|Transport/Record|<@TERTIARY@>r|engage record
|
||||||
|
|
|
@ -153,7 +153,6 @@ class ProxyWithConstructor: public ProxyBase
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::function<T*()> creator;
|
boost::function<T*()> creator;
|
||||||
>>>>>>> first compilable version of tabbable design.
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user