{
if (!AudioEngine::instance()->connected()) {
MessageDialog msg (parent, string_compose (
- _("%1 is not connected to any audio backend.\n"
- "You cannot open or close sessions in this condition"),
+ _("%1 is not connected to any audio backend.\n"
+ "You cannot open or close sessions in this condition"),
PROGRAM_NAME));
pop_back_splash (msg);
msg.run ();
void
ARDOUR_UI::open_session ()
{
- if (!check_audioengine(*editor)) {
+ if (!check_audioengine (_main_window)) {
return;
}
{
ArdourPrompter prompter (true);
- if (!check_audioengine(*editor)) {
+ if (!check_audioengine (_main_window)) {
return;
}
void
ARDOUR_UI::close_session()
{
- if (!check_audioengine(*editor)) {
+ if (!check_audioengine (_main_window)) {
return;
}
}
}
+void
+ARDOUR_UI::cancel_solo ()
+{
+ if (_session) {
+ if (_session->soloing()) {
+ _session->set_solo (_session->get_routes(), false);
+ } else if (_session->listening()) {
+ _session->set_listen (_session->get_routes(), false);
+ }
+
+ _session->clear_all_solo_state (_session->get_routes()); // safeguard, ideally this won't do anything, check the log-window
+ }
+}
class ProgressBar;
}
+namespace Gtkmm2ext {
+ class Tabbable;
+}
+
class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
{
public:
#include "mixer_ui.h"
#include "keyboard.h"
#include "splash.h"
+#include "rc_option_editor.h"
#include "route_params_ui.h"
#include "opts.h"
#include "utils.h"
boost::function<void (std::string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
Config->map_parameters (pc);
- ARDOUR_UI_UTILS::reset_dpi ();
+ UIConfiguration::instance().reset_dpi ();
}
void
#include "global_port_matrix.h"
#include "location_ui.h"
#include "main_clock.h"
+#include "rc_option_editor.h"
#include <gtkmm2ext/application.h>
build_snap_type_menu();
build_edit_point_menu();
- location_marker_color = ARDOUR_UI::config()->color ("location marker");
- location_range_color = ARDOUR_UI::config()->color ("location range");
- location_cd_marker_color = ARDOUR_UI::config()->color ("location cd marker");
- location_loop_color = ARDOUR_UI::config()->color ("location loop");
- location_punch_color = ARDOUR_UI::config()->color ("location punch");
+ location_marker_color = UIConfiguration::instance().color ("location marker");
+ location_range_color = UIConfiguration::instance().color ("location range");
+ location_cd_marker_color = UIConfiguration::instance().color ("location cd marker");
+ location_loop_color = UIConfiguration::instance().color ("location loop");
+ location_punch_color = UIConfiguration::instance().color ("location punch");
timebar_height = std::max(12., ceil (15. * ARDOUR_UI::ui_scale));
return;
}
- if (!UIConfiguration::instance()->get_autoscroll_editor () || autoscroll_active ()) {
+ if (!UIConfiguration::instance().get_autoscroll_editor () || autoscroll_active ()) {
return;
}
#endif
#include "ardour_window.h"
+#include "ardour_ui.h"
#include "prompter.h"
#include "plugin_ui.h"
#include "utils.h"
}
}
return true;
- } else {
- /* for us to be getting key press events, there really
- MUST be a _pluginui, but just to be safe, check ...
- */
-
- if (_pluginui) {
- _pluginui->grab_focus();
- if (_pluginui->non_gtk_gui()) {
- /* pass main window as the window for the event
- to be handled in, not this one, because there are
- no widgets in this window that we want to have
- key focus.
- */
- return relay_key_press (event, &ARDOUR_UI::instance()->main_window());
- } else {
- return relay_key_press (event, this);
- }
+ }
+ /* for us to be getting key press events, there really
+ MUST be a _pluginui, but just to be safe, check ...
+ */
+
+ if (_pluginui) {
+ _pluginui->grab_focus();
+ if (_pluginui->non_gtk_gui()) {
+ /* pass main window as the window for the event
+ to be handled in, not this one, because there are
+ no widgets in this window that we want to have
+ key focus.
+ */
+ return relay_key_press (event, &ARDOUR_UI::instance()->main_window());
} else {
- return false;
+ return relay_key_press (event, this);
}
- }
+ }
+
+ return false;
}
bool
#include "ardour_window.h"
#include "ardour_dialog.h"
+#include "ardour_ui.h"
#include "gui_thread.h"
#include "meter_patterns.h"
#include "midi_tracer.h"
#include "gui_thread.h"
#include "ui_config.h"
#include "ardour_dialog.h"
+#include "ardour_ui.h"
using namespace std;
using namespace Gtk;