2 Copyright (C) 2000 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include "gtk2ardour-config.h"
24 /* this file exists solely to break compilation dependencies that
25 would connect changes to the mixer or editor objects.
30 #include "pbd/error.h"
32 #include "ardour/session.h"
35 #include "ardour_ui.h"
36 #include "public_editor.h"
37 #include "meterbridge.h"
41 #include "route_params_ui.h"
55 using namespace ARDOUR;
58 ARDOUR_UI::we_have_dependents ()
61 ProcessorBox::register_actions ();
62 keyboard->setup_keybindings ();
63 editor->setup_tooltips ();
64 editor->UpdateAllTransportClocks.connect (sigc::mem_fun (*this, &ARDOUR_UI::update_transport_clocks));
66 /* catch up on tabbable state */
68 std::cerr << "Tab catch up\n";
70 tabbable_state_change (*editor);
71 tabbable_state_change (*mixer);
72 tabbable_state_change (*rc_option_editor);
74 std::cerr << "Tab catch done\n";
76 /* all actions are defined */
78 ActionManager::enable_accelerators ();
79 ActionManager::load_menus (ARDOUR_COMMAND_LINE::menus_file);
81 editor->track_mixer_selection ();
82 mixer->track_editor_selection ();
84 /* catch up on parameters */
86 boost::function<void (std::string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
87 Config->map_parameters (pc);
89 ARDOUR_UI_UTILS::reset_dpi ();
93 ARDOUR_UI::connect_dependents_to_session (ARDOUR::Session *s)
96 BootMessage (_("Setup Editor"));
97 editor->set_session (s);
98 BootMessage (_("Setup Mixer"));
99 mixer->set_session (s);
100 meterbridge->set_session (s);
102 /* its safe to do this now */
104 BootMessage (_("Reload Session History"));
105 s->restore_history ("");
108 /** The main editor window has been closed */
110 ARDOUR_UI::exit_on_main_window_close (GdkEventAny * /*ev*/)
113 /* just hide the window, and return - the top menu stays up */
117 /* time to get out of here */
124 ARDOUR_UI::tab_window_root_drop (GtkNotebook* src,
131 Gtk::Notebook* nb = 0;
132 Gtk::Window* win = 0;
133 Gtkmm2ext::Tabbable* tabbable = 0;
136 if (w == GTK_WIDGET(editor->contents().gobj())) {
138 } else if (w == GTK_WIDGET(mixer->contents().gobj())) {
140 } else if (w == GTK_WIDGET(rc_option_editor->contents().gobj())) {
141 tabbable = rc_option_editor;
146 nb = tabbable->tab_root_drop ();
147 win = tabbable->own_window ();
156 return 0; /* what was that? */