mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
145 lines
3.4 KiB
C++
145 lines
3.4 KiB
C++
|
|
/*
|
||
|
|
* Copyright (C) 2005-2024 Paul Davis <paul@linuxaudiosystems.com>
|
||
|
|
* Copyright (C) 2013-2024 Robin Gareus <robin@gareus.org>
|
||
|
|
* Copyright (C) 2014-2024 Ben Loftis <ben@harrisonconsoles.com>
|
||
|
|
*
|
||
|
|
* 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.,
|
||
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||
|
|
*/
|
||
|
|
|
||
|
|
#ifdef WAF_BUILD
|
||
|
|
#include "gtk2ardour-config.h"
|
||
|
|
#include "gtk2ardour-version.h"
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#include <glib.h>
|
||
|
|
#include "pbd/gstdio_compat.h"
|
||
|
|
|
||
|
|
#include <gtkmm/accelmap.h>
|
||
|
|
#include <gtkmm/messagedialog.h>
|
||
|
|
#include <gtkmm/stock.h>
|
||
|
|
#include <gtkmm/uimanager.h>
|
||
|
|
|
||
|
|
#include "pbd/error.h"
|
||
|
|
#include "pbd/compose.h"
|
||
|
|
#include "pbd/convert.h"
|
||
|
|
#include "pbd/failed_constructor.h"
|
||
|
|
#include "pbd/memento_command.h"
|
||
|
|
#include "pbd/openuri.h"
|
||
|
|
#include "pbd/types_convert.h"
|
||
|
|
#include "pbd/file_utils.h"
|
||
|
|
#include <pbd/localtime_r.h>
|
||
|
|
#include "pbd/pthread_utils.h"
|
||
|
|
#include "pbd/replace_all.h"
|
||
|
|
#include "pbd/scoped_file_descriptor.h"
|
||
|
|
#include "pbd/xml++.h"
|
||
|
|
|
||
|
|
#include "gtkmm2ext/application.h"
|
||
|
|
#include "gtkmm2ext/bindings.h"
|
||
|
|
#include "gtkmm2ext/gtk_ui.h"
|
||
|
|
#include "gtkmm2ext/utils.h"
|
||
|
|
#include "gtkmm2ext/window_title.h"
|
||
|
|
|
||
|
|
#include "widgets/tooltips.h"
|
||
|
|
|
||
|
|
#include "ardour/ardour.h"
|
||
|
|
#include "ardour/audioengine.h"
|
||
|
|
#include "ardour/profile.h"
|
||
|
|
#include "ardour/revision.h"
|
||
|
|
#include "ardour/transport_master.h"
|
||
|
|
#include "ardour/transport_master_manager.h"
|
||
|
|
#include "ardour/triggerbox.h"
|
||
|
|
#include "ardour/track.h"
|
||
|
|
#include "ardour/vca_manager.h"
|
||
|
|
#include "ardour/utils.h"
|
||
|
|
|
||
|
|
#include "control_protocol/basic_ui.h"
|
||
|
|
|
||
|
|
#include "actions.h"
|
||
|
|
#include "application_bar.h"
|
||
|
|
#include "ardour_ui.h"
|
||
|
|
#include "debug.h"
|
||
|
|
#include "gui_object.h"
|
||
|
|
#include "gui_thread.h"
|
||
|
|
#include "keyboard.h"
|
||
|
|
#include "keyeditor.h"
|
||
|
|
#include "luainstance.h"
|
||
|
|
#include "main_clock.h"
|
||
|
|
#include "meter_patterns.h"
|
||
|
|
#include "mixer_ui.h"
|
||
|
|
#include "public_editor.h"
|
||
|
|
#include "rc_option_editor.h"
|
||
|
|
#include "recorder_ui.h"
|
||
|
|
#include "session_dialog.h"
|
||
|
|
#include "session_option_editor.h"
|
||
|
|
#include "splash.h"
|
||
|
|
#include "time_info_box.h"
|
||
|
|
#include "timers.h"
|
||
|
|
#include "trigger_page.h"
|
||
|
|
#include "triggerbox_ui.h"
|
||
|
|
#include "utils.h"
|
||
|
|
|
||
|
|
#include "pbd/i18n.h"
|
||
|
|
|
||
|
|
using namespace ARDOUR;
|
||
|
|
using namespace ARDOUR_UI_UTILS;
|
||
|
|
using namespace PBD;
|
||
|
|
using namespace Gtkmm2ext;
|
||
|
|
using namespace ArdourWidgets;
|
||
|
|
using namespace Gtk;
|
||
|
|
using namespace std;
|
||
|
|
|
||
|
|
static const gchar *_record_mode_strings[] = {
|
||
|
|
N_("Layered"),
|
||
|
|
N_("Non-Layered"),
|
||
|
|
N_("Snd on Snd"),
|
||
|
|
0
|
||
|
|
};
|
||
|
|
|
||
|
|
ApplicationBar::ApplicationBar ()
|
||
|
|
: _have_layout (false)
|
||
|
|
, _basic_ui (0)
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
ApplicationBar::~ApplicationBar ()
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
void
|
||
|
|
ApplicationBar::on_parent_changed (Gtk::Widget*)
|
||
|
|
{
|
||
|
|
assert (!_have_layout);
|
||
|
|
_have_layout = true;
|
||
|
|
|
||
|
|
_transport_ctrl.setup (ARDOUR_UI::instance ());
|
||
|
|
_transport_ctrl.map_actions ();
|
||
|
|
|
||
|
|
pack_start(_transport_ctrl, false, false);
|
||
|
|
}
|
||
|
|
|
||
|
|
void
|
||
|
|
ApplicationBar::set_session (Session *s)
|
||
|
|
{
|
||
|
|
SessionHandlePtr::set_session (s);
|
||
|
|
|
||
|
|
_transport_ctrl.set_session (s);
|
||
|
|
|
||
|
|
if (_basic_ui) {
|
||
|
|
delete _basic_ui;
|
||
|
|
}
|
||
|
|
|
||
|
|
_basic_ui = new BasicUI (*s);
|
||
|
|
}
|