2005-09-25 14:42:24 -04:00
|
|
|
/*
|
|
|
|
Copyright (C) 2000 Paul Davis
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* this file exists solely to break compilation dependencies that
|
|
|
|
would connect changes to the mixer or editor objects.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <cstdio>
|
2005-11-29 17:48:54 -05:00
|
|
|
|
|
|
|
#include <gtkmm/accelmap.h>
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
#include <pbd/error.h>
|
|
|
|
#include "ardour_ui.h"
|
|
|
|
#include "public_editor.h"
|
|
|
|
#include "mixer_ui.h"
|
|
|
|
#include "keyboard.h"
|
|
|
|
#include "route_params_ui.h"
|
|
|
|
#include "i18n.h"
|
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
using namespace sigc;
|
2005-11-29 17:48:54 -05:00
|
|
|
using namespace Gtk;
|
2006-06-21 19:01:03 -04:00
|
|
|
using namespace PBD;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
namespace ARDOUR {
|
|
|
|
class Session;
|
|
|
|
class Route;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::shutdown ()
|
|
|
|
{
|
|
|
|
if (session) {
|
|
|
|
delete session;
|
|
|
|
session = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::we_have_dependents ()
|
|
|
|
{
|
|
|
|
setup_keybindings ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::setup_keybindings ()
|
|
|
|
{
|
2005-11-28 10:29:49 -05:00
|
|
|
install_actions ();
|
|
|
|
RedirectBox::register_actions ();
|
2006-01-24 07:38:33 -05:00
|
|
|
|
2006-03-12 11:19:03 -05:00
|
|
|
std::string key_binding_file = ARDOUR::find_config_file("ardour.bindings");
|
2005-11-29 17:48:54 -05:00
|
|
|
|
|
|
|
try {
|
2006-01-24 07:38:33 -05:00
|
|
|
AccelMap::load (key_binding_file);
|
2005-11-29 17:48:54 -05:00
|
|
|
} catch (...) {
|
|
|
|
error << "ardour key bindings file not found" << endmsg;
|
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::connect_dependents_to_session (ARDOUR::Session *s)
|
|
|
|
{
|
|
|
|
editor->connect_to_session (s);
|
|
|
|
mixer->connect_to_session (s);
|
2006-09-07 11:07:14 -04:00
|
|
|
|
|
|
|
/* its safe to do this now */
|
|
|
|
|
|
|
|
s->restore_history (s->snap_name());
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
ARDOUR_UI::goto_editor_window ()
|
|
|
|
{
|
|
|
|
editor->show_window ();
|
2005-10-05 09:48:09 -04:00
|
|
|
editor->present();
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
void
|
|
|
|
ARDOUR_UI::goto_mixer_window ()
|
|
|
|
{
|
|
|
|
mixer->show_window ();
|
2005-10-05 09:48:09 -04:00
|
|
|
mixer->present();
|
2005-09-25 14:42:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
gint
|
|
|
|
ARDOUR_UI::exit_on_main_window_close (GdkEventAny *ev)
|
|
|
|
{
|
|
|
|
finish();
|
|
|
|
return TRUE;
|
|
|
|
}
|