slowly fixing up ArdourDialog nonsense
[ardour.git] / gtk2_ardour / ardour_ui_dependents.cc
1 /*
2     Copyright (C) 2000 Paul Davis 
3
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.
8
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.
13
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.
17
18     $Id$
19 */
20
21 /* this file exists solely to break compilation dependencies that
22    would connect changes to the mixer or editor objects.
23 */
24
25 #include <cstdio>
26 #include <pbd/error.h>
27 #include "ardour_ui.h"
28 #include "public_editor.h"
29 #include "mixer_ui.h"
30 #include "keyboard.h"
31 #include "route_params_ui.h"
32 #include "i18n.h"
33
34 using namespace sigc;
35
36
37 namespace ARDOUR {
38         class Session;
39         class Route;
40 }
41
42 void
43 ARDOUR_UI::shutdown ()
44 {
45         if (session) {
46                 delete session;
47                 session = 0;
48         }
49
50 }
51
52 void
53 ARDOUR_UI::we_have_dependents ()
54 {
55         setup_keybindings ();
56 }
57
58 void
59 ARDOUR_UI::setup_keybindings ()
60 {
61         // GTK2FIX
62         editor->register_actions ();
63 }
64
65 void
66 ARDOUR_UI::connect_dependents_to_session (ARDOUR::Session *s)
67 {
68         editor->connect_to_session (s);
69         mixer->connect_to_session (s);
70 }
71
72 void
73 ARDOUR_UI::goto_editor_window ()
74 {
75         editor->show_window ();
76         editor->present();
77 }
78 void
79 ARDOUR_UI::goto_mixer_window ()
80 {
81         mixer->show_window ();
82         mixer->present();
83 }
84
85 gint
86 ARDOUR_UI::exit_on_main_window_close (GdkEventAny *ev)
87 {
88         finish();
89         return TRUE;
90 }