stupid hack to fix issues with OS X Carbon headers
[ardour.git] / gtk2_ardour / ardour_ui2.cc
index e631173a36496381feed1c67b9d40f2a43d33c56..6b637e214ec9ce13f72c79dcd49240a7086e1b96 100644 (file)
@@ -114,6 +114,7 @@ ARDOUR_UI::setup_windows ()
        editor->add_toplevel_controls (top_packer);
 
        setup_transport();
+
        build_menu_bar ();
 
        setup_tooltips ();
@@ -294,10 +295,12 @@ ARDOUR_UI::setup_transport ()
        act = ActionManager::get_action (X_("Transport"), X_("ToggleExternalSync"));
        sync_button.set_related_action (act);
 
+       join_play_range_button.signal_clicked.connect (sigc::mem_fun (*this, &ARDOUR_UI::join_play_range_clicked));
+
        /* clocks, etc. */
 
-       ARDOUR_UI::Clock.connect (sigc::bind (sigc::mem_fun (primary_clock, &AudioClock::set), 'p'));
-       ARDOUR_UI::Clock.connect (sigc::bind (sigc::mem_fun (secondary_clock, &AudioClock::set), 's'));
+       ARDOUR_UI::Clock.connect (sigc::mem_fun (primary_clock, &AudioClock::set));
+       ARDOUR_UI::Clock.connect (sigc::mem_fun (secondary_clock, &AudioClock::set));
 
        primary_clock->ValueChanged.connect (sigc::mem_fun(*this, &ARDOUR_UI::primary_clock_value_changed));
        secondary_clock->ValueChanged.connect (sigc::mem_fun(*this, &ARDOUR_UI::secondary_clock_value_changed));
@@ -370,7 +373,7 @@ ARDOUR_UI::setup_transport ()
        tbox->pack_start (rec_button, false, false, 6);
 
        HBox* clock_box = manage (new HBox);
-       clock_box->set_border_width (2);
+
        primary_clock->set_border_width (2);
        clock_box->pack_start (*primary_clock, false, false);
        if (!ARDOUR::Profile->get_small_screen()) {
@@ -378,7 +381,6 @@ ARDOUR_UI::setup_transport ()
                clock_box->pack_start (*secondary_clock, false, false);
        }
 
-
        shuttle_box = new ShuttleControl;
        shuttle_box->show ();
 
@@ -462,10 +464,8 @@ ARDOUR_UI::soloing_changed (bool onoff)
 void
 ARDOUR_UI::_auditioning_changed (bool onoff)
 {
-       if (auditioning_alert_button.get_active() != onoff) {
-               auditioning_alert_button.set_active (onoff);
-               set_transport_sensitivity (!onoff);
-       }
+       auditioning_alert_button.set_active (onoff);
+       set_transport_sensitivity (!onoff);
 }
 
 void
@@ -511,13 +511,12 @@ ARDOUR_UI::solo_blink (bool onoff)
 
        if (_session->soloing() || _session->listening()) {
                if (onoff) {
-                       solo_alert_button.set_state (STATE_ACTIVE);
+                       solo_alert_button.set_active (true);
                } else {
-                       solo_alert_button.set_state (STATE_NORMAL);
+                       solo_alert_button.set_active (false);
                }
        } else {
                solo_alert_button.set_active (false);
-               solo_alert_button.set_state (STATE_NORMAL);
        }
 }
 
@@ -526,7 +525,7 @@ ARDOUR_UI::sync_blink (bool onoff)
 {
        if (_session == 0 || !_session->config.get_external_sync()) {
                /* internal sync */
-               sync_button.unset_active_state ();
+               sync_button.set_active (false);
                return;
        }
 
@@ -534,13 +533,13 @@ ARDOUR_UI::sync_blink (bool onoff)
                /* not locked, so blink on and off according to the onoff argument */
 
                if (onoff) {
-                       sync_button.set_active_state (Gtkmm2ext::Active); // "-active"
+                       sync_button.set_active (true);
                } else {
-                       sync_button.unset_active_state (); // normal
+                       sync_button.set_active (false);
                }
        } else {
                /* locked */
-                 sync_button.set_active_state (Gtkmm2ext::Active); // "-active"
+               sync_button.set_active (true);
        }
 }
 
@@ -553,12 +552,12 @@ ARDOUR_UI::audition_blink (bool onoff)
 
        if (_session->is_auditioning()) {
                if (onoff) {
-                       auditioning_alert_button.set_active_state (Gtkmm2ext::Active);
+                       auditioning_alert_button.set_active (true);
                } else {
-                       auditioning_alert_button.unset_active_state();
+                       auditioning_alert_button.set_active (false);
                }
        } else {
-               auditioning_alert_button.unset_active_state ();
+               auditioning_alert_button.set_active (false);
        }
 }
 
@@ -634,3 +633,9 @@ ARDOUR_UI::click_button_clicked (GdkEventButton* ev)
        rc_option_editor->set_current_page (_("Misc"));
        return true;
 }
+
+void
+ARDOUR_UI::join_play_range_clicked ()
+{
+       join_play_range_button.set_active (!join_play_range_button.get_active());
+}