along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#include <fcntl.h>
#include <ardour/audioengine.h>
#include <ardour/ardour.h>
+#include <ardour/profile.h>
#include <ardour/route.h>
#include "ardour_ui.h"
#include "audio_clock.h"
#include "actions.h"
#include "utils.h"
+#include "theme_manager.h"
#include "i18n.h"
setup_clock ();
setup_transport();
- setup_adjustables ();
build_menu_bar ();
+ theme_manager->signal_unmap().connect (bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleThemeManager")));
+
+#ifdef TOP_MENUBAR
+ HBox* status_bar_packer = manage (new HBox);
+
+ status_bar_label.set_size_request (300, -1);
+ status_bar_packer->pack_start (status_bar_label, true, true, 6);
+ status_bar_packer->pack_start (error_log_button, false, false);
+
+ error_log_button.signal_clicked().connect (mem_fun (*this, &UI::toggle_errors));
+
+ editor->get_status_bar_packer().pack_start (*status_bar_packer, true, true);
+ editor->get_status_bar_packer().pack_start (menu_bar_base, false, false, 6);
+#else
top_packer.pack_start (menu_bar_base, false, false);
+#endif
top_packer.pack_start (transport_frame, false, false);
editor->add_toplevel_controls (top_packer);
}
void
-ARDOUR_UI::setup_adjustables ()
+ARDOUR_UI::display_message (const char *prefix, gint prefix_len, RefPtr<TextBuffer::Tag> ptag, RefPtr<TextBuffer::Tag> mtag, const char *msg)
{
- adjuster_table.set_homogeneous (true);
-
- online_control_strings.push_back (_("MMC + Local"));
- online_control_strings.push_back (_("MMC"));
- online_control_strings.push_back (_("Local"));
-
- online_control_button = new GlobalClickBox ("CONTROL",
- online_control_strings);
-
- online_control_button->adjustment.signal_value_changed().connect(mem_fun(*this,&ARDOUR_UI::control_methods_adjusted));
+ ustring text;
- mmc_id_strings.push_back ("1");
- mmc_id_strings.push_back ("2");
- mmc_id_strings.push_back ("3");
- mmc_id_strings.push_back ("4");
- mmc_id_strings.push_back ("5");
- mmc_id_strings.push_back ("6");
- mmc_id_strings.push_back ("7");
- mmc_id_strings.push_back ("8");
- mmc_id_strings.push_back ("9");
+ UI::display_message (prefix, prefix_len, ptag, mtag, msg);
+#ifdef TOP_MENUBAR
- mmc_id_button = new GlobalClickBox (_("MMC ID"), mmc_id_strings);
+ if (strcmp (prefix, _("[ERROR]: ")) == 0) {
+ text = "<span color=\"red\" weight=\"bold\">";
+ } else if (strcmp (prefix, _("[WARNING]: ")) == 0) {
+ text = "<span color=\"yellow\" weight=\"bold\">";
+ } else if (strcmp (prefix, _("[INFO]: ")) == 0) {
+ text = "<span color=\"green\" weight=\"bold\">";
+ } else {
+ text = "<span color=\"blue\" weight=\"bold\">???";
+ }
- mmc_id_button->adjustment.signal_value_changed().connect (mem_fun(*this,&ARDOUR_UI::mmc_device_id_adjusted));
+ text += prefix;
+ text += "</span>";
+ text += msg;
- adjuster_table.attach (*online_control_button, 0, 2, 1, 2, FILL|EXPAND, FILL, 5, 5);
- adjuster_table.attach (*mmc_id_button, 2, 3, 1, 2, FILL, FILL, 5, 5);
+ status_bar_label.set_markup (text);
+#endif
}
void
/* clocks, etc. */
- ARDOUR_UI::Clock.connect (bind (mem_fun (primary_clock, &AudioClock::set), false));
- ARDOUR_UI::Clock.connect (bind (mem_fun (secondary_clock, &AudioClock::set), false));
+ ARDOUR_UI::Clock.connect (bind (mem_fun (primary_clock, &AudioClock::set), 1));
+ ARDOUR_UI::Clock.connect (bind (mem_fun (secondary_clock, &AudioClock::set), 2));
primary_clock.ValueChanged.connect (mem_fun(*this, &ARDOUR_UI::primary_clock_value_changed));
secondary_clock.ValueChanged.connect (mem_fun(*this, &ARDOUR_UI::secondary_clock_value_changed));
+ big_clock.ValueChanged.connect (mem_fun(*this, &ARDOUR_UI::big_clock_value_changed));
ARDOUR_UI::instance()->tooltips().set_tip (primary_clock, _("Primary clock"));
ARDOUR_UI::instance()->tooltips().set_tip (secondary_clock, _("secondary clock"));
transport_tearoff_hbox.pack_start (*svbox, false, false, 3);
transport_tearoff_hbox.pack_start (auto_loop_button, false, false);
- transport_tearoff_hbox.pack_start (play_selection_button, false, false);
+ if (!Profile->get_sae()) {
+ transport_tearoff_hbox.pack_start (play_selection_button, false, false);
+ }
transport_tearoff_hbox.pack_start (roll_button, false, false);
transport_tearoff_hbox.pack_start (stop_button, false, false);
transport_tearoff_hbox.pack_start (rec_button, false, false, 6);
HBox* clock_box = manage (new HBox);
clock_box->pack_start (primary_clock, false, false);
- clock_box->pack_start (secondary_clock, false, false);
- VBox* time_controls_box = manage (new VBox);
- time_controls_box->pack_start (sync_option_combo, false, false);
- time_controls_box->pack_start (time_master_button, false, false);
- clock_box->pack_start (*time_controls_box, false, false, 1);
+ if (!ARDOUR::Profile->get_small_screen()) {
+ clock_box->pack_start (secondary_clock, false, false);
+ }
+
+ if (!Profile->get_sae()) {
+ VBox* time_controls_box = manage (new VBox);
+ time_controls_box->pack_start (sync_option_combo, false, false);
+ time_controls_box->pack_start (time_master_button, false, false);
+ clock_box->pack_start (*time_controls_box, false, false, 1);
+ }
+
transport_tearoff_hbox.pack_start (*clock_box, false, false, 0);
-
+
HBox* toggle_box = manage(new HBox);
VBox* punch_box = manage (new VBox);
transport_tearoff_hbox.pack_start (*toggle_box, false, false, 4);
transport_tearoff_hbox.pack_start (alert_box, false, false);
+
+ if (Profile->get_sae()) {
+ Image* img = manage (new Image ((::get_icon (X_("sae")))));
+ transport_tearoff_hbox.pack_end (*img, false, false, 6);
+ }
}
void
shuttle_grabbed = false;
shuttle_box.remove_modal_grab ();
if (Config->get_shuttle_behaviour() == Sprung) {
- if (Config->get_auto_play() || roll_button.get_state()) {
+ if (Config->get_auto_play() || roll_button.get_visual_state()) {
shuttle_fract = SHUTTLE_FRACT_SPEED1;
session->request_transport_speed (1.0);
stop_button.set_visual_state (0);
return true;
case 3:
+ default:
return true;
-
- case 4:
- shuttle_fract += 0.005;
- break;
- case 5:
- shuttle_fract -= 0.005;
- break;
+
}
use_shuttle_fract (true);
ARDOUR_UI::sync_option_changed ()
{
if (session) {
- session->request_slave_source (string_to_slave_source (sync_option_combo.get_active_text()));
+ ustring txt = sync_option_combo.get_active_text ();
+ if (txt.length()) {
+ session->request_slave_source (string_to_slave_source (txt));
+ }
}
}