<menuitem action='set-tempo-from-edit-range'/>
</menu>
<menuitem action='set-mouse-mode-object-range'/>
- <menuitem action='show-application-preferences'/>
+ <menuitem action='show-preferences'/>
</menu>
<menu name='RegionMenu' action='RegionMenu'>
<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'/>
+ <menuitem action='show-preferences'/>
+ <menuitem action='hide-preferences'/>
+ <menuitem action='attach-preferences'/>
+ <menuitem action='detach-preferences'/>
</menu>
<menuitem action='toggle-meterbridge'/>
<separator/>
}
rc_option_editor = new RCOptionEditor;
- rc_option_editor->add_to_notebook (_tabs, _("Preferences"));
- rc_option_editor->contents().show_all ();
rc_option_editor->StateChange.connect (sigc::mem_fun (*this, &ARDOUR_UI::tabbable_state_change));
+ rc_option_editor->add_to_notebook (_tabs, _("Preferences"));
/* all other dialogs are created conditionally */
WindowTitle title (Glib::get_application_name());
_main_window.set_title (title.get_string());
}
+
}
#include "splash.h"
#include "route_params_ui.h"
#include "opts.h"
+#include "utils.h"
+
#include "i18n.h"
using namespace Gtk;
editor->setup_tooltips ();
editor->UpdateAllTransportClocks.connect (sigc::mem_fun (*this, &ARDOUR_UI::update_transport_clocks));
- editor->add_to_notebook (_tabs, _("Editor"));
- mixer->add_to_notebook (_tabs, _("Mixer"));
+ /* catch up on tabbable state */
+
+ std::cerr << "Tab catch up\n";
+
+ tabbable_state_change (*editor);
+ tabbable_state_change (*mixer);
+ tabbable_state_change (*rc_option_editor);
+
+ std::cerr << "Tab catch done\n";
/* all actions are defined */
editor->track_mixer_selection ();
mixer->track_editor_selection ();
+
+ /* catch up on parameters */
+
+ boost::function<void (std::string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
+ Config->map_parameters (pc);
+
+ ARDOUR_UI_UTILS::reset_dpi ();
}
void
try {
editor = new Editor ();
editor->StateChange.connect (sigc::mem_fun (*this, &ARDOUR_UI::tabbable_state_change));
+ editor->add_to_notebook (_tabs, _("Editor"));
}
catch (failed_constructor& err) {
return -1;
}
-
- editor->Realized.connect (sigc::mem_fun (*this, &ARDOUR_UI::editor_realized));
editor->signal_event().connect (sigc::bind (sigc::ptr_fun (&Keyboard::catch_user_event_for_pre_dialog_focus), editor));
return 0;
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_("show-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_("hide-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_("attach-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));
+ ActionManager::register_action (common_actions, X_("detach-preferences"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), rc_option_editor));
/* windows visibility actions */
try {
mixer = Mixer_UI::instance ();
mixer->StateChange.connect (sigc::mem_fun (*this, &ARDOUR_UI::tabbable_state_change));
+ mixer->add_to_notebook (_tabs, _("Mixer"));
}
catch (failed_constructor& err) {
void hide_tab ();
void tab_close_clicked ();
void show_own_window (bool and_pack_it);
+ void window_mapped ();
+ void window_unmapped ();
};
, tab_requested_by_state (true)
{
/* make the image about the same size as an actual X */
- set_size_request_to_display_given_text (tab_close_image, "X", 0, 0);
+ tab_close_image.set_size_request (15,15);
+ // set_size_request_to_display_given_text (tab_close_image, "X", 0, 0);
_tab_box.set_spacing (2);
_tab_box.pack_start (_tab_label, true, true);
_own_notebook.show ();
_own_notebook.set_show_tabs (false);
+ _window->signal_map().connect (sigc::mem_fun (*this, &Tabbable::window_mapped));
+ _window->signal_unmap().connect (sigc::mem_fun (*this, &Tabbable::window_unmapped));
+
/* do other window-related setup */
setup ();
_window->show_all ();
_window->present ();
- StateChange (*this);
}
Gtk::Notebook*
{
if (_window && (current_toplevel() == _window)) {
_window->hide ();
- StateChange (*this);
} else {
hide_tab ();
}
{
if (!window_visible() && _parent_notebook) {
if (_contents.get_parent() == 0) {
+ tab_requested_by_state = true;
add_to_notebook (*_parent_notebook, _tab_title);
}
_parent_notebook->set_current_page (_parent_notebook->page_num (_contents));
- StateChange (*this);
}
}
bool
Tabbable::tabbed () const
{
- return _parent_notebook && (_parent_notebook->page_num (_contents) > 0);
+ return _parent_notebook && (_parent_notebook->page_num (_contents) >= 0);
}
XMLNode&
}
if (tab_requested_by_state) {
+
+ std::cerr << name() << " pn " << _parent_notebook << std::endl;
+ if (_parent_notebook) {
+ std::cerr << "\t page " << _parent_notebook->page_num (_contents) << std::endl;
+ }
+
attach ();
} else {
/* this does nothing if not tabbed */
return ret;
}
+void
+Tabbable::window_mapped ()
+{
+ StateChange (*this);
+}
+
+void
+Tabbable::window_unmapped ()
+{
+ StateChange (*this);
+}
+