diff options
author | Nick Mainsbridge <beatroute@iprimus.com.au> | 2008-11-01 14:45:03 +0000 |
---|---|---|
committer | Nick Mainsbridge <beatroute@iprimus.com.au> | 2008-11-01 14:45:03 +0000 |
commit | 3043b68bfbcd70ba13d132c8b833cdf3ba199266 (patch) | |
tree | 2bdb9e667e536d15eaa8bfc0cdac2ea0b8380592 | |
parent | 2e557e0a12194bd3e51923b3e7d782af90868696 (diff) |
Ignore triple clicks for mute/solo/rec-enable (fixes long-standing insensitive to clicks bug), momentary solo/mute works for track headers, redraw some widgets when resizing editor-mixer (osx only), don't autoconnect physical inputs to busses (sae only), new sends active by default (sae only), some minor sae gui customizations using ardour2_ui_sae.conf.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4078 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/ardour-sae.menus | 5 | ||||
-rw-r--r-- | gtk2_ardour/ardour2_ui_sae.conf | 15 | ||||
-rw-r--r-- | gtk2_ardour/editor.h | 4 | ||||
-rw-r--r-- | gtk2_ardour/editor_actions.cc | 11 | ||||
-rw-r--r-- | gtk2_ardour/editor_canvas.cc | 54 | ||||
-rw-r--r-- | gtk2_ardour/editor_mixer.cc | 15 | ||||
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 9 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.h | 4 | ||||
-rw-r--r-- | gtk2_ardour/redirect_box.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 11 | ||||
-rw-r--r-- | gtk2_ardour/route_ui.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/ui_config.cc | 6 | ||||
-rw-r--r-- | libs/ardour/session.cc | 22 |
14 files changed, 122 insertions, 49 deletions
diff --git a/gtk2_ardour/ardour-sae.menus b/gtk2_ardour/ardour-sae.menus index 3b8330e33f..a8d0fb3bb5 100644 --- a/gtk2_ardour/ardour-sae.menus +++ b/gtk2_ardour/ardour-sae.menus @@ -176,6 +176,7 @@ </menu> <menu action='TrackMenu'> + <menuitem action='remove-track'/> <menuitem action='AddTrackBus'/> <menuitem action="move-selected-tracks-up"/> <menuitem action="move-selected-tracks-down"/> @@ -193,7 +194,6 @@ <menuitem action='logarithmic-waveforms'/> </menu> <menuitem action='toggle-track-active'/> - <menuitem action='remove-track'/> </menu> <menu action='RegionMenu'> @@ -345,6 +345,8 @@ </popup> <popup name='redirectmenu'> + <menuitem action='delete'/> + <separator/> <menuitem action='newplugin'/> <menuitem action='newinsert'/> <menuitem action='newsend'/> @@ -354,7 +356,6 @@ <menuitem action='cut'/> <menuitem action='copy'/> <menuitem action='paste'/> - <menuitem action='delete'/> <separator/> <menuitem action='rename'/> <separator/> diff --git a/gtk2_ardour/ardour2_ui_sae.conf b/gtk2_ardour/ardour2_ui_sae.conf index b9fac38909..494e5c9a88 100644 --- a/gtk2_ardour/ardour2_ui_sae.conf +++ b/gtk2_ardour/ardour2_ui_sae.conf @@ -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"/> @@ -42,13 +42,13 @@ <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"/> @@ -72,16 +72,19 @@ <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"/> diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 570ac76a86..3d3acffb29 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -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); diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 20b3969e7c..1aea9364b9 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -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); diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index f31579fc58..b5a0177b38 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -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); diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index 11ab88bcab..c5809a3dd4 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -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); } diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index a0c454f10d..a3585d2872 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -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 (); diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 3bb8656b51..fe87c9fc84 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -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 diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h index f34f39b82b..957701e220 100644 --- a/gtk2_ardour/mixer_strip.h +++ b/gtk2_ardour/mixer_strip.h @@ -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); diff --git a/gtk2_ardour/redirect_box.cc b/gtk2_ardour/redirect_box.cc index fb21601fd1..6748034cfa 100644 --- a/gtk2_ardour/redirect_box.cc +++ b/gtk2_ardour/redirect_box.cc @@ -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; } diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 93803f3a5c..cab6262706 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -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) diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 842e06953e..a46a61314c 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -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; } diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc index 4026aab11c..ce9fbce172 100644 --- a/gtk2_ardour/ui_config.cc +++ b/gtk2_ardour/ui_config.cc @@ -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()) { diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index a6a322739e..d3c802ea40 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -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 = ""; |