Ignore triple clicks for mute/solo/rec-enable (fixes long-standing insensitive to...
authorNick Mainsbridge <beatroute@iprimus.com.au>
Sat, 1 Nov 2008 14:45:03 +0000 (14:45 +0000)
committerNick Mainsbridge <beatroute@iprimus.com.au>
Sat, 1 Nov 2008 14:45:03 +0000 (14:45 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4078 d708f5d6-7413-0410-9779-e7cbd77b26cf

14 files changed:
gtk2_ardour/ardour-sae.menus
gtk2_ardour/ardour2_ui_sae.conf
gtk2_ardour/editor.h
gtk2_ardour/editor_actions.cc
gtk2_ardour/editor_canvas.cc
gtk2_ardour/editor_mixer.cc
gtk2_ardour/editor_mouse.cc
gtk2_ardour/mixer_strip.cc
gtk2_ardour/mixer_strip.h
gtk2_ardour/redirect_box.cc
gtk2_ardour/route_time_axis.cc
gtk2_ardour/route_ui.cc
gtk2_ardour/ui_config.cc
libs/ardour/session.cc

index 3b8330e33f91949c85ff050a2221ec178d700739..a8d0fb3bb5879a8aefdee2cb0d38ff22213582eb 100644 (file)
         </menu>
 
         <menu action='TrackMenu'>
+               <menuitem action='remove-track'/>
                <menuitem action='AddTrackBus'/>        
                <menuitem action="move-selected-tracks-up"/>
                <menuitem action="move-selected-tracks-down"/>
                      <menuitem action='logarithmic-waveforms'/>
                </menu>
                <menuitem action='toggle-track-active'/>        
-               <menuitem action='remove-track'/>       
        </menu>
 
        <menu action='RegionMenu'>
      </popup>
 
      <popup name='redirectmenu'>
+        <menuitem action='delete'/>
+         <separator/>
         <menuitem action='newplugin'/>
         <menuitem action='newinsert'/>
         <menuitem action='newsend'/>
         <menuitem action='cut'/>
         <menuitem action='copy'/>
         <menuitem action='paste'/>
-        <menuitem action='delete'/>
          <separator/>
         <menuitem action='rename'/>
          <separator/>
index b9fac389090ab13acc8b2415ef11316534470eab..494e5c9a885c76e3ec755c3ed446f1d5c613bf56 100644 (file)
@@ -7,7 +7,7 @@
     <Option name="automation line" value="44bc59ff"/>
     <Option name="automation track fill" value="a0a0ce68"/>
     <Option name="automation track outline" value="282828ff"/>
-    <Option name="cdmarkerbar" value="9090a3ff"/>
+    <Option name="cdmarkerbar" value="9090a3a0"/>
     <Option name="clipped waveform" value="ff0000e5"/>
     <Option name="control point fill" value="000000ff"/>
     <Option name="control point outline" value="000000ff"/>
     <Option name="location punch" value="7c3a3aff"/>
     <Option name="location range" value="497a59ff"/>
     <Option name="marker bar separator" value="30303088"/>
-    <Option name="markerbar" value="9898a3ff"/>
+    <Option name="markerbar" value="9898a3a0"/>
     <Option name="MarkerDragLine" value="004f00f9"/>
     <Option name="marker label" value="000000ff"/>
     <Option name="MarkerTrack" value="ddddd8ff"/>
     <Option name="MeasureLineBar" value="8c8c988c"/>
     <Option name="MeasureLineBeat" value="72727266"/>
-    <Option name="meterbar" value="666672ff"/>
+    <Option name="meterbar" value="666672a0"/>
     <Option name="MeterColorBase" value="0000ffff"/>
     <Option name="MeterColorClip" value="ff0000ff"/>
     <Option name="MeterColorMid" value="73f9baff"/>
@@ -63,7 +63,7 @@
     <Option name="PunchLine" value="a80000ff"/>
     <Option name="RangeDragBarRect" value="969696c6"/>
     <Option name="RangeDragRect" value="82c696c6"/>
-    <Option name="rangemarker bar" value="7f7f8cff"/>
+    <Option name="rangemarker bar" value="7f7f8ca0"/>
     <Option name="RecordingRect" value="e5c6c6ff"/>
     <Option name="region base" value="99a7b584"/>
     <Option name="RubberBandRect" value="c6c6c659"/>
     <Option name="selected region base" value="130505ff"/>
     <Option name="selected waveform fill" value="e6e6fac8"/>
     <Option name="selected waveform outline" value="1a1a1acc"/>
+    <Option name="recorded region base" value="ad7173ff"/>
+    <Option name="recorded waveform fill" value="74383884"/>
+    <Option name="recorded waveform outline" value="3b0013ff"/>
     <Option name="SelectionRect" value="e8f4d377"/>
     <Option name="Selection" value="636363b2"/>
-    <Option name="tempo bar" value="72727fff"/>
+    <Option name="tempo bar" value="72727fa0"/>
     <Option name="TempoMarker" value="f2425bff"/>
     <Option name="TimeAxisFrame" value="000000cb"/>
     <Option name="time-stretch-fill" value="e2b5b596"/>
     <Option name="time-stretch-outline" value="63636396"/>
     <Option name="TransportDragRect" value="969696c6"/>
     <Option name="TransportLoopRect" value="1e7728f9"/>
-    <Option name="TransportMarkerBar" value="8c8c96ff"/>
+    <Option name="TransportMarkerBar" value="8c8c96a0"/>
     <Option name="TransportPunchRect" value="6d2828e5"/>
     <Option name="TrimHandleLocked" value="ea0f0f28"/>
     <Option name="TrimHandle" value="1900ff44"/>
index 570ac76a86110d2b39cd18c9f889f3d231f24767..3d3acffb2952b44c6b71aca07974623829f89ecd 100644 (file)
@@ -2026,7 +2026,9 @@ public:
 
        void detach_tearoff (Gtk::Box* b, Gtk::Window* w);
        void reattach_tearoff (Gtk::Box* b, Gtk::Window* w, int32_t n);
-
+#ifdef GTKOSX
+       void ensure_all_elements_drawn ();
+#endif
        /* nudging tracks */
 
        void nudge_track (bool use_edit_point, bool forwards);
index 20b3969e7c34cd816826b27cd21441ce622eb056..1aea9364b977c0d20307204d746e3cf2e49a6e29 100644 (file)
@@ -581,7 +581,11 @@ Editor::register_actions ()
        act = ActionManager::register_action (editor_actions, "toggle-track-active", _("Toggle Active"), (mem_fun(*this, &Editor::toggle_tracks_active)));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::track_selection_sensitive_actions.push_back (act);
-       act = ActionManager::register_action (editor_actions, "remove-track", _("Remove"), (mem_fun(*this, &Editor::remove_tracks)));
+       if (Profile->get_sae()) {
+               act = ActionManager::register_action (editor_actions, "remove-track", _("Delete"), (mem_fun(*this, &Editor::remove_tracks)));
+       } else {
+               act = ActionManager::register_action (editor_actions, "remove-track", _("Remove"), (mem_fun(*this, &Editor::remove_tracks)));
+       }
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::track_selection_sensitive_actions.push_back (act);
 
@@ -698,13 +702,16 @@ Editor::register_actions ()
        ruler_meter_action->set_active (true);
        ruler_tempo_action->set_active (true);
        ruler_marker_action->set_active (true);
-       ruler_range_action->set_active (true);
+       ruler_range_action->set_active (false);
+       ruler_loop_punch_action->set_active (true);
        ruler_loop_punch_action->set_active (true);
        if (Profile->get_sae()) {
+               ruler_bbt_action->set_active (true);
                ruler_cd_marker_action->set_active (false);
                ruler_timecode_action->set_active (false);
                ruler_minsec_action->set_active (true);
        } else {
+               ruler_bbt_action->set_active (false);
                ruler_cd_marker_action->set_active (true);
                ruler_timecode_action->set_active (true);
                ruler_minsec_action->set_active (false);
index f31579fc587d51eff4c2f5c8a6e955eed6c5f1a8..b5a0177b382b9aedf1daa7951a130b19cb08c5f5 100644 (file)
@@ -153,34 +153,64 @@ Editor::initialize_canvas ()
        _region_motion_group = new ArdourCanvas::Group (*_trackview_group);
 
        meter_bar_group = new ArdourCanvas::Group (*track_canvas->root ());
-       meter_bar = new ArdourCanvas::SimpleRect (*meter_bar_group, 0.0, 0.0, physical_screen_width, timebar_height);
+       if (Profile->get_sae()) {
+               meter_bar = new ArdourCanvas::SimpleRect (*meter_bar_group, 0.0, 0.0, physical_screen_width, timebar_height - 1);
+               meter_bar->property_outline_pixels() = 1;
+       } else {
+               meter_bar = new ArdourCanvas::SimpleRect (*meter_bar_group, 0.0, 0.0, physical_screen_width, timebar_height);
+               meter_bar->property_outline_pixels() = 0;
+       }
        meter_bar->property_outline_what() = (0x1 | 0x8);
-       meter_bar->property_outline_pixels() = 0;
 
        tempo_bar_group = new ArdourCanvas::Group (*track_canvas->root ());
-       tempo_bar = new ArdourCanvas::SimpleRect (*tempo_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height));
+       if (Profile->get_sae()) {
+               tempo_bar = new ArdourCanvas::SimpleRect (*tempo_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height - 1));
+               tempo_bar->property_outline_pixels() = 1;
+       } else {
+               tempo_bar = new ArdourCanvas::SimpleRect (*tempo_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height));
+               tempo_bar->property_outline_pixels() = 0;
+       }
        tempo_bar->property_outline_what() = (0x1 | 0x8);
-       tempo_bar->property_outline_pixels() = 0;
 
        range_marker_bar_group = new ArdourCanvas::Group (*track_canvas->root ());
-       range_marker_bar = new ArdourCanvas::SimpleRect (*range_marker_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height));
+       if (Profile->get_sae()) {
+               range_marker_bar = new ArdourCanvas::SimpleRect (*range_marker_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height - 1));
+               range_marker_bar->property_outline_pixels() = 1;
+       } else {
+               range_marker_bar = new ArdourCanvas::SimpleRect (*range_marker_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height));
+               range_marker_bar->property_outline_pixels() = 0;
+       }
        range_marker_bar->property_outline_what() = (0x1 | 0x8);
-       range_marker_bar->property_outline_pixels() = 0;
        
        transport_marker_bar_group = new ArdourCanvas::Group (*track_canvas->root ());
-       transport_marker_bar = new ArdourCanvas::SimpleRect (*transport_marker_bar_group, 0.0, 0.0,  physical_screen_width, (timebar_height));
+       if (Profile->get_sae()) {
+               transport_marker_bar = new ArdourCanvas::SimpleRect (*transport_marker_bar_group, 0.0, 0.0,  physical_screen_width, (timebar_height - 1));
+               transport_marker_bar->property_outline_pixels() = 1;
+       } else {
+               transport_marker_bar = new ArdourCanvas::SimpleRect (*transport_marker_bar_group, 0.0, 0.0,  physical_screen_width, (timebar_height));
+               transport_marker_bar->property_outline_pixels() = 0;
+       }
        transport_marker_bar->property_outline_what() = (0x1 | 0x8);
-       transport_marker_bar->property_outline_pixels() = 0;
 
        marker_bar_group = new ArdourCanvas::Group (*track_canvas->root ());
-       marker_bar = new ArdourCanvas::SimpleRect (*marker_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height));
+       if (Profile->get_sae()) {
+               marker_bar = new ArdourCanvas::SimpleRect (*marker_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height - 1));
+               marker_bar->property_outline_pixels() = 1;
+       } else {
+               marker_bar = new ArdourCanvas::SimpleRect (*marker_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height));
+               marker_bar->property_outline_pixels() = 0;
+       }
        marker_bar->property_outline_what() = (0x1 | 0x8);
-       marker_bar->property_outline_pixels() = 0;
        
        cd_marker_bar_group = new ArdourCanvas::Group (*track_canvas->root ());
-       cd_marker_bar = new ArdourCanvas::SimpleRect (*cd_marker_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height));
+       if (Profile->get_sae()) {
+               cd_marker_bar = new ArdourCanvas::SimpleRect (*cd_marker_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height - 1));
+               cd_marker_bar->property_outline_pixels() = 1;
+       } else {
+               cd_marker_bar = new ArdourCanvas::SimpleRect (*cd_marker_bar_group, 0.0, 0.0, physical_screen_width, (timebar_height));
+               cd_marker_bar->property_outline_pixels() = 0;
+       }
        cd_marker_bar->property_outline_what() = (0x1 | 0x8);
-       cd_marker_bar->property_outline_pixels() = 0;
 
        timebar_group =  new ArdourCanvas::Group (*track_canvas->root(), 0.0, 0.0);
        cursor_group = new ArdourCanvas::Group (*track_canvas->root(), 0.0, 0.0);
index 11ab88bcab0c7897da9ef9f6431adb271bc34f2b..c5809a3dd44dd8e7a90a8581d147f74554b33139 100644 (file)
@@ -131,11 +131,19 @@ Editor::show_editor_mixer (bool yn)
 
 #ifdef GTKOSX
        /* XXX gtk problem here */
+       ensure_all_elements_drawn();
+#endif
+}
+
+#ifdef GTKOSX
+void
+Editor::ensure_all_elements_drawn ()
+{
+       controls_layout.queue_draw ();
        ruler_label_event_box.queue_draw ();
        time_button_event_box.queue_draw ();
-       controls_layout.queue_draw ();
-#endif
 }
+#endif
 
 void
 Editor::create_editor_mixer ()
@@ -145,6 +153,9 @@ Editor::create_editor_mixer ()
                                              false);
        current_mixer_strip->Hiding.connect (mem_fun(*this, &Editor::current_mixer_strip_hidden));
        current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::current_mixer_strip_removed));
+#ifdef GTKOSX
+       current_mixer_strip->WidthChanged.connect (mem_fun(*this, &Editor::ensure_all_elements_drawn));
+#endif
        current_mixer_strip->set_embedded (true);
 }      
 
index a0c454f10df567b2f9b5690f0dfa9df2396ba03b..a3585d2872ece1e8fe030c2da7b143c85882ae85 100644 (file)
@@ -5410,7 +5410,9 @@ Editor::end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event)
                }
                
        } else {
-               selection->clear_tracks();
+               if (!getenv("ARDOUR_SAE")) {
+                       selection->clear_tracks();
+               }
                selection->clear_regions();
                selection->clear_points ();
                selection->clear_lines ();
index 3bb8656b515f2f5ab74cc22d4a3dca196c90a928..fe87c9fc84b5baea987bf9b7fc3be8a5b8d9e7f8 100644 (file)
@@ -479,8 +479,7 @@ MixerStrip::set_width (Width w, void* owner)
 
        switch (w) {
        case Wide:
-               set_size_request (-1, -1);
-               
+
                if (rec_enable_button)  {
                        ((Gtk::Label*)rec_enable_button->get_child())->set_text (_("Record"));
                }
@@ -500,6 +499,10 @@ MixerStrip::set_width (Width w, void* owner)
                ((Gtk::Label*)panners.pan_automation_style_button.get_child())->set_text (panners.astyle_string(_route->panner().automation_style()));
                ((Gtk::Label*)panners.pan_automation_state_button.get_child())->set_text (panners.astate_string(_route->panner().automation_state()));
                Gtkmm2ext::set_size_request_to_display_given_text (name_button, "long", 2, 2);
+               set_size_request (-1, -1);
+#ifdef GTKOSX
+               WidthChanged();
+#endif
                break;
 
        case Narrow:
@@ -525,12 +528,10 @@ MixerStrip::set_width (Width w, void* owner)
                set_size_request (max (50, gpm.get_gm_width()), -1);
                break;
        }
-
        update_input_display ();
        update_output_display ();
        mix_group_changed (0);
        name_changed (0);
-
 }
 
 void
index f34f39b82b963c28e2d7638331d24c7f8adc6360..957701e22005d84428f1804535c486b781a145b4 100644 (file)
@@ -96,6 +96,10 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
        ARDOUR::RouteGroup* mix_group() const;
        void set_route (boost::shared_ptr<ARDOUR::Route>);
 
+#ifdef GTKOSX
+       sigc::signal<void>      WidthChanged;
+#endif
+
   protected:
        friend class Mixer_UI;
        void set_packed (bool yn);
index fb21601fd1b29bbd2b909b1136062c202ee4a541..6748034cfaa4f0bbd3db1d608bc137f43c0a492e 100644 (file)
@@ -531,6 +531,9 @@ RedirectBox::send_io_finished (IOSelector::Result r, boost::weak_ptr<Redirect> w
 
        case IOSelector::Accepted:
                _route->add_redirect (redirect, this);
+               if (Profile->get_sae()) {
+                       redirect->set_active (true, 0);
+               }
                break;
        }
 
index 93803f3a5c8d730540808584aa43c422b84a8dd7..cab6262706c5bd0949db3c754c983ee755ef007b 100644 (file)
@@ -141,9 +141,9 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
        hide_button.signal_clicked().connect (mem_fun(*this, &RouteTimeAxisView::hide_click));
 
        solo_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::solo_press), false);
-       solo_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::solo_release));
+       solo_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::solo_release), false);
        mute_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::mute_press), false);
-       mute_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::mute_release));
+       mute_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::mute_release), false);
 
        if (is_track()) {
 
@@ -507,7 +507,12 @@ RouteTimeAxisView::build_display_menu ()
 
        items.push_back (SeparatorElem());
        items.push_back (MenuElem (_("Hide"), mem_fun(*this, &RouteTimeAxisView::hide_click)));
-       items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route)));
+       if (!Profile->get_sae()) {
+               items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route)));
+       } else {
+               items.push_front (SeparatorElem());
+               items.push_front (MenuElem (_("Delete"), mem_fun(*this, &RouteUI::remove_this_route)));
+       }
 }
 
 static bool __reset_item (RadioMenuItem* item)
index 842e06953ece8780731c02d64419cbadb484e1af..a46a61314c7f6dfc9e507026dde02b6ffd93e595 100644 (file)
@@ -202,7 +202,7 @@ RouteUI::~RouteUI()
 bool
 RouteUI::mute_press(GdkEventButton* ev)
 {
-       if (ev->type == GDK_2BUTTON_PRESS) {
+       if (ev->type == GDK_2BUTTON_PRESS || ev->type == GDK_3BUTTON_PRESS ) {
                return true;
        }
 
@@ -283,9 +283,9 @@ RouteUI::mute_release(GdkEventButton* ev)
 bool
 RouteUI::solo_press(GdkEventButton* ev)
 {
-       /* ignore double clicks */
+       /* ignore double/triple clicks */
 
-       if (ev->type == GDK_2BUTTON_PRESS) {
+       if (ev->type == GDK_2BUTTON_PRESS || ev->type == GDK_3BUTTON_PRESS ) {
                return true;
        }
 
@@ -386,7 +386,7 @@ RouteUI::solo_release(GdkEventButton* ev)
 bool
 RouteUI::rec_enable_press(GdkEventButton* ev)
 {
-       if (ev->type == GDK_2BUTTON_PRESS) {
+       if (ev->type == GDK_2BUTTON_PRESS || ev->type == GDK_3BUTTON_PRESS ) {
                return true;
        }
 
index 4026aab11c78f0756b9fe884066caf9a758c7c19..ce9fbce172c2a52e67630a59d25a0b6c19ff1346 100644 (file)
@@ -67,7 +67,11 @@ UIConfiguration::load_defaults ()
        if (ui_conf && ui_conf[0] != '\0') {
                rcfile = find_config_file (ui_conf);
        } else {
-               rcfile = find_config_file ("ardour2_ui_default.conf");
+               if (getenv ("ARDOUR_SAE")) {
+                       rcfile = find_config_file ("ardour2_ui_sae.conf");
+               } else {
+                       rcfile = find_config_file ("ardour2_ui_default.conf");
+               }
        }
 
        if (rcfile.length()) {
index a6a322739e235070d1516440d625b487baba905c..d3c802ea404a84fac8afdfd0865d1b42a19359ed 100644 (file)
@@ -1966,20 +1966,20 @@ Session::new_audio_route (int input_channels, int output_channels, uint32_t how_
                                      << endmsg;
                                goto failure;
                        }
-                       
-                       for (uint32_t x = 0; n_physical_audio_inputs && x < bus->n_inputs(); ++x) {
-                               
-                               port = "";
-
-                               if (Config->get_input_auto_connect() & AutoConnectPhysical) {
+                       if (! getenv("ARDOUR_SAE")) {
+                               for (uint32_t x = 0; n_physical_audio_inputs && x < bus->n_inputs(); ++x) {
+                                       
+                                       port = "";
+                                       
+                                       if (Config->get_input_auto_connect() & AutoConnectPhysical) {
                                                port = physinputs[((n+x)%n_physical_audio_inputs)];
-                               } 
-                               
-                               if (port.length() && bus->connect_input (bus->input (x), port, this)) {
-                                       break;
+                                       } 
+                                       
+                                       if (port.length() && bus->connect_input (bus->input (x), port, this)) {
+                                               break;
+                                       }
                                }
                        }
-                       
                        for (uint32_t x = 0; n_physical_audio_outputs && x < bus->n_outputs(); ++x) {
                                
                                port = "";