From 89df06eb2d07db9a75b845b7b444532487ae2e56 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 23 May 2012 15:41:07 +0000 Subject: [PATCH] merge 3.0 12308:12389 git-svn-id: svn://localhost/ardour2/branches/3.0-SG@12391 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/about.cc | 2 +- gtk2_ardour/actions.cc | 8 +- gtk2_ardour/ardev_common.sh.in | 15 + gtk2_ardour/ardour.sh.in | 17 +- gtk2_ardour/ardour_button.cc | 32 +- gtk2_ardour/ardour_button.h | 5 + gtk2_ardour/ardour_ui.cc | 2 - gtk2_ardour/audio_region_view.cc | 6 +- gtk2_ardour/audio_time_axis.cc | 1 - gtk2_ardour/automation_time_axis.cc | 2 - gtk2_ardour/bundle_manager.cc | 6 +- gtk2_ardour/bundle_manager.h | 2 +- gtk2_ardour/editor.cc | 286 +++++++++--------- gtk2_ardour/editor_actions.cc | 29 +- gtk2_ardour/editor_canvas.cc | 4 +- gtk2_ardour/editor_mouse.cc | 4 - gtk2_ardour/editor_ops.cc | 5 - gtk2_ardour/editor_route_groups.cc | 1 - gtk2_ardour/editor_selection.cc | 1 - gtk2_ardour/global_port_matrix.cc | 2 +- gtk2_ardour/io_selector.cc | 2 +- gtk2_ardour/keyboard.cc | 4 +- gtk2_ardour/keyeditor.cc | 2 - gtk2_ardour/main.cc | 80 +---- gtk2_ardour/midi_region_view.cc | 2 +- gtk2_ardour/midi_time_axis.cc | 3 - gtk2_ardour/missing_file_dialog.cc | 1 - gtk2_ardour/mixer_actor.cc | 5 +- gtk2_ardour/port_group.cc | 14 +- gtk2_ardour/port_group.h | 2 +- gtk2_ardour/port_matrix.cc | 93 +++++- gtk2_ardour/port_matrix.h | 3 +- gtk2_ardour/route_ui.cc | 9 +- gtk2_ardour/selection.cc | 1 + gtk2_ardour/sfdb_ui.cc | 27 +- gtk2_ardour/sfdb_ui.h | 2 + gtk2_ardour/splash.cc | 2 +- gtk2_ardour/startup.cc | 21 +- gtk2_ardour/startup.h | 2 +- gtk2_ardour/step_entry.cc | 3 +- gtk2_ardour/theme_manager.cc | 34 ++- gtk2_ardour/theme_manager.h | 2 + gtk2_ardour/ui_config.cc | 9 +- gtk2_ardour/ui_config_vars.h | 1 + gtk2_ardour/utils.cc | 8 +- gtk2_ardour/wscript | 8 +- libs/ardour/ardour/bundle.h | 1 + libs/ardour/ardour/filesystem_paths.h | 17 +- libs/ardour/audioregion.cc | 77 +++-- libs/ardour/bundle.cc | 28 ++ libs/ardour/control_protocol_manager.cc | 8 +- libs/ardour/control_protocol_search_path.cc | 4 +- libs/ardour/filesystem_paths.cc | 79 +++-- libs/ardour/globals.cc | 13 +- libs/ardour/import.cc | 18 +- .../macosx/ardour.xcodeproj/project.pbxproj | 2 - libs/ardour/midi_patch_search_path.cc | 2 +- libs/ardour/panner_search_path.cc | 2 +- libs/ardour/rc_configuration.cc | 4 +- libs/ardour/run-tests.sh | 9 +- libs/ardour/session_state.cc | 2 +- libs/ardour/sndfilesource.cc | 4 +- libs/ardour/template_utils.cc | 36 +-- libs/ardour/wscript | 8 +- libs/pbd/filesystem_paths.cc | 61 ---- libs/pbd/fpu.cc | 64 ++-- libs/pbd/malign.cc | 2 +- libs/pbd/pbd/filesystem_paths.h | 34 --- libs/pbd/pbd/signals.h | 5 + libs/pbd/test/signals_test.cc | 8 + libs/pbd/test/signals_test.h | 1 + libs/pbd/wscript | 6 +- .../generic_midi_control_protocol.cc | 2 +- libs/surfaces/mackie/device_info.cc | 16 +- libs/surfaces/mackie/device_profile.cc | 7 +- libs/surfaces/mackie/meter.cc | 18 +- libs/surfaces/mackie/meter.h | 4 +- libs/surfaces/mackie/strip.cc | 8 +- libs/surfaces/osc/osc.cc | 3 +- libs/surfaces/wscript | 6 +- mcp/cmc.device | 14 + mcp/wscript | 18 ++ patchfiles/wscript | 16 + tools/linux_packaging/ardour.sh.in | 13 +- tools/linux_packaging/build | 41 ++- tools/linux_packaging/stage2.run | 2 +- tools/osx_packaging/osx_build | 98 ++++-- wscript | 63 ++-- 88 files changed, 877 insertions(+), 717 deletions(-) delete mode 100644 libs/pbd/filesystem_paths.cc delete mode 100644 libs/pbd/pbd/filesystem_paths.h create mode 100644 mcp/cmc.device create mode 100644 mcp/wscript create mode 100644 patchfiles/wscript diff --git a/gtk2_ardour/about.cc b/gtk2_ardour/about.cc index a66a4a2f69..5ecc075c30 100644 --- a/gtk2_ardour/about.cc +++ b/gtk2_ardour/about.cc @@ -559,7 +559,7 @@ About::About () sys::path splash_file; - SearchPath spath(ardour_search_path() + system_data_search_path()); + SearchPath spath(ardour_data_search_path()); if (find_file_in_search_path (spath, "splash.png", splash_file)) { set_logo (Gdk::Pixbuf::create_from_file (splash_file.to_string())); diff --git a/gtk2_ardour/actions.cc b/gtk2_ardour/actions.cc index e9252bcbff..0db4831e6f 100644 --- a/gtk2_ardour/actions.cc +++ b/gtk2_ardour/actions.cc @@ -72,9 +72,7 @@ ActionManager::init () ui_manager = UIManager::create (); - SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path(); - - find_file_in_search_path (spath, "ardour.menus", ui_file); + find_file_in_search_path (ardour_config_search_path(), "ardour.menus", ui_file); bool loaded = false; @@ -159,11 +157,7 @@ ActionManager::map_some_state (const char* group, const char* action, bool (RCCo if (tact->get_active() != x) { tact->set_active (x); } - } else { - cerr << group << ':' << action << " is not a toggle\n"; } - } else { - cerr << group << ':' << action << " not an action\n"; } } diff --git a/gtk2_ardour/ardev_common.sh.in b/gtk2_ardour/ardev_common.sh.in index d8bdeb430d..29a1dff241 100644 --- a/gtk2_ardour/ardev_common.sh.in +++ b/gtk2_ardour/ardev_common.sh.in @@ -4,6 +4,13 @@ TOP=`dirname "$0"`/.. libs=$TOP/@LIBS@ +# +# when running ardev, the various parts of Ardour have not been consolidated into the locations that they +# would normally end up after an install. We therefore need to set up environment variables so that we +# can find all the components. +# + + export ARDOUR_PATH=$TOP/gtk2_ardour/icons:$TOP/gtk2_ardour/pixmaps:$TOP/build/gtk2_ardour:$TOP/gtk2_ardour:. export ARDOUR_SURFACES_PATH=$libs/surfaces/osc:$libs/surfaces/generic_midi:$libs/surfaces/tranzport:$libs/surfaces/powermate:$libs/surfaces/mackie export ARDOUR_PANNER_PATH=$libs/panners/2in2out:$libs/panners/1in2out:$libs/panners/vbap @@ -11,6 +18,14 @@ export ARDOUR_DATA_PATH=$TOP/gtk2_ardour:build/gtk2_ardour:. export ARDOUR_MIDIMAPS_PATH=$TOP/midi_maps:. export ARDOUR_MCP_PATH=$TOP/mcp:. +# +# even though we set the above variables, ardour requires that these +# two also be set. the above settings will override them. +# + +export ARDOUR_CONFIG_PATH=$TOP:$TOP/gtk2_ardour:$TOP/build:$TOP/build/gtk2_ardour +export ARDOUR_DLL_PATH=$libs + if test -d $HOME/gtk/inst ; then export GTK_PATH=~/.ardour3:$libs/clearlooks-newer else diff --git a/gtk2_ardour/ardour.sh.in b/gtk2_ardour/ardour.sh.in index d7297fd77c..45fdb6f55e 100644 --- a/gtk2_ardour/ardour.sh.in +++ b/gtk2_ardour/ardour.sh.in @@ -1,10 +1,13 @@ #!/bin/sh -export GTK_PATH=@LIBDIR@/ardour3${GTK_PATH:+:$GTK_PATH} +# +# This script runs an installed version of Ardour. It sets a few environment variables +# and does a few checks before exec'ing the real executable. +# + +export GTK_PATH=@SYSCONFDIR@/ardour3${GTK_PATH:+:$GTK_PATH} export LD_LIBRARY_PATH=@LIBDIR@/ardour3${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} -# DYLD_LIBRARY_PATH is for Darwin -export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH ## Memlock check @@ -36,6 +39,14 @@ elif [ $(nm -D --radix=dec --defined-only -S $GLIB | grep -w g_atomic_int_add | echo "" fi +# +# Running Ardour requires these 3 variables to be set +# + +export ARDOUR_DATA_PATH=@DATADIR@/ardour3 +export ARDOUR_CONFIG_PATH=@SYSCONFDIR@/ardour3 +export ARDOUR_DLL_PATH=@LIBDIR@/ardour3 + exec @LIBDIR@/ardour3/ardour-@VERSION@ "$@" diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc index 1d98a7b84f..3e97099703 100644 --- a/gtk2_ardour/ardour_button.cc +++ b/gtk2_ardour/ardour_button.cc @@ -49,6 +49,7 @@ using namespace std; ArdourButton::Element ArdourButton::default_elements = ArdourButton::Element (ArdourButton::Edge|ArdourButton::Body|ArdourButton::Text); ArdourButton::Element ArdourButton::led_default_elements = ArdourButton::Element (ArdourButton::default_elements|ArdourButton::Indicator); ArdourButton::Element ArdourButton::just_led_default_elements = ArdourButton::Element (ArdourButton::Edge|ArdourButton::Body|ArdourButton::Indicator); +bool ArdourButton::_flat_buttons = false; ArdourButton::ArdourButton (Element e) : _elements (e) @@ -382,10 +383,18 @@ ArdourButton::set_colors () edge_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height()); if (visual_state() & Gtkmm2ext::Selected) { start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: border start selected", get_name())); - end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: border end selected", get_name())); + if (_flat_buttons) { + end_color = start_color; + } else { + end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: border end selected", get_name())); + } } else { start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: border start", get_name())); - end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: border end", get_name())); + if (_flat_buttons) { + end_color = start_color; + } else { + end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: border end", get_name())); + } } UINT_TO_RGBA (start_color, &r, &g, &b, &a); cairo_pattern_add_color_stop_rgba (edge_pattern, 0, r/255.0,g/255.0,b/255.0, 0.7); @@ -407,7 +416,12 @@ ArdourButton::set_colors () active_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height()); start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill start active", get_name())); - end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill end active", get_name())); + + if (_flat_buttons) { + end_color = start_color; + } else { + end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill end active", get_name())); + } UINT_TO_RGBA (start_color, &r, &g, &b, &a); active_r = r/255.0; @@ -421,7 +435,11 @@ ArdourButton::set_colors () inactive_pattern = cairo_pattern_create_linear (0.0, 0.0, 0.0, get_height()); start_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill start", get_name())); - end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill end", get_name())); + if (_flat_buttons) { + end_color = start_color; + } else { + end_color = ARDOUR_UI::config()->color_by_name (string_compose ("%1: fill end", get_name())); + } UINT_TO_RGBA (start_color, &r, &g, &b, &a); cairo_pattern_add_color_stop_rgba (inactive_pattern, 0, r/255.0,g/255.0,b/255.0, a/255.0); UINT_TO_RGBA (end_color, &r, &g, &b, &a); @@ -764,3 +782,9 @@ ArdourButton::set_elements (Element e) _elements = e; set_colors (); } + +void +ArdourButton::set_flat_buttons (bool yn) +{ + _flat_buttons = yn; +} diff --git a/gtk2_ardour/ardour_button.h b/gtk2_ardour/ardour_button.h index a2c65006ff..94b3c6d399 100644 --- a/gtk2_ardour/ardour_button.h +++ b/gtk2_ardour/ardour_button.h @@ -44,6 +44,9 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable static Element led_default_elements; static Element just_led_default_elements; + static void set_flat_buttons (bool yn); + static bool flat_buttons() { return _flat_buttons; } + ArdourButton (Element e = default_elements); ArdourButton (const std::string&, Element e = default_elements); virtual ~ArdourButton (); @@ -142,6 +145,8 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable bool _distinct_led_click; bool _hovering; + static bool _flat_buttons; + void setup_led_rect (); void set_colors (); void color_handler (); diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 8063164eb5..d54ae5e291 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1162,7 +1162,6 @@ ARDOUR_UI::redisplay_recent_sessions () /* check whether session still exists */ if (!Glib::file_test(fullpath.c_str(), Glib::FILE_TEST_EXISTS)) { /* session doesn't exist */ - cerr << "skipping non-existent session " << fullpath << endl; continue; } @@ -2839,7 +2838,6 @@ ARDOUR_UI::show_splash () try { splash = new Splash; } catch (...) { - cerr << "Splash could not be created\n"; return; } } diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index 6ab858f1c9..48f1f6b8e5 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -1568,7 +1568,8 @@ AudioRegionView::redraw_start_xfade_to (boost::shared_ptr ar, frame if (!start_xfade_out) { start_xfade_out = new ArdourCanvas::Line (*group); start_xfade_out->property_width_pixels() = 1; - start_xfade_out->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_GainLine.get(); + uint32_t col = UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_GainLine.get(), 125); + start_xfade_out->property_fill_color_rgba() = col; } if (!start_xfade_rect) { @@ -1673,7 +1674,8 @@ AudioRegionView::redraw_end_xfade_to (boost::shared_ptr ar, framecn if (!end_xfade_out) { end_xfade_out = new ArdourCanvas::Line (*group); end_xfade_out->property_width_pixels() = 1; - end_xfade_out->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_GainLine.get(); + uint32_t col UINT_RGBA_CHANGE_A (ARDOUR_UI::config()->canvasvar_GainLine.get(), 125); + end_xfade_out->property_fill_color_rgba() = col; } if (!end_xfade_rect) { diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index eca908eeb4..a34d6421a2 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -179,7 +179,6 @@ void AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool show) { if (param.type() == NullAutomation) { - cerr << "WARNING: Attempt to create NullAutomation child, ignoring" << endl; return; } diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 3332a066d9..e0d53e1707 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -442,8 +442,6 @@ AutomationTimeAxisView::set_height (uint32_t h) auto_button.hide(); hide_button.hide(); } - } else if (h >= preset_height (HeightNormal)) { - cerr << "track grown, but neither changed_between_small_and_normal nor first_call_to_set_height set!" << endl; } if (changed) { diff --git a/gtk2_ardour/bundle_manager.cc b/gtk2_ardour/bundle_manager.cc index 0cd44af9a2..1c89f7b3cd 100644 --- a/gtk2_ardour/bundle_manager.cc +++ b/gtk2_ardour/bundle_manager.cc @@ -60,7 +60,7 @@ BundleEditorMatrix::setup_ports (int dim) otherwise in some cases the basic system IO ports may be hidden, making the bundle editor useless */ - _ports[OTHER].gather (_session, DataType::NIL, _bundle->ports_are_inputs(), true); + _ports[OTHER].gather (_session, DataType::NIL, _bundle->ports_are_inputs(), true, show_only_bundles ()); _ports[OTHER].remove_bundle (_bundle); _ports[OTHER].resume_signals (); } @@ -101,13 +101,13 @@ BundleEditorMatrix::get_state (BundleChannel c[2]) const } bool -BundleEditorMatrix::can_add_channel (boost::shared_ptr b) const +BundleEditorMatrix::can_add_channels (boost::shared_ptr b) const { if (b == _bundle) { return true; } - return PortMatrix::can_add_channel (b); + return PortMatrix::can_add_channels (b); } void diff --git a/gtk2_ardour/bundle_manager.h b/gtk2_ardour/bundle_manager.h index ff42ad7fb8..71b99684d7 100644 --- a/gtk2_ardour/bundle_manager.h +++ b/gtk2_ardour/bundle_manager.h @@ -42,7 +42,7 @@ class BundleEditorMatrix : public PortMatrix void set_state (ARDOUR::BundleChannel c[2], bool s); PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const; - bool can_add_channel (boost::shared_ptr) const; + bool can_add_channels (boost::shared_ptr) const; void add_channel (boost::shared_ptr, ARDOUR::DataType); bool can_remove_channels (boost::shared_ptr) const; diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index a6746b265d..0ba5f4054c 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -786,7 +786,6 @@ Editor::button_settings () const XMLNode* node = find_named_node (*settings, X_("Buttons")); if (!node) { - cerr << "new empty Button node\n"; node = new XMLNode (X_("Buttons")); } @@ -1449,141 +1448,140 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i } MenuList& items (fade_context_menu.items()); + items.clear (); - if (items.empty()) { - switch (item_type) { - case FadeInItem: - case FadeInHandleItem: - if (arv->audio_region()->fade_in_active()) { - items.push_back (MenuElem (_("Deactivate"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_active), false))); - } else { - items.push_back (MenuElem (_("Activate"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_active), true))); - } - - items.push_back (SeparatorElem()); - - if (Profile->get_sae()) { - - items.push_back (MenuElem (_("Linear"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeLinear))); - items.push_back (MenuElem (_("Slowest"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeFast))); - - } else { - - items.push_back ( - ImageMenuElem ( - _("Linear"), - *_fade_in_images[FadeLinear], - sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeLinear) - ) - ); - - dynamic_cast(&items.back())->set_always_show_image (); - - items.push_back ( - ImageMenuElem ( - _("Slow"), - *_fade_in_images[FadeSlow], - sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeSlow) - )); - - dynamic_cast(&items.back())->set_always_show_image (); - - items.push_back ( - ImageMenuElem ( - _("Fast"), - *_fade_in_images[FadeFast], - sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeFast) - )); - - dynamic_cast(&items.back())->set_always_show_image (); - - items.push_back ( - ImageMenuElem ( - _("Symmetric"), - *_fade_in_images[FadeSymmetric], - sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeSymmetric) - )); - - items.push_back ( - ImageMenuElem ( - _("Constant Power"), - *_fade_in_images[FadeConstantPower], - sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeConstantPower) - )); - - dynamic_cast(&items.back())->set_always_show_image (); - } - - break; - - case FadeOutItem: - case FadeOutHandleItem: - if (arv->audio_region()->fade_out_active()) { - items.push_back (MenuElem (_("Deactivate"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_active), false))); - } else { - items.push_back (MenuElem (_("Activate"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_active), true))); - } - - items.push_back (SeparatorElem()); - - if (Profile->get_sae()) { - items.push_back (MenuElem (_("Linear"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeLinear))); - items.push_back (MenuElem (_("Slowest"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeSlow))); - } else { - - items.push_back ( - ImageMenuElem ( - _("Linear"), - *_fade_out_images[FadeLinear], - sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeLinear) - ) - ); - - dynamic_cast(&items.back())->set_always_show_image (); - - items.push_back ( - ImageMenuElem ( - _("Slow"), - *_fade_out_images[FadeSlow], - sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeSlow) - )); - - dynamic_cast(&items.back())->set_always_show_image (); - - items.push_back ( - ImageMenuElem ( - _("Fast"), - *_fade_out_images[FadeFast], - sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeFast) - )); - - dynamic_cast(&items.back())->set_always_show_image (); - - items.push_back ( - ImageMenuElem ( - _("Symmetric"), - *_fade_out_images[FadeSymmetric], - sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeSymmetric) - )); - - items.push_back ( - ImageMenuElem ( - _("Constant Power"), - *_fade_out_images[FadeConstantPower], - sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeConstantPower) - )); - - dynamic_cast(&items.back())->set_always_show_image (); - } - - break; - - default: - fatal << _("programming error: ") - << X_("non-fade canvas item passed to popup_fade_context_menu()") - << endmsg; - /*NOTREACHED*/ + switch (item_type) { + case FadeInItem: + case FadeInHandleItem: + if (arv->audio_region()->fade_in_active()) { + items.push_back (MenuElem (_("Deactivate"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_active), false))); + } else { + items.push_back (MenuElem (_("Activate"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_active), true))); } + + items.push_back (SeparatorElem()); + + if (Profile->get_sae()) { + + items.push_back (MenuElem (_("Linear"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeLinear))); + items.push_back (MenuElem (_("Slowest"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeFast))); + + } else { + + items.push_back ( + ImageMenuElem ( + _("Linear"), + *_fade_in_images[FadeLinear], + sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeLinear) + ) + ); + + dynamic_cast(&items.back())->set_always_show_image (); + + items.push_back ( + ImageMenuElem ( + _("Slow"), + *_fade_in_images[FadeSlow], + sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeSlow) + )); + + dynamic_cast(&items.back())->set_always_show_image (); + + items.push_back ( + ImageMenuElem ( + _("Fast"), + *_fade_in_images[FadeFast], + sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeFast) + )); + + dynamic_cast(&items.back())->set_always_show_image (); + + items.push_back ( + ImageMenuElem ( + _("Symmetric"), + *_fade_in_images[FadeSymmetric], + sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeSymmetric) + )); + + items.push_back ( + ImageMenuElem ( + _("Constant Power"), + *_fade_in_images[FadeConstantPower], + sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_in_shape), FadeConstantPower) + )); + + dynamic_cast(&items.back())->set_always_show_image (); + } + + break; + + case FadeOutItem: + case FadeOutHandleItem: + if (arv->audio_region()->fade_out_active()) { + items.push_back (MenuElem (_("Deactivate"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_active), false))); + } else { + items.push_back (MenuElem (_("Activate"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_active), true))); + } + + items.push_back (SeparatorElem()); + + if (Profile->get_sae()) { + items.push_back (MenuElem (_("Linear"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeLinear))); + items.push_back (MenuElem (_("Slowest"), sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeSlow))); + } else { + + items.push_back ( + ImageMenuElem ( + _("Linear"), + *_fade_out_images[FadeLinear], + sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeLinear) + ) + ); + + dynamic_cast(&items.back())->set_always_show_image (); + + items.push_back ( + ImageMenuElem ( + _("Slow"), + *_fade_out_images[FadeSlow], + sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeSlow) + )); + + dynamic_cast(&items.back())->set_always_show_image (); + + items.push_back ( + ImageMenuElem ( + _("Fast"), + *_fade_out_images[FadeFast], + sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeFast) + )); + + dynamic_cast(&items.back())->set_always_show_image (); + + items.push_back ( + ImageMenuElem ( + _("Symmetric"), + *_fade_out_images[FadeSymmetric], + sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeSymmetric) + )); + + items.push_back ( + ImageMenuElem ( + _("Constant Power"), + *_fade_out_images[FadeConstantPower], + sigc::bind (sigc::mem_fun (*this, &Editor::set_fade_out_shape), FadeConstantPower) + )); + + dynamic_cast(&items.back())->set_always_show_image (); + } + + break; + + default: + fatal << _("programming error: ") + << X_("non-fade canvas item passed to popup_fade_context_menu()") + << endmsg; + /*NOTREACHED*/ } fade_context_menu.popup (button, time); @@ -1997,10 +1995,10 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items) nudge_menu->set_name ("ArdourContextMenu"); edit_items.push_back (SeparatorElem()); - nudge_items.push_back (MenuElem (_("Nudge Entire Track Forward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, true)))); - nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Forward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, true)))); - nudge_items.push_back (MenuElem (_("Nudge Entire Track Backward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, false)))); - nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Backward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, false)))); + nudge_items.push_back (MenuElem (_("Nudge Entire Track Later"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, true)))); + nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Later"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, true)))); + nudge_items.push_back (MenuElem (_("Nudge Entire Track Earlier"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, false)))); + nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Earlier"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, false)))); edit_items.push_back (MenuElem (_("Nudge"), *nudge_menu)); } @@ -2053,10 +2051,10 @@ Editor::add_bus_context_items (Menu_Helpers::MenuList& edit_items) nudge_menu->set_name ("ArdourContextMenu"); edit_items.push_back (SeparatorElem()); - nudge_items.push_back (MenuElem (_("Nudge Entire Track Forward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, true)))); - nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Forward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, true)))); - nudge_items.push_back (MenuElem (_("Nudge Entire Track Backward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, false)))); - nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Backward"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, false)))); + nudge_items.push_back (MenuElem (_("Nudge Entire Track Later"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, true)))); + nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Later"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, true)))); + nudge_items.push_back (MenuElem (_("Nudge Entire Track Earlier"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), false, false)))); + nudge_items.push_back (MenuElem (_("Nudge Track After Edit Point Earlier"), (sigc::bind (sigc::mem_fun(*this, &Editor::nudge_track), true, false)))); edit_items.push_back (MenuElem (_("Nudge"), *nudge_menu)); } @@ -3061,8 +3059,8 @@ Editor::setup_tooltips () ARDOUR_UI::instance()->set_tip (smart_mode_joiner, _("Smart Mode (Select/Move Objects + Ranges)")); ARDOUR_UI::instance()->set_tip (internal_edit_button, _("Edit Region Contents (e.g. notes)")); ARDOUR_UI::instance()->set_tip (*_group_tabs, _("Groups: click to (de)activate\nContext-click for other operations")); - ARDOUR_UI::instance()->set_tip (nudge_forward_button, _("Nudge Region/Selection Forwards")); - ARDOUR_UI::instance()->set_tip (nudge_backward_button, _("Nudge Region/Selection Backwards")); + ARDOUR_UI::instance()->set_tip (nudge_forward_button, _("Nudge Region/Selection Later")); + ARDOUR_UI::instance()->set_tip (nudge_backward_button, _("Nudge Region/Selection Earlier")); ARDOUR_UI::instance()->set_tip (zoom_in_button, _("Zoom In")); ARDOUR_UI::instance()->set_tip (zoom_out_button, _("Zoom Out")); ARDOUR_UI::instance()->set_tip (zoom_out_full_button, _("Zoom to Session")); diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 071e76ffff..e544f7d8c3 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -228,17 +228,17 @@ Editor::register_actions () reg_sens (editor_actions, a.c_str(), n.c_str(), sigc::bind (sigc::mem_fun (*this, &Editor::goto_nth_marker), i - 1)); } - reg_sens (editor_actions, "jump-forward-to-mark", _("Jump Forward to Mark"), sigc::mem_fun(*this, &Editor::jump_forward_to_mark)); - reg_sens (editor_actions, "jump-backward-to-mark", _("Jump Backward to Mark"), sigc::mem_fun(*this, &Editor::jump_backward_to_mark)); + reg_sens (editor_actions, "jump-forward-to-mark", _("Jump to Next Mark"), sigc::mem_fun(*this, &Editor::jump_forward_to_mark)); + reg_sens (editor_actions, "jump-backward-to-mark", _("Jump to Previous Mark"), sigc::mem_fun(*this, &Editor::jump_backward_to_mark)); reg_sens (editor_actions, "add-location-from-playhead", _("Add Mark from Playhead"), sigc::mem_fun(*this, &Editor::add_location_from_playhead_cursor)); - reg_sens (editor_actions, "nudge-next-forward", _("Nudge Next Forward"), sigc::bind (sigc::mem_fun(*this, &Editor::nudge_forward), true, false)); - reg_sens (editor_actions, "nudge-next-backward", _("Nudge Next Backward"), sigc::bind (sigc::mem_fun(*this, &Editor::nudge_backward), true, false)); + reg_sens (editor_actions, "nudge-next-forward", _("Nudge Next Later"), sigc::bind (sigc::mem_fun(*this, &Editor::nudge_forward), true, false)); + reg_sens (editor_actions, "nudge-next-backward", _("Nudge Next Earlier"), sigc::bind (sigc::mem_fun(*this, &Editor::nudge_backward), true, false)); reg_sens (editor_actions, "nudge-playhead-forward", _("Nudge Playhead Forward"), sigc::bind (sigc::mem_fun(*this, &Editor::nudge_forward), false, true)); reg_sens (editor_actions, "nudge-playhead-backward", _("Nudge Playhead Backward"), sigc::bind (sigc::mem_fun(*this, &Editor::nudge_backward), false, true)); - reg_sens (editor_actions, "playhead-forward-to-grid", _("Forward to Grid"), sigc::mem_fun(*this, &Editor::playhead_forward_to_grid)); - reg_sens (editor_actions, "playhead-backward-to-grid", _("Backward to Grid"), sigc::mem_fun(*this, &Editor::playhead_backward_to_grid)); + reg_sens (editor_actions, "playhead-forward-to-grid", _("Playhead To Next Grid"), sigc::mem_fun(*this, &Editor::playhead_forward_to_grid)); + reg_sens (editor_actions, "playhead-backward-to-grid", _("Playhead To Previous Grid"), sigc::mem_fun(*this, &Editor::playhead_backward_to_grid)); reg_sens (editor_actions, "temporal-zoom-out", _("Zoom Out"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_step), true)); reg_sens (editor_actions, "temporal-zoom-in", _("Zoom In"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_step), false)); @@ -319,8 +319,8 @@ Editor::register_actions () toggle_reg_sens (editor_actions, "toggle-log-window", _("Log"), sigc::mem_fun (ARDOUR_UI::instance(), &ARDOUR_UI::toggle_errors)); - reg_sens (editor_actions, "tab-to-transient-forwards", _("Move Forward to Transient"), sigc::bind (sigc::mem_fun(*this, &Editor::tab_to_transient), true)); - reg_sens (editor_actions, "tab-to-transient-backwards", _("Move Backwards to Transient"), sigc::bind (sigc::mem_fun(*this, &Editor::tab_to_transient), false)); + reg_sens (editor_actions, "tab-to-transient-forwards", _("Move Later to Transient"), sigc::bind (sigc::mem_fun(*this, &Editor::tab_to_transient), true)); + reg_sens (editor_actions, "tab-to-transient-backwards", _("Move Earlier to Transient"), sigc::bind (sigc::mem_fun(*this, &Editor::tab_to_transient), false)); reg_sens (editor_actions, "crop", _("Crop"), sigc::mem_fun(*this, &Editor::crop_region_to_selection)); @@ -643,13 +643,12 @@ Editor::load_bindings () key_bindings.set_action_map (editor_action_map); sys::path binding_file; - SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path(); - if (find_file_in_search_path (spath, "editor.bindings", binding_file)) { + if (find_file_in_search_path (ardour_config_search_path(), "editor.bindings", binding_file)) { key_bindings.load (binding_file.to_string()); info << string_compose (_("Loaded editor bindings from %1"), binding_file.to_string()) << endmsg; } else { - error << string_compose (_("Could not find editor.bindings in search path %1"), spath.to_string()) << endmsg; + error << string_compose (_("Could not find editor.bindings in search path %1"), ardour_config_search_path().to_string()) << endmsg; } } @@ -1700,20 +1699,20 @@ Editor::register_region_actions () reg_sens (_region_actions, "strip-region-silence", _("Strip Silence..."), sigc::mem_fun (*this, &Editor::strip_region_silence)); reg_sens (_region_actions, "set-selection-from-region", _("Set Range Selection"), sigc::mem_fun (*this, &Editor::set_selection_from_region)); - reg_sens (_region_actions, "nudge-forward", _("Nudge Forward"), sigc::bind (sigc::mem_fun (*this, &Editor::nudge_forward), false, false)); - reg_sens (_region_actions, "nudge-backward", _("Nudge Backward"), sigc::bind (sigc::mem_fun (*this, &Editor::nudge_backward), false, false)); + reg_sens (_region_actions, "nudge-forward", _("Nudge Later"), sigc::bind (sigc::mem_fun (*this, &Editor::nudge_forward), false, false)); + reg_sens (_region_actions, "nudge-backward", _("Nudge Earlier"), sigc::bind (sigc::mem_fun (*this, &Editor::nudge_backward), false, false)); reg_sens ( _region_actions, "nudge-forward-by-capture-offset", - _("Nudge Forward by Capture Offset"), + _("Nudge Later by Capture Offset"), sigc::mem_fun (*this, &Editor::nudge_forward_capture_offset) ); reg_sens ( _region_actions, "nudge-backward-by-capture-offset", - _("Nudge Backward by Capture Offset"), + _("Nudge Earlier by Capture Offset"), sigc::mem_fun (*this, &Editor::nudge_backward_capture_offset) ); diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 76b41280c2..9e43fcc35c 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -732,7 +732,7 @@ Editor::left_track_canvas (GdkEventCrossing */*ev*/) { DropDownKeys (); within_track_canvas = false; - cerr << "left track canvas\n"; + //cerr << "left track canvas\n"; set_entered_track (0); set_entered_regionview (0); reset_canvas_action_sensitivity (false); @@ -742,7 +742,7 @@ Editor::left_track_canvas (GdkEventCrossing */*ev*/) bool Editor::entered_track_canvas (GdkEventCrossing */*ev*/) { - cerr << "entered track canvas\n"; + //cerr << "entered track canvas\n"; within_track_canvas = true; reset_canvas_action_sensitivity (true); return FALSE; diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index d7d1c34280..7f4445652a 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -2430,10 +2430,6 @@ Editor::point_trim (GdkEvent* event, framepos_t new_bound) for (list::const_iterator i = selection->regions.by_layer().begin(); i != selection->regions.by_layer().end(); ++i) { - if ( (*i) == NULL){ - cerr << "region view contains null region" << endl; - } - if (!(*i)->region()->locked()) { (*i)->region()->clear_changes (); (*i)->region()->trim_front (new_bound); diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index a8f1d1f6d7..d6cae9a8e2 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -3202,15 +3202,10 @@ Editor::trim_region (bool front) framepos_t where = get_preferred_edit_position(); RegionSelection rs = get_regions_from_selection_and_edit_point (); - cerr << "trim regions\n"; - if (rs.empty()) { - cerr << " no regions\n"; return; } - cerr << "where = " << where << endl; - begin_reversible_command (front ? _("trim front") : _("trim back")); for (list::const_iterator i = rs.by_layer().begin(); i != rs.by_layer().end(); ++i) { diff --git a/gtk2_ardour/editor_route_groups.cc b/gtk2_ardour/editor_route_groups.cc index 2fd08e7609..ba170a680d 100644 --- a/gtk2_ardour/editor_route_groups.cc +++ b/gtk2_ardour/editor_route_groups.cc @@ -367,7 +367,6 @@ EditorRouteGroups::button_press_event (GdkEventButton* ev) case 12: val = (*iter)[_columns.active_shared]; - cerr << "set group active to " << !val << endl; group->set_route_active (!val); ret = true; break; diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index 20ab6673a8..8e2b668375 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -264,7 +264,6 @@ Editor::set_selected_track_as_side_effect (Selection::Operation op) case Selection::Extend: selection->clear(); - cerr << ("Editor::set_selected_track_as_side_effect case Selection::Add not yet implemented\n"); break; } } diff --git a/gtk2_ardour/global_port_matrix.cc b/gtk2_ardour/global_port_matrix.cc index f4803f156b..f229a1a4ac 100644 --- a/gtk2_ardour/global_port_matrix.cc +++ b/gtk2_ardour/global_port_matrix.cc @@ -43,7 +43,7 @@ void GlobalPortMatrix::setup_ports (int dim) { _ports[dim].suspend_signals (); - _ports[dim].gather (_session, type(), dim == IN, false); + _ports[dim].gather (_session, type(), dim == IN, false, show_only_bundles ()); _ports[dim].resume_signals (); } diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc index d7b65dc58b..19f25dcf1c 100644 --- a/gtk2_ardour/io_selector.cc +++ b/gtk2_ardour/io_selector.cc @@ -118,7 +118,7 @@ IOSelector::setup_ports (int dim) if (dim == _other) { - _ports[_other].gather (_session, type(), _find_inputs_for_io_outputs, false); + _ports[_other].gather (_session, type(), _find_inputs_for_io_outputs, false, show_only_bundles ()); } else { diff --git a/gtk2_ardour/keyboard.cc b/gtk2_ardour/keyboard.cc index 41e6a08814..2fbd5812ad 100644 --- a/gtk2_ardour/keyboard.cc +++ b/gtk2_ardour/keyboard.cc @@ -126,9 +126,7 @@ ArdourKeyboard::setup_keybindings () /* not absolute - look in the usual places */ sys::path keybindings_file; - SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path(); - - if ( ! find_file_in_search_path (spath, keybindings_path, keybindings_file)) { + if ( ! find_file_in_search_path (ardour_config_search_path(), keybindings_path, keybindings_file)) { if (keybindings_path == default_bindings) { error << string_compose (_("Default keybindings not found - %1 will be hard to use!"), PROGRAM_NAME) << endmsg; diff --git a/gtk2_ardour/keyeditor.cc b/gtk2_ardour/keyeditor.cc index 0d2cd98942..055a9bcae0 100644 --- a/gtk2_ardour/keyeditor.cc +++ b/gtk2_ardour/keyeditor.cc @@ -109,8 +109,6 @@ KeyEditor::unbind () unbind_button.set_sensitive (false); - cerr << "trying to unbind\n"; - if (i != model->children().end()) { string path = (*i)[columns.path]; diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index d7b7428b7e..284192ede2 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -166,44 +166,26 @@ fixup_bundle_environment (int, char* []) } setenv ("PATH", path.c_str(), 1); - path = dir_path; - path += "/../Resources"; - path += dir_path; - path += "/../Surfaces"; - path += dir_path; - path += "/../Panners"; + export_search_path (dir_path, "ARDOUR_DLL_PATH", "/../lib"); - setenv ("ARDOUR_MODULE_PATH", path.c_str(), 1); - - path = user_config_directory().to_string(); - path += ':'; - path += dir_path; - path += "/../Resources/icons:"; - path += dir_path; - path += "/../Resources/pixmaps:"; - path += dir_path; - path += "/../Resources/share:"; path += dir_path; path += "/../Resources"; - setenv ("ARDOUR_PATH", path.c_str(), 1); - setenv ("ARDOUR_CONFIG_PATH", path.c_str(), 1); + /* inside an OS X .app bundle, there is no difference + between DATA and CONFIG locations, since OS X doesn't + attempt to do anything to expose the notion of + machine-independent shared data. + */ - path = dir_path; - path += "/../Resources"; - setenv ("ARDOUR_INSTANT_XML_PATH", path.c_str(), 1); + export_search_path (dir_path, "ARDOUR_DATA_PATH", "/../Resources"); + export_search_path (dir_path, "ARDOUR_CONFIG_PATH", "/../Resources"); + export_search_path (dir_path, "ARDOUR_INSTANT_XML_PATH", "/../Resources"); export_search_path (dir_path, "LADSPA_PATH", "/../Plugins"); export_search_path (dir_path, "VAMP_PATH", "/../Frameworks"); - export_search_path (dir_path, "ARDOUR_PANNER_PATH", "/../Panners"); - export_search_path (dir_path, "ARDOUR_SURFACES_PATH", "/../Surfaces"); - export_search_path (dir_path, "ARDOUR_MIDIMAPS_PATH", "/../MidiMaps"); - export_search_path (dir_path, "ARDOUR_MCP_PATH", "../MCP"); - export_search_path (dir_path, "ARDOUR_EXPORT_FORMATS_PATH", "/../ExportFormats"); path = dir_path; - path += "/../Frameworks/clearlooks"; - + path += "/../lib/clearlooks"; setenv ("GTK_PATH", path.c_str(), 1); /* unset GTK_RC_FILES so that we only load the RC files that we define @@ -305,49 +287,17 @@ fixup_bundle_environment (int /*argc*/, char* argv[]) Glib::ustring path; Glib::ustring userconfigdir = user_config_directory().to_string(); - /* ensure that we find any bundled executables (e.g. JACK), - and find them before any instances of the same name - elsewhere in PATH - */ - /* note that this function is POSIX/Linux specific, so using / as a dir separator in this context is just fine. */ - path = dir_path; - path += "/etc:"; - path += dir_path; - path += "/lib/surfaces:"; - path += dir_path; - path += "/lib/panners:"; - - setenv ("ARDOUR_MODULE_PATH", path.c_str(), 1); - - path = userconfigdir; - path += ':'; - path += dir_path; - path += "/etc/icons:"; - path += dir_path; - path += "/etc/pixmaps:"; - path += dir_path; - path += "/share:"; - path += dir_path; - path += "/etc"; - - setenv ("ARDOUR_PATH", path.c_str(), 1); - setenv ("ARDOUR_CONFIG_PATH", path.c_str(), 1); - - path = dir_path; - path += "/etc"; - setenv ("ARDOUR_INSTANT_XML_PATH", path.c_str(), 1); + export_search_path (dir_path, "ARDOUR_DLL_PATH", "/lib"); + export_search_path (dir_path, "ARDOUR_CONFIG_PATH", "/etc"); + export_search_path (dir_path, "ARDOUR_INSTANT_XML_PATH", "/share"); + export_search_path (dir_path, "ARDOUR_DATA_PATH", "/share"); export_search_path (dir_path, "LADSPA_PATH", "/../plugins"); export_search_path (dir_path, "VAMP_PATH", "/lib"); - export_search_path (dir_path, "ARDOUR_PANNER_PATH", "/lib/panners"); - export_search_path (dir_path, "ARDOUR_SURFACES_PATH", "/lib/surfaces"); - export_search_path (dir_path, "ARDOUR_MIDIMAPS_PATH", "/share/midi_maps"); - export_search_path (dir_path, "ARDOUR_MCP_PATH", "/share/mcp"); - export_search_path (dir_path, "ARDOUR_EXPORT_FORMATS_PATH", "/share/export"); path = dir_path; path += "/lib/clearlooks"; @@ -367,7 +317,7 @@ fixup_bundle_environment (int /*argc*/, char* argv[]) } /* Tell fontconfig where to find fonts.conf. Use the system version - if it exists, otherwise use the stuff we included in t + if it exists, otherwise use the stuff we included in the bundle */ if (Glib::file_test ("/etc/fonts/fonts.conf", Glib::FILE_TEST_EXISTS)) { diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 76db1a7b69..142b6c6988 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -2909,7 +2909,7 @@ MidiRegionView::change_note_lengths (bool fine, bool shorter, Evoral::MusicalTim delta = trackview.editor().get_grid_type_as_beats (success, _region->position()); if (!success) { /* XXX cannot get grid type as beats ... should always be possible ... FIX ME */ - cerr << "Grid type not available as beats - TO BE FIXED\n"; + error << string_compose (_("programming error: %1"), "Grid type not available as beats - TO BE FIXED") << endmsg; return; } } diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 3bd67af9a0..f38913fe31 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -861,7 +861,6 @@ void MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool show) { if (param.type() == NullAutomation) { - cerr << "WARNING: Attempt to create NullAutomation child, ignoring" << endl; return; } @@ -874,8 +873,6 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool * since it will have been set visible by default. */ - cerr << "show existing auto track: " << show << " noredraw " << no_redraw << endl; - if (existing->second->set_marked_for_display (show) && !no_redraw) { request_redraw (); } diff --git a/gtk2_ardour/missing_file_dialog.cc b/gtk2_ardour/missing_file_dialog.cc index 66085217d2..54b20b547b 100644 --- a/gtk2_ardour/missing_file_dialog.cc +++ b/gtk2_ardour/missing_file_dialog.cc @@ -59,7 +59,6 @@ MissingFileDialog::MissingFileDialog (Session* s, const std::string& path, DataT string dirstr; dirstr = s->source_search_path (type); - cerr << "Search path = " << dirstr << endl; replace_all (dirstr, ":", "\n"); msg.set_justify (JUSTIFY_CENTER); diff --git a/gtk2_ardour/mixer_actor.cc b/gtk2_ardour/mixer_actor.cc index b309b9fd7f..437da39bab 100644 --- a/gtk2_ardour/mixer_actor.cc +++ b/gtk2_ardour/mixer_actor.cc @@ -83,13 +83,12 @@ MixerActor::load_bindings () bindings.set_action_map (myactions); sys::path binding_file; - SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path(); - if (find_file_in_search_path (spath, "mixer.bindings", binding_file)) { + if (find_file_in_search_path (ardour_config_search_path(), "mixer.bindings", binding_file)) { bindings.load (binding_file.to_string()); info << string_compose (_("Loaded mixer bindings from %1"), binding_file.to_string()) << endmsg; } else { - error << string_compose (_("Could not find mixer.bindings in search path %1"), spath.to_string()) << endmsg; + error << string_compose (_("Could not find mixer.bindings in search path %1"), ardour_config_search_path().to_string()) << endmsg; } } diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc index 5b5cdc0f52..863c29f243 100644 --- a/gtk2_ardour/port_group.cc +++ b/gtk2_ardour/port_group.cc @@ -321,9 +321,12 @@ public: /** Gather ports from around the system and put them in this PortGroupList. * @param type Type of ports to collect, or NIL for all types. + * @param use_session_bundles true to use the session's non-user bundles. Doing this will mean that + * hardware ports will be gathered into stereo pairs, as the session sets up bundles for these pairs. + * Not using the session bundles will mean that all hardware IO will be presented separately. */ void -PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inputs, bool allow_dups) +PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inputs, bool allow_dups, bool use_session_bundles) { clear (); @@ -408,9 +411,12 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp } } - for (BundleList::iterator i = b->begin(); i != b->end(); ++i) { - if (boost::dynamic_pointer_cast (*i) == 0 && (*i)->ports_are_inputs() == inputs) { - system->add_bundle (*i, allow_dups); + /* Only look for non-user bundles if instructed to do so */ + if (use_session_bundles) { + for (BundleList::iterator i = b->begin(); i != b->end(); ++i) { + if (boost::dynamic_pointer_cast (*i) == 0 && (*i)->ports_are_inputs() == inputs) { + system->add_bundle (*i, allow_dups); + } } } diff --git a/gtk2_ardour/port_group.h b/gtk2_ardour/port_group.h index 3e13c3a5e3..a9dfc1a4ad 100644 --- a/gtk2_ardour/port_group.h +++ b/gtk2_ardour/port_group.h @@ -107,7 +107,7 @@ class PortGroupList : public sigc::trackable void add_group (boost::shared_ptr); void add_group_if_not_empty (boost::shared_ptr); - void gather (ARDOUR::Session *, ARDOUR::DataType, bool, bool); + void gather (ARDOUR::Session *, ARDOUR::DataType, bool, bool, bool); PortGroup::BundleList const & bundles () const; void clear (); void remove_bundle (boost::shared_ptr); diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc index a259f357ce..7f0d9fb9f3 100644 --- a/gtk2_ardour/port_matrix.cc +++ b/gtk2_ardour/port_matrix.cc @@ -213,6 +213,7 @@ PortMatrix::setup () _body->setup (); setup_scrollbars (); + update_tab_highlighting (); queue_draw (); } @@ -411,23 +412,25 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t) boost::weak_ptr w (bc[dim].bundle); - /* Start off with options for the `natural' port type */ - for (DataType::iterator i = DataType::begin(); i != DataType::end(); ++i) { - if (should_show (*i)) { - snprintf (buf, sizeof (buf), _("Add %s %s"), (*i).to_i18n_string(), channel_noun().c_str()); - sub.push_back (MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::add_channel_proxy), w, *i))); + if (can_add_channels (bc[dim].bundle)) { + /* Start off with options for the `natural' port type */ + for (DataType::iterator i = DataType::begin(); i != DataType::end(); ++i) { + if (should_show (*i)) { + snprintf (buf, sizeof (buf), _("Add %s %s"), (*i).to_i18n_string(), channel_noun().c_str()); + sub.push_back (MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::add_channel_proxy), w, *i))); + } + } + + /* Now add other ones */ + for (DataType::iterator i = DataType::begin(); i != DataType::end(); ++i) { + if (!should_show (*i)) { + snprintf (buf, sizeof (buf), _("Add %s %s"), (*i).to_i18n_string(), channel_noun().c_str()); + sub.push_back (MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::add_channel_proxy), w, *i))); + } } } - /* Now add other ones */ - for (DataType::iterator i = DataType::begin(); i != DataType::end(); ++i) { - if (!should_show (*i)) { - snprintf (buf, sizeof (buf), _("Add %s %s"), (*i).to_i18n_string(), channel_noun().c_str()); - sub.push_back (MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::add_channel_proxy), w, *i))); - } - } - - if (can_rename_channels (bc[dim].bundle)) { + if (can_rename_channels (bc[dim].bundle) && bc[dim].channel != -1) { snprintf ( buf, sizeof (buf), _("Rename '%s'..."), escape_underscores (bc[dim].bundle->channel_name (bc[dim].channel)).c_str() @@ -623,6 +626,11 @@ PortMatrix::toggle_show_only_bundles () _show_only_bundles = !_show_only_bundles; setup (); + + /* The way in which hardware ports are grouped changes depending on the _show_only_bundles + setting, so we need to set things up again now. + */ + setup_all_ports (); } pair @@ -672,7 +680,7 @@ PortMatrix::io_from_bundle (boost::shared_ptr b) const } bool -PortMatrix::can_add_channel (boost::shared_ptr b) const +PortMatrix::can_add_channels (boost::shared_ptr b) const { return io_from_bundle (b); } @@ -770,6 +778,7 @@ PortMatrix::setup_notebooks () dummy->show (); Label* label = manage (new Label ((*i)->name)); label->set_angle (_arrangement == LEFT_TO_BOTTOM ? 90 : -90); + label->set_use_markup (); label->show (); if (_arrangement == LEFT_TO_BOTTOM) { _vnotebook.prepend_page (*dummy, *label); @@ -785,7 +794,10 @@ PortMatrix::setup_notebooks () for (PortGroupList::List::const_iterator i = _ports[_column_index].begin(); i != _ports[_column_index].end(); ++i) { HBox* dummy = manage (new HBox); dummy->show (); - _hnotebook.append_page (*dummy, (*i)->name); + Label* label = manage (new Label ((*i)->name)); + label->set_use_markup (); + label->show (); + _hnotebook.append_page (*dummy, *label); } _ignore_notebook_page_selected = false; @@ -947,6 +959,55 @@ void PortMatrix::port_connected_or_disconnected () { _body->rebuild_and_draw_grid (); + update_tab_highlighting (); +} + +/** Update the highlighting of tab names to reflect which ones + * have connections. This is pretty inefficient, unfortunately, + * but maybe that doesn't matter too much. + */ +void +PortMatrix::update_tab_highlighting () +{ + for (int i = 0; i < 2; ++i) { + + Gtk::Notebook* notebook = row_index() == i ? &_vnotebook : &_hnotebook; + + PortGroupList const * gl = ports (i); + int p = 0; + for (PortGroupList::List::const_iterator j = gl->begin(); j != gl->end(); ++j) { + bool has_connection = false; + PortGroup::BundleList const & bl = (*j)->bundles (); + PortGroup::BundleList::const_iterator k = bl.begin (); + while (k != bl.end()) { + if ((*k)->bundle->connected_to_anything (_session->engine())) { + has_connection = true; + break; + } + ++k; + } + + /* Find the page index that we should update; this is backwards + for the vertical tabs in the LEFT_TO_BOTTOM arrangement. + */ + int page = p; + if (i == row_index() && _arrangement == LEFT_TO_BOTTOM) { + page = notebook->get_n_pages() - p - 1; + } + + Gtk::Label* label = dynamic_cast (notebook->get_tab_label(*notebook->get_nth_page (page))); + string c = label->get_label (); + if (c.length() && c[0] == '<' && !has_connection) { + /* this label is marked up with but shouldn't be */ + label->set_markup ((*j)->name); + } else if (c.length() && c[0] != '<' && has_connection) { + /* this label is not marked up with but should be */ + label->set_markup (string_compose ("%1", (*j)->name)); + } + + ++p; + } + } } string diff --git a/gtk2_ardour/port_matrix.h b/gtk2_ardour/port_matrix.h index 75b2abf279..5614293e45 100644 --- a/gtk2_ardour/port_matrix.h +++ b/gtk2_ardour/port_matrix.h @@ -141,7 +141,7 @@ public: virtual PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const = 0; virtual bool list_is_global (int) const = 0; - virtual bool can_add_channel (boost::shared_ptr) const; + virtual bool can_add_channels (boost::shared_ptr) const; virtual void add_channel (boost::shared_ptr, ARDOUR::DataType); virtual bool can_remove_channels (boost::shared_ptr) const; virtual void remove_channel (ARDOUR::BundleChannel); @@ -198,6 +198,7 @@ private: void add_remove_option (Gtk::Menu_Helpers::MenuList &, boost::weak_ptr, int); void add_disassociate_option (Gtk::Menu_Helpers::MenuList &, boost::weak_ptr, int, int); void port_connected_or_disconnected (); + void update_tab_highlighting (); Gtk::Window* _parent; diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 64ba5b067d..bd8d390962 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -1287,10 +1287,13 @@ RouteUI::solo_isolate_button_release (GdkEventButton* ev) } bool -RouteUI::solo_safe_button_release (GdkEventButton*) +RouteUI::solo_safe_button_release (GdkEventButton* ev) { - _route->set_solo_safe (!solo_safe_led->active_state(), this); - return true; + if (ev->button == 1) { + _route->set_solo_safe (!solo_safe_led->active_state(), this); + return true; + } + return false; } void diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index 8a6f04a6f7..724618e540 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -1025,6 +1025,7 @@ Selection::set (ControlPoint* cp) cp->line().nth (i)->set_selected (false); } + clear_points (); add (cp); } diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index dc9edf56c6..5451fe180e 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -447,6 +447,9 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S { chooser.set_border_width (12); + audio_and_midi_filter.add_custom (FILE_FILTER_FILENAME, sigc::mem_fun (*this, &SoundFileBrowser::on_audio_and_midi_filter)); + audio_and_midi_filter.set_name (_("Audio and MIDI files")); + audio_filter.add_custom (FILE_FILTER_FILENAME, sigc::mem_fun(*this, &SoundFileBrowser::on_audio_filter)); audio_filter.set_name (_("Audio files")); @@ -456,6 +459,7 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S matchall_filter.add_pattern ("*.*"); matchall_filter.set_name (_("All files")); + chooser.add_filter (audio_and_midi_filter); chooser.add_filter (audio_filter); chooser.add_filter (midi_filter); chooser.add_filter (matchall_filter); @@ -700,6 +704,12 @@ SoundFileBrowser::on_midi_filter (const FileFilter::Info& filter_info) return SMFSource::safe_midi_file_extension (filter_info.filename); } +bool +SoundFileBrowser::on_audio_and_midi_filter (const FileFilter::Info& filter_info) +{ + return on_audio_filter (filter_info) || on_midi_filter (filter_info); +} + void SoundFileBrowser::update_preview () { @@ -1043,6 +1053,8 @@ SoundFileOmega::reset_options () string existing_choice; vector action_strings; + resetting_ourselves = true; + if (chooser.get_filter() == &audio_filter) { /* AUDIO */ @@ -1071,10 +1083,10 @@ SoundFileOmega::reset_options () } } } - + } else { - /* MIDI */ + /* MIDI ONLY */ if (selected_midi_track_cnt > 0) { action_strings.push_back (importmode2string (ImportToTrack)); @@ -1085,8 +1097,6 @@ SoundFileOmega::reset_options () action_strings.push_back (importmode2string (ImportAsRegion)); action_strings.push_back (importmode2string (ImportAsTapeTrack)); - resetting_ourselves = true; - existing_choice = action_combo.get_active_text(); set_popdown_strings (action_combo, action_strings); @@ -1573,6 +1583,15 @@ SoundFileOmega::reset (uint32_t selected_audio_tracks, uint32_t selected_midi_tr { selected_audio_track_cnt = selected_audio_tracks; selected_midi_track_cnt = selected_midi_tracks; + + if (selected_audio_track_cnt == 0 && selected_midi_track_cnt > 0) { + chooser.set_filter (midi_filter); + } else if (selected_midi_track_cnt == 0 && selected_audio_track_cnt > 0) { + chooser.set_filter (audio_filter); + } else { + chooser.set_filter (audio_and_midi_filter); + } + reset_options (); } diff --git a/gtk2_ardour/sfdb_ui.h b/gtk2_ardour/sfdb_ui.h index f497477866..249ebf3535 100644 --- a/gtk2_ardour/sfdb_ui.h +++ b/gtk2_ardour/sfdb_ui.h @@ -182,6 +182,7 @@ class SoundFileBrowser : public ArdourDialog protected: bool resetting_ourselves; + Gtk::FileFilter audio_and_midi_filter; Gtk::FileFilter audio_filter; Gtk::FileFilter midi_filter; Gtk::FileFilter custom_filter; @@ -216,6 +217,7 @@ class SoundFileBrowser : public ArdourDialog bool on_audio_filter (const Gtk::FileFilter::Info& filter_info); bool on_midi_filter (const Gtk::FileFilter::Info& filter_info); + bool on_audio_and_midi_filter (const Gtk::FileFilter::Info& filter_info); virtual bool reset_options() { return true; } diff --git a/gtk2_ardour/splash.cc b/gtk2_ardour/splash.cc index 8d6e84bae2..f91ae89e69 100644 --- a/gtk2_ardour/splash.cc +++ b/gtk2_ardour/splash.cc @@ -22,7 +22,7 @@ Splash::Splash () { sys::path splash_file; - if (!find_file_in_search_path (ardour_search_path() + system_data_search_path(), "splash.png", splash_file)) { + if (!find_file_in_search_path (ardour_data_search_path(), "splash.png", splash_file)) { throw failed_constructor(); } diff --git a/gtk2_ardour/startup.cc b/gtk2_ardour/startup.cc index 220f406287..1c0ddfa6b4 100644 --- a/gtk2_ardour/startup.cc +++ b/gtk2_ardour/startup.cc @@ -549,10 +549,10 @@ ArdourStartup::setup_initial_choice_page () centering_vbox->pack_start (ic_new_session_button, false, true); centering_vbox->pack_start (ic_existing_session_button, false, true); - ic_new_session_button.signal_button_press_event().connect(sigc::mem_fun(*this, &ArdourStartup::initial_button_press), false); + ic_new_session_button.signal_clicked().connect(sigc::mem_fun(*this, &ArdourStartup::initial_button_clicked)); ic_new_session_button.signal_activate().connect(sigc::mem_fun(*this, &ArdourStartup::initial_button_activated), false); - ic_existing_session_button.signal_button_press_event().connect(sigc::mem_fun(*this, &ArdourStartup::initial_button_press), false); + ic_existing_session_button.signal_clicked().connect(sigc::mem_fun(*this, &ArdourStartup::initial_button_clicked)); ic_existing_session_button.signal_activate().connect(sigc::mem_fun(*this, &ArdourStartup::initial_button_activated), false); centering_hbox->pack_start (*centering_vbox, true, true); @@ -572,21 +572,20 @@ ArdourStartup::setup_initial_choice_page () set_page_complete (ic_vbox, true); } -bool -ArdourStartup::initial_button_press (GdkEventButton *event) +void +ArdourStartup::initial_button_clicked () { - if (event && event->type == GDK_2BUTTON_PRESS && session_page_index != -1) { + if (session_page_index != -1) { set_current_page(session_page_index); - return true; - } else { - return false; } } void ArdourStartup::initial_button_activated () { - set_current_page(session_page_index); + if (session_page_index != -1) { + set_current_page(session_page_index); + } } void @@ -716,7 +715,7 @@ ArdourStartup::populate_session_templates () static bool lost_name_entry_focus (GdkEventFocus*) { - cerr << "lost focus\n"; + // cerr << "lost focus\n"; return false; } @@ -892,7 +891,7 @@ ArdourStartup::setup_new_session_page () void ArdourStartup::new_name_mapped () { - cerr << "Grab new name focus\n"; + // cerr << "Grab new name focus\n"; new_name_entry.grab_focus (); } diff --git a/gtk2_ardour/startup.h b/gtk2_ardour/startup.h index 052a168a37..59f29604f0 100644 --- a/gtk2_ardour/startup.h +++ b/gtk2_ardour/startup.h @@ -117,7 +117,7 @@ class ArdourStartup : public Gtk::Assistant { Gtk::VBox ic_vbox; Gtk::RadioButton ic_new_session_button; Gtk::RadioButton ic_existing_session_button; - bool initial_button_press(GdkEventButton *); + void initial_button_clicked(); void initial_button_activated(); /* monitoring choices */ diff --git a/gtk2_ardour/step_entry.cc b/gtk2_ardour/step_entry.cc index 61bdeacae0..8e8bd3a3fa 100644 --- a/gtk2_ardour/step_entry.cc +++ b/gtk2_ardour/step_entry.cc @@ -709,9 +709,8 @@ StepEntry::load_bindings () bindings.set_action_map (myactions); sys::path binding_file; - SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path(); - if (find_file_in_search_path (spath, "step_editing.bindings", binding_file)) { + if (find_file_in_search_path (ardour_config_search_path(), "step_editing.bindings", binding_file)) { bindings.load (binding_file.to_string()); } } diff --git a/gtk2_ardour/theme_manager.cc b/gtk2_ardour/theme_manager.cc index 887ca5453c..8c9d559441 100644 --- a/gtk2_ardour/theme_manager.cc +++ b/gtk2_ardour/theme_manager.cc @@ -36,6 +36,7 @@ #include "ardour/filesystem_paths.h" #include "ardour/profile.h" +#include "ardour_button.h" #include "theme_manager.h" #include "rgb_macros.h" #include "ardour_ui.h" @@ -52,10 +53,11 @@ sigc::signal ColorsChanged; sigc::signal ColorChanged; ThemeManager::ThemeManager() - : ArdourWindow (_("Theme Manager")), - dark_button (_("Dark Theme")), - light_button (_("Light Theme")), - reset_button (_("Restore Defaults")) + : ArdourWindow (_("Theme Manager")) + , dark_button (_("Dark Theme")) + , light_button (_("Light Theme")) + , reset_button (_("Restore Defaults")) + , flat_buttons (_("Draw \"flat\" buttons")) { set_title (_("Theme Manager")); @@ -90,6 +92,7 @@ ThemeManager::ThemeManager() vbox->set_homogeneous (false); vbox->pack_start (theme_selection_hbox, PACK_SHRINK); vbox->pack_start (reset_button, PACK_SHRINK); + vbox->pack_start (flat_buttons, PACK_SHRINK); vbox->pack_start (scroller); add (*vbox); @@ -103,6 +106,7 @@ ThemeManager::ThemeManager() dark_button.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_dark_theme_button_toggled)); light_button.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_light_theme_button_toggled)); reset_button.signal_clicked().connect (sigc::mem_fun (*this, &ThemeManager::reset_canvas_colors)); + flat_buttons.signal_toggled().connect (sigc::mem_fun (*this, &ThemeManager::on_flat_buttons_toggled)); set_size_request (-1, 400); setup_theme (); @@ -202,13 +206,9 @@ load_rc_file (const string& filename, bool themechange) { sys::path rc_file_path; - SearchPath spath (ardour_search_path()); - spath += user_config_directory(); - spath += system_config_search_path(); - - if (!find_file_in_search_path (spath, filename, rc_file_path)) { + if (!find_file_in_search_path (ardour_config_search_path(), filename, rc_file_path)) { warning << string_compose (_("Unable to find UI style file %1 in search path %2. %3 will look strange"), - filename, spath.to_string(), PROGRAM_NAME) + filename, ardour_config_search_path().to_string(), PROGRAM_NAME) << endmsg; return; } @@ -230,6 +230,16 @@ load_rc_file (const string& filename, bool themechange) #define HACK_PROFILE_IS_SAE() (getenv("ARDOUR_SAE")!=0) +void +ThemeManager::on_flat_buttons_toggled () +{ + ARDOUR_UI::config()->flat_buttons.set (flat_buttons.get_active()); + ARDOUR_UI::config()->set_dirty (); + ArdourButton::set_flat_buttons (flat_buttons.get_active()); + /* force a redraw */ + gtk_rc_reset_styles (gtk_settings_get_default()); +} + void ThemeManager::on_dark_theme_button_toggled() { @@ -337,7 +347,9 @@ ThemeManager::setup_theme () } else if (rcfile == "ardour3_ui_light.rc" || rcfile == "ardour3_ui_light_sae.rc") { light_button.set_active(); } - + + flat_buttons.set_active (ARDOUR_UI::config()->flat_buttons.get()); + load_rc_file(rcfile, false); } diff --git a/gtk2_ardour/theme_manager.h b/gtk2_ardour/theme_manager.h index 7ba57df2ba..2fe4482905 100644 --- a/gtk2_ardour/theme_manager.h +++ b/gtk2_ardour/theme_manager.h @@ -42,6 +42,7 @@ class ThemeManager : public ArdourWindow void on_dark_theme_button_toggled (); void on_light_theme_button_toggled (); + void on_flat_buttons_toggled (); private: struct ColorDisplayModelColumns : public Gtk::TreeModel::ColumnRecord { @@ -67,6 +68,7 @@ class ThemeManager : public ArdourWindow Gtk::RadioButton dark_button; Gtk::RadioButton light_button; Gtk::Button reset_button; + Gtk::CheckButton flat_buttons; bool button_press_event (GdkEventButton*); }; diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc index 17ba896f1f..0d41ade0a5 100644 --- a/gtk2_ardour/ui_config.cc +++ b/gtk2_ardour/ui_config.cc @@ -75,8 +75,7 @@ UIConfiguration::load_defaults () rcfile = "ardour3_ui_default.conf"; } - if (find_file_in_search_path (ardour_search_path() + system_config_search_path(), - rcfile, default_ui_rc_file) ) { + if (find_file_in_search_path (ardour_config_search_path(), rcfile, default_ui_rc_file) ) { XMLTree tree; found = 1; @@ -107,8 +106,7 @@ UIConfiguration::load_state () sys::path default_ui_rc_file; - if ( find_file_in_search_path (ardour_search_path() + system_config_search_path(), - "ardour3_ui_default.conf", default_ui_rc_file) ) { + if ( find_file_in_search_path (ardour_config_search_path(), "ardour3_ui_default.conf", default_ui_rc_file)) { XMLTree tree; found = true; @@ -129,8 +127,7 @@ UIConfiguration::load_state () sys::path user_ui_rc_file; - if (find_file_in_search_path (ardour_search_path() + user_config_directory(), - "ardour3_ui.conf", user_ui_rc_file)) { + if (find_file_in_search_path (ardour_config_search_path(), "ardour3_ui.conf", user_ui_rc_file)) { XMLTree tree; found = true; diff --git a/gtk2_ardour/ui_config_vars.h b/gtk2_ardour/ui_config_vars.h index 1fa288867f..f42d98476b 100644 --- a/gtk2_ardour/ui_config_vars.h +++ b/gtk2_ardour/ui_config_vars.h @@ -1,2 +1,3 @@ UI_CONFIG_VARIABLE(std::string, ui_rc_file, "ui-rc-file", "ardour3_ui_dark.rc") +UI_CONFIG_VARIABLE(bool, flat_buttons, "flat-buttons", false) diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index d061fce35f..988bd370ae 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -494,8 +494,7 @@ get_xpm (std::string name) { if (!xpm_map[name]) { - SearchPath spath(ARDOUR::ardour_search_path()); - spath += ARDOUR::system_data_search_path(); + SearchPath spath(ARDOUR::ardour_data_search_path()); spath.add_subdirectory_to_paths("pixmaps"); @@ -521,15 +520,14 @@ get_icon_path (const char* cname) string name = cname; name += X_(".png"); - SearchPath spath(ARDOUR::ardour_search_path()); - spath += ARDOUR::system_data_search_path(); + SearchPath spath(ARDOUR::ardour_data_search_path()); spath.add_subdirectory_to_paths("icons"); sys::path data_file_path; if (!find_file_in_search_path (spath, name, data_file_path)) { - fatal << string_compose (_("cannot find icon image for %1"), name) << endmsg; + fatal << string_compose (_("cannot find icon image for %1 using %2"), name, spath.to_string()) << endmsg; } return data_file_path.to_string(); diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 8c57ea0b4d..0a740aab81 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -406,9 +406,7 @@ def build(bld): 'VERSIONSTRING="' + bld.env['VERSION'] + '"', 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', - 'MODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"', - 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), - 'locale') + '"', + 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"', 'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"' ] obj.includes += ['../libs'] @@ -450,6 +448,8 @@ def build(bld): wrapper_subst_dict = { 'INSTALL_PREFIX' : bld.env['PREFIX'], 'LIBDIR' : os.path.normpath(bld.env['LIBDIR']), + 'DATADIR' : os.path.normpath(bld.env['DATADIR']), + 'SYSCONFDIR' : os.path.normpath(bld.env['SYSCONFDIR']), 'LIBS' : 'build/libs', 'VERSION' : '3.0', 'EXECUTABLE' : 'build/gtk2_ardour/ardour-3.0' @@ -645,8 +645,6 @@ def build(bld): # Default UI configuration bld.install_files('${SYSCONFDIR}/ardour3', 'ardour3_ui_default.conf') - # Generic widget style mappings - bld.install_files('${SYSCONFDIR}/ardour3', 'ardour3_widgets.rc') # Default export stuff bld.install_files('${SYSCONFDIR}/ardour3/export', bld.path.ant_glob('export/*.format')) diff --git a/libs/ardour/ardour/bundle.h b/libs/ardour/ardour/bundle.h index 46b07c48f5..2bf614e75f 100644 --- a/libs/ardour/ardour/bundle.h +++ b/libs/ardour/ardour/bundle.h @@ -99,6 +99,7 @@ class Bundle : public PBD::ScopedConnectionList void connect (boost::shared_ptr, AudioEngine &); void disconnect (boost::shared_ptr, AudioEngine &); bool connected_to (boost::shared_ptr, AudioEngine &); + bool connected_to_anything (AudioEngine &); bool has_same_ports (boost::shared_ptr) const; uint32_t type_channel_to_overall (DataType, uint32_t) const; uint32_t overall_channel_to_type (DataType, uint32_t) const; diff --git a/libs/ardour/ardour/filesystem_paths.h b/libs/ardour/ardour/filesystem_paths.h index e183193cb0..120ae25f97 100644 --- a/libs/ardour/ardour/filesystem_paths.h +++ b/libs/ardour/ardour/filesystem_paths.h @@ -35,13 +35,20 @@ namespace ARDOUR { * @return the path to the directory that contains the system wide ardour * modules. */ - PBD::sys::path ardour_module_directory (); + PBD::sys::path ardour_dll_directory (); - PBD::SearchPath ardour_search_path (); + /** + * @return the search path to be used when looking for per-system + * configuration files. This may include user configuration files. + */ + PBD::SearchPath ardour_config_search_path (); - PBD::SearchPath system_config_search_path (); - - PBD::SearchPath system_data_search_path (); + /** + * @return the search path to be used when looking for data files + * that could be shared by systems (h/w and configuration independent + * files, such as icons, XML files, etc) + */ + PBD::SearchPath ardour_data_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index 33a81c4f27..7b9c9a75fe 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -106,6 +106,7 @@ generate_inverse_coefficient_curve (boost::shared_ptr dst, static void generate_db_fade (boost::shared_ptr dst, double len, int num_steps, float dB_drop) { + dst->clear (); dst->fast_simple_add (0, 1); //generate a fade-out curve by successively applying a gain drop @@ -1019,6 +1020,8 @@ AudioRegion::set_fade_in (FadeShape shape, framecnt_t len) generate_db_fade (c1, len, 10, -1); // start off with a slow fade generate_db_fade (c2, len, 10, -80); // end with a fast fade merge_curves (_fade_in, c1, c2); + reverse_curve (c3, _fade_in); + _fade_in->copy_events (*c3); generate_inverse_power_curve (_inverse_fade_in, _fade_in); break; @@ -1032,20 +1035,22 @@ AudioRegion::set_fade_in (FadeShape shape, framecnt_t len) break; case FadeSymmetric: - // starts kind of like a constant power but has a slower fadeout - // however it is NOT constant power and there will be a level drop in the middle of the crossfade - c1->fast_simple_add (0.0, 1.0); - for ( int i = 1; i < 9; i++ ) { - float dist = (float)i/10.0; - c1->fast_simple_add ((len * dist), cos(dist*M_PI/10.0)); + //start with a nearly linear cuve + _fade_in->fast_simple_add (0, 1); + _fade_in->fast_simple_add (0.5*len, 0.6); + //now generate a fade-out curve by successively applying a gain drop + const float breakpoint = 0.7; //linear for first 70% + const int num_steps = 9; + for (int i = 2; i < num_steps; i++) { + float coeff = (1.0-breakpoint); + for (int j = 0; j < i; j++) { + coeff *= 0.5; //6dB drop per step + } + _fade_in->fast_simple_add (len* (breakpoint+((1.0-breakpoint)*(double)i/(double)num_steps)), coeff); } - c1->fast_simple_add (len, VERY_SMALL_SIGNAL); - - //curve 2 is a slow fade at end - generate_db_fade (c2, len, 10, -30 ); - - merge_curves (c3, c1, c2); - reverse_curve (_fade_in, c3); + _fade_in->fast_simple_add (len, VERY_SMALL_SIGNAL); + reverse_curve (c3, _fade_in); + _fade_in->copy_events (*c3); reverse_curve (_inverse_fade_in, _fade_in ); break; } @@ -1084,13 +1089,13 @@ AudioRegion::set_fade_out (FadeShape shape, framecnt_t len) break; case FadeFast: - generate_db_fade (_fade_out, len, 10, -60 ); + generate_db_fade (_fade_out, len, 10, -60); generate_inverse_power_curve (_inverse_fade_out, _fade_out); break; case FadeSlow: - generate_db_fade (c1, len, 10, -1 ); //start off with a slow fade - generate_db_fade (c2, len, 10, -80 ); //end with a fast fade + generate_db_fade (c1, len, 10, -1); //start off with a slow fade + generate_db_fade (c2, len, 10, -80); //end with a fast fade merge_curves (_fade_out, c1, c2); generate_inverse_power_curve (_inverse_fade_out, _fade_out); break; @@ -1108,19 +1113,21 @@ AudioRegion::set_fade_out (FadeShape shape, framecnt_t len) break; case FadeSymmetric: - //starts kind of like a constant power but has a slower fadeout - //however it is NOT constant power and there will be a level drop in the middle of the crossfade - c1->fast_simple_add (0.0, 1.0); - for ( int i = 1; i < 9; i++ ) { - float dist = (float)i/10.0; - c1->fast_simple_add ((len * dist), cos(dist*M_PI/10.0)); //cheesy way of making a flat line + //start with a nearly linear cuve + _fade_out->fast_simple_add (0, 1); + _fade_out->fast_simple_add (0.5*len, 0.6); + + //now generate a fade-out curve by successively applying a gain drop + const float breakpoint = 0.7; //linear for first 70% + const int num_steps = 9; + for (int i = 2; i < num_steps; i++) { + float coeff = (1.0-breakpoint); + for (int j = 0; j < i; j++) { + coeff *= 0.5; //6dB drop per step + } + _fade_out->fast_simple_add (len* (breakpoint+((1.0-breakpoint)*(double)i/(double)num_steps)), coeff); } - c1->fast_simple_add (len, VERY_SMALL_SIGNAL); - - //curve 2 is a slow fade at end - generate_db_fade (c2, len, 10, -30); - - merge_curves (_fade_out, c1, c2); + _fade_out->fast_simple_add (len, VERY_SMALL_SIGNAL); reverse_curve (_inverse_fade_out, _fade_out); break; } @@ -1875,12 +1882,20 @@ AudioRegion::get_single_other_xfade_region (bool start) const framecnt_t AudioRegion::verify_xfade_bounds (framecnt_t len, bool start) { + /* this is called from a UI to check on whether a new proposed + length for an xfade is legal or not. it returns the legal + length corresponding to @a len which may be shorter than or + equal to @a len itself. + */ + boost::shared_ptr other = get_single_other_xfade_region (start); framecnt_t maxlen; if (!other) { - /* zero or > 2 regions here, don't care about len */ - return len; + /* zero or > 2 regions here, don't care about len, but + it can't be longer than the region itself. + */ + return min (length(), len); } /* we overlap a single region. clamp the length of an xfade to @@ -1894,7 +1909,7 @@ AudioRegion::verify_xfade_bounds (framecnt_t len, bool start) maxlen = last_frame() - other->earliest_possible_position(); } - return min (maxlen, len); + return min (length(), min (maxlen, len)); } diff --git a/libs/ardour/bundle.cc b/libs/ardour/bundle.cc index dd4bacdff2..6180836bd2 100644 --- a/libs/ardour/bundle.cc +++ b/libs/ardour/bundle.cc @@ -440,6 +440,34 @@ Bundle::connected_to (boost::shared_ptr other, AudioEngine & engine) return true; } +/** This must not be called in code executed as a response to a JACK event, + * as it uses jack_port_get_all_connections(). + * @return true if any of this bundle's channels are connected to anything. + */ +bool +Bundle::connected_to_anything (AudioEngine& engine) +{ + for (uint32_t i = 0; i < nchannels().n_total(); ++i) { + Bundle::PortList const & ports = channel_ports (i); + + for (uint32_t j = 0; j < ports.size(); ++j) { + /* ports[j] may not be an Ardour port, so use JACK directly + rather than doing it with Port. + */ + jack_port_t* jp = jack_port_by_name (engine.jack(), ports[j].c_str()); + if (jp) { + const char ** c = jack_port_get_all_connections (engine.jack(), jp); + if (c) { + jack_free (c); + return true; + } + } + } + } + + return false; +} + void Bundle::set_ports_are_inputs () { diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc index 59001dce14..2931fe46e5 100644 --- a/libs/ardour/control_protocol_manager.cc +++ b/libs/ardour/control_protocol_manager.cc @@ -210,7 +210,7 @@ ControlProtocolManager::discover_control_protocols () dylib_extension_pattern, cp_modules); DEBUG_TRACE (DEBUG::ControlProtocols, - string_compose (_("looking for control protocols in %1"), control_protocol_search_path().to_string())); + string_compose (_("looking for control protocols in %1\n"), control_protocol_search_path().to_string())); for (vector::iterator i = cp_modules.begin(); i != cp_modules.end(); ++i) { control_protocol_discover ((*i).to_string()); @@ -222,12 +222,14 @@ ControlProtocolManager::control_protocol_discover (string path) { ControlProtocolDescriptor* descriptor; - /* don't load shared objects that are just symlinks to the real thing. +#ifdef __APPLE__ + /* don't load OS X shared objects that are just symlinks to the real thing. */ - if (Glib::file_test (path, Glib::FILE_TEST_IS_SYMLINK)) { + if (path.find (".dylib") && Glib::file_test (path, Glib::FILE_TEST_IS_SYMLINK)) { return 0; } +#endif if ((descriptor = get_descriptor (path)) != 0) { diff --git a/libs/ardour/control_protocol_search_path.cc b/libs/ardour/control_protocol_search_path.cc index 345989277b..157531cbf2 100644 --- a/libs/ardour/control_protocol_search_path.cc +++ b/libs/ardour/control_protocol_search_path.cc @@ -17,6 +17,8 @@ */ +#include + #include #include "ardour/control_protocol_search_path.h" @@ -36,7 +38,7 @@ control_protocol_search_path () { SearchPath spath (user_config_directory ()); - spath += ardour_module_directory (); + spath += ardour_dll_directory (); spath.add_subdirectory_to_paths (surfaces_dir_name); bool surfaces_path_defined = false; diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc index 2d14494764..271de8f849 100644 --- a/libs/ardour/filesystem_paths.cc +++ b/libs/ardour/filesystem_paths.cc @@ -17,10 +17,11 @@ */ #include +#include #include "pbd/error.h" #include "pbd/compose.h" -#include "pbd/filesystem_paths.h" +#include "pbd/strsplit.h" #include #include @@ -90,38 +91,72 @@ user_config_directory () } sys::path -ardour_module_directory () +ardour_dll_directory () { - sys::path module_directory(MODULE_DIR); - module_directory /= "ardour3"; - return module_directory; + std::string s = Glib::getenv("ARDOUR_DLL_PATH"); + if (s.empty()) { + std::cerr << _("ARDOUR_DLL_PATH not set in environment - exiting\n"); + ::exit (1); + } + return sys::path (s); } SearchPath -ardour_search_path () +ardour_config_search_path () { - SearchPath spath_env(Glib::getenv("ARDOUR_PATH")); - return spath_env; + static bool have_path = false; + static SearchPath search_path; + + if (!have_path) { + SearchPath sp (user_config_directory()); + + std::string s = Glib::getenv("ARDOUR_CONFIG_PATH"); + if (s.empty()) { + std::cerr << _("ARDOUR_CONFIG_PATH not set in environment - exiting\n"); + ::exit (1); + } + + std::vector ss; + split (s, ss, ':'); + for (std::vector::iterator i = ss.begin(); i != ss.end(); ++i) { + sp += sys::path (*i); + } + + search_path = sp; + have_path = true; + std::cerr << "CONFIG PATH: " << search_path.to_string() << std::endl; + } + + return search_path; } SearchPath -system_config_search_path () +ardour_data_search_path () { - SearchPath config_path(system_config_directories()); + static bool have_path = false; + static SearchPath search_path; - config_path.add_subdirectory_to_paths("ardour3"); + if (!have_path) { + SearchPath sp (user_config_directory()); + + std::string s = Glib::getenv("ARDOUR_DATA_PATH"); + if (s.empty()) { + std::cerr << _("ARDOUR_DATA_PATH not set in environment - exiting\n"); + ::exit (1); + } + + std::vector ss; + split (s, ss, ':'); + for (std::vector::iterator i = ss.begin(); i != ss.end(); ++i) { + sp += sys::path (*i); + } + + search_path = sp; + have_path = true; + std::cerr << "DATA PATH: " << search_path.to_string() << std::endl; + } - return config_path; -} - -SearchPath -system_data_search_path () -{ - SearchPath data_path(system_data_directories()); - - data_path.add_subdirectory_to_paths("ardour3"); - - return data_path; + return search_path; } } // namespace ARDOUR diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index 3ad0f010c1..0f0659214b 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -321,17 +321,6 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization) AUPluginInfo::load_cached_info (); #endif - /* Make VAMP look in our library ahead of anything else */ - - char *p = getenv ("VAMP_PATH"); - string vamppath = VAMP_DIR; - if (p) { - vamppath += ':'; - vamppath += p; - } - setenv ("VAMP_PATH", vamppath.c_str(), 1); - - setup_hardware_optimization (try_optimization); SourceFactory::init (); @@ -404,7 +393,7 @@ void ARDOUR::find_bindings_files (map& files) { vector found; - SearchPath spath = ardour_search_path() + user_config_directory() + system_config_search_path(); + SearchPath spath = ardour_config_search_path(); if (getenv ("ARDOUR_SAE")) { Glib::PatternSpec pattern("*SAE-*.bindings"); diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc index 67ed6da941..0c4256e1f4 100644 --- a/libs/ardour/import.cc +++ b/libs/ardour/import.cc @@ -564,6 +564,7 @@ Session::import_audiofiles (ImportStatus& status) /* flush the final length(s) to the header(s) */ for (Sources::iterator x = all_new_sources.begin(); x != all_new_sources.end(); ) { + if ((afs = boost::dynamic_pointer_cast(*x)) != 0) { afs->update_header((*x)->natural_position(), *now, xnow); afs->done_with_peakfile_writes (); @@ -574,6 +575,15 @@ Session::import_audiofiles (ImportStatus& status) Analyser::queue_source_for_analysis (boost::static_pointer_cast(*x), false); } } + + /* imported, copied files cannot be written or removed + */ + + boost::shared_ptr fs = boost::dynamic_pointer_cast(*x); + if (fs) { + fs->mark_immutable (); + fs->mark_nonremovable (); + } /* don't create tracks for empty MIDI sources (channels) */ @@ -590,8 +600,12 @@ Session::import_audiofiles (ImportStatus& status) std::copy (all_new_sources.begin(), all_new_sources.end(), std::back_inserter(status.sources)); } else { - // this can throw...but it seems very unlikely - std::for_each (all_new_sources.begin(), all_new_sources.end(), remove_file_source); + try { + std::for_each (all_new_sources.begin(), all_new_sources.end(), remove_file_source); + } catch (...) { + error << _("Failed to remove some files after failed/cancelled import operation") << endmsg; + } + } status.done = true; diff --git a/libs/ardour/macosx/ardour.xcodeproj/project.pbxproj b/libs/ardour/macosx/ardour.xcodeproj/project.pbxproj index 8786691730..e9708cbefa 100644 --- a/libs/ardour/macosx/ardour.xcodeproj/project.pbxproj +++ b/libs/ardour/macosx/ardour.xcodeproj/project.pbxproj @@ -1061,7 +1061,6 @@ "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_3)", "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_4)", "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_5)", - NO_POSIX_MEMALIGN, ); GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "PACKAGE=\"\\\"libardour\\\"\""; GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_2 = "CONFIG_DIR=\"\\\"/Library/Application\\ Support/Ardour/config\\\"\""; @@ -1110,7 +1109,6 @@ "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_3)", "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_4)", "$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_5)", - NO_POSIX_MEMALIGN, ); GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "PACKAGE=\"\\\"libardour\\\"\""; GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_2 = "CONFIG_DIR=\"\\\"/Library/Application\\ Support/Ardour/config\\\"\""; diff --git a/libs/ardour/midi_patch_search_path.cc b/libs/ardour/midi_patch_search_path.cc index 50f83d852e..3f83375c96 100644 --- a/libs/ardour/midi_patch_search_path.cc +++ b/libs/ardour/midi_patch_search_path.cc @@ -36,7 +36,7 @@ midi_patch_search_path () { SearchPath spath (user_config_directory ()); - spath += ardour_module_directory (); + spath += ardour_dll_directory (); spath.add_subdirectory_to_paths(midi_patch_dir_name); bool midi_patch_path_defined = false; diff --git a/libs/ardour/panner_search_path.cc b/libs/ardour/panner_search_path.cc index 257f9d0c78..debc19c757 100644 --- a/libs/ardour/panner_search_path.cc +++ b/libs/ardour/panner_search_path.cc @@ -36,7 +36,7 @@ panner_search_path () { SearchPath spath (user_config_directory ()); - spath += ardour_module_directory (); + spath += ardour_dll_directory (); spath.add_subdirectory_to_paths(panner_dir_name); bool panner_path_defined = false; diff --git a/libs/ardour/rc_configuration.cc b/libs/ardour/rc_configuration.cc index d5bfc7a9a8..1adde47b2a 100644 --- a/libs/ardour/rc_configuration.cc +++ b/libs/ardour/rc_configuration.cc @@ -84,7 +84,7 @@ RCConfiguration::load_state () /* load system configuration first */ - if (find_file_in_search_path (ardour_search_path() + system_config_search_path(), "ardour_system.rc", system_rc_file)) { + if (find_file_in_search_path (ardour_config_search_path(), "ardour_system.rc", system_rc_file)) { string rcfile = system_rc_file.to_string(); /* stupid XML Parser hates empty files */ @@ -115,7 +115,7 @@ RCConfiguration::load_state () sys::path user_rc_file; - if (find_file_in_search_path (ardour_search_path() + user_config_directory(), "ardour.rc", user_rc_file)) { + if (find_file_in_search_path (ardour_config_search_path(), "ardour.rc", user_rc_file)) { string rcfile = user_rc_file.to_string(); /* stupid XML parser hates empty files */ diff --git a/libs/ardour/run-tests.sh b/libs/ardour/run-tests.sh index 1097804994..768cced8b1 100755 --- a/libs/ardour/run-tests.sh +++ b/libs/ardour/run-tests.sh @@ -8,15 +8,20 @@ if [ ! -f './tempo.cc' ]; then exit 1; fi -srcdir=`pwd` -cd ../../build +cd ../.. +top=`pwd` +cd build libs='libs' export LD_LIBRARY_PATH=$libs/audiographer:$libs/vamp-sdk:$libs/surfaces:$libs/surfaces/control_protocol:$libs/ardour:$libs/midi++2:$libs/pbd:$libs/rubberband:$libs/soundtouch:$libs/gtkmm2ext:$libs/appleutility:$libs/taglib:$libs/evoral:$libs/evoral/src/libsmf:$libs/timecode:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH +export ARDOUR_CONFIG_PATH=$top:$top/gtk2_ardour:$libs/..:$libs/../gtk2_ardour export ARDOUR_PANNER_PATH=$libs/panners/2in2out:$libs/panners/1in2out:$libs/panners/vbap export ARDOUR_SURFACES_PATH=$libs/surfaces/osc:$libs/surfaces/generic_midi:$libs/surfaces/tranzport:$libs/surfaces/powermate:$libs/surfaces/mackie +export ARDOUR_MCP_PATH="../mcp" +export ARDOUR_DLL_PATH=$libs +export ARDOUR_DATA_PATH=$top/gtk2_ardour:$top/build/gtk2_ardour:. if [ "$1" == "--debug" ]; then gdb ./libs/ardour/run-tests diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 2f67915ce5..c21b492c8f 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -925,7 +925,7 @@ Session::load_state (string snapshot_name) /* no version implies very old version of Ardour */ Stateful::loading_state_version = 1000; } else { - if (prop->value().find ('.')) { + if (prop->value().find ('.') != string::npos) { /* old school version format */ if (prop->value()[0] == '2') { Stateful::loading_state_version = 2000; diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index 1f499bc61e..f3f37fa2a1 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -339,7 +339,7 @@ SndFileSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) con if (ret != file_cnt) { char errbuf[256]; sf_error_str (0, errbuf, sizeof (errbuf) - 1); - error << string_compose(_("SndFileSource: @ %1 could not read %2 within %3 (%4) (len = %5)"), start, file_cnt, _name.val().substr (1), errbuf, _length) << endl; + error << string_compose(_("SndFileSource: @ %1 could not read %2 within %3 (%4) (len = %5, ret was %6)"), start, file_cnt, _name.val().substr (1), errbuf, _length, ret) << endl; } _descriptor->release (); return ret; @@ -585,7 +585,7 @@ SndFileSource::set_header_timeline_position () _broadcast_info->set_time_reference (_timeline_position); SNDFILE* sf = _descriptor->allocate (); - + if (sf == 0 || !_broadcast_info->write_to_file (sf)) { error << string_compose (_("cannot set broadcast info for audio file %1 (%2); dropping broadcast info for this file"), _path, _broadcast_info->get_error()) diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc index 388e09fab1..3e4797dac1 100644 --- a/libs/ardour/template_utils.cc +++ b/libs/ardour/template_utils.cc @@ -19,32 +19,20 @@ using namespace PBD; namespace ARDOUR { -sys::path -system_template_directory () +SearchPath +template_search_path () { - SearchPath spath(system_data_search_path()); + SearchPath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(templates_dir_name); - - // just return the first directory in the search path that exists - SearchPath::const_iterator i = std::find_if(spath.begin(), spath.end(), sys::exists); - - if (i == spath.end()) return sys::path(); - - return *i; + return spath; } -sys::path -system_route_template_directory () +SearchPath +route_template_search_path () { - SearchPath spath(system_data_search_path()); + SearchPath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(route_templates_dir_name); - - // just return the first directory in the search path that exists - SearchPath::const_iterator i = std::find_if(spath.begin(), spath.end(), sys::exists); - - if (i == spath.end()) return sys::path(); - - return *i; + return spath; } sys::path @@ -61,7 +49,7 @@ user_route_template_directory () { sys::path p(user_config_directory()); p /= route_templates_dir_name; - + return p; } @@ -100,8 +88,7 @@ find_session_templates (vector& template_names) { vector *templates; PathScanner scanner; - SearchPath spath (system_template_directory()); - spath += user_template_directory (); + SearchPath spath (template_search_path()); templates = scanner (spath.to_string(), template_filter, 0, true, true); @@ -137,8 +124,7 @@ find_route_templates (vector& template_names) { vector *templates; PathScanner scanner; - SearchPath spath (system_route_template_directory()); - spath += user_route_template_directory (); + SearchPath spath (route_template_search_path()); templates = scanner (spath.to_string(), route_template_filter, 0, false, true); diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 5facb42463..c7555fb921 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -367,11 +367,7 @@ def build(bld): 'PACKAGE="' + I18N_PACKAGE + '"', 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', - 'MODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"', - 'LOCALEDIR="' + os.path.join( - os.path.normpath(bld.env['DATADIR']), 'locale') + '"', - 'VAMP_DIR="' + os.path.join( - os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"', + 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"', 'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"' ] @@ -456,7 +452,6 @@ def build(bld): 'PACKAGE="libardour3test"', 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', - 'MODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"', 'LOCALEDIR="' + os.path.join( os.path.normpath(bld.env['DATADIR']), 'locale') + '"', 'VAMP_DIR="' + os.path.join( @@ -488,7 +483,6 @@ def build(bld): 'PACKAGE="libardour3profile"', 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', - 'MODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"', 'LOCALEDIR="' + os.path.join( os.path.normpath(bld.env['DATADIR']), 'locale') + '"', 'VAMP_DIR="' + os.path.join( diff --git a/libs/pbd/filesystem_paths.cc b/libs/pbd/filesystem_paths.cc deleted file mode 100644 index 7f0ac62d0f..0000000000 --- a/libs/pbd/filesystem_paths.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2007 Tim Mayberry - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include - -#include "pbd/filesystem_paths.h" - -namespace PBD { - -std::vector -system_data_directories () -{ - std::vector tmp; - const char * const * dirs; - - dirs = g_get_system_data_dirs (); - - if (dirs == NULL) return tmp; - - for (int i = 0; dirs[i] != NULL; ++i) - { - tmp.push_back(dirs[i]); - } - - return tmp; -} - -std::vector -system_config_directories () -{ - std::vector tmp; - const char * const * dirs; - - dirs = g_get_system_config_dirs (); - - if (dirs == NULL) return tmp; - - for (int i = 0; dirs[i] != NULL; ++i) - { - tmp.push_back(dirs[i]); - } - - return tmp; -} - -} // namespace PBD diff --git a/libs/pbd/fpu.cc b/libs/pbd/fpu.cc index 7efc63715b..94b741fd73 100644 --- a/libs/pbd/fpu.cc +++ b/libs/pbd/fpu.cc @@ -4,6 +4,7 @@ #include // for memset #include #include +#include #include "pbd/fpu.h" #include "pbd/error.h" @@ -67,7 +68,7 @@ FPU::FPU () if (cpuflags & (1 << 24)) { - char* fxbuf = 0; + char** fxbuf = 0; /* DAZ wasn't available in the first version of SSE. Since setting a reserved bit in MXCSR causes a general protection @@ -79,38 +80,41 @@ FPU::FPU () supported, otherwise, it isn't. */ -#ifdef NO_POSIX_MEMALIGN - if ((fxbuf = (char *) malloc(512)) == 0) +#ifndef HAVE_POSIX_MEMALIGN + fxbuf = (char **) malloc (sizeof (char *)); + assert (fxbuf); + *fxbuf = (char *) malloc (512); + assert (*fxbuf); #else - if (posix_memalign ((void**)&fxbuf, 16, 512)) + posix_memalign ((void **) &fxbuf, 16, sizeof (char *)); + assert (fxbuf); + posix_memalign ((void **) fxbuf, 16, 512); + assert (*fxbuf); #endif - { - error << _("cannot allocate 16 byte aligned buffer for h/w feature detection") << endmsg; - } else { - - memset (fxbuf, 0, 512); - - asm volatile ( - "fxsave (%0)" - : - : "r" (fxbuf) - : "memory" - ); - - uint32_t mxcsr_mask = *((uint32_t*) &fxbuf[28]); - - /* if the mask is zero, set its default value (from intel specs) */ - - if (mxcsr_mask == 0) { - mxcsr_mask = 0xffbf; - } - - if (mxcsr_mask & (1<<6)) { - _flags = Flags (_flags | HasDenormalsAreZero); - } - - free (fxbuf); + + memset (*fxbuf, 0, 512); + + asm volatile ( + "fxsave (%0)" + : + : "r" (*fxbuf) + : "memory" + ); + + uint32_t mxcsr_mask = *((uint32_t*) &((*fxbuf)[28])); + + /* if the mask is zero, set its default value (from intel specs) */ + + if (mxcsr_mask == 0) { + mxcsr_mask = 0xffbf; } + + if (mxcsr_mask & (1<<6)) { + _flags = Flags (_flags | HasDenormalsAreZero); + } + + free (*fxbuf); + free (fxbuf); } #endif } diff --git a/libs/pbd/malign.cc b/libs/pbd/malign.cc index b8aa61c997..44361aa70a 100644 --- a/libs/pbd/malign.cc +++ b/libs/pbd/malign.cc @@ -18,7 +18,7 @@ static const int CPU_CACHE_ALIGN = 16; /* arguably 32 on most arches, but it mat int cache_aligned_malloc (void** memptr, size_t size) { -#ifdef NO_POSIX_MEMALIGN +#ifndef HAVE_POSIX_MEMALIGN if (((*memptr) = malloc (size)) == 0) { fatal << string_compose (_("Memory allocation error: malloc (%1 * %2) failed (%3)"), CPU_CACHE_ALIGN, size, strerror (errno)) << endmsg; diff --git a/libs/pbd/pbd/filesystem_paths.h b/libs/pbd/pbd/filesystem_paths.h deleted file mode 100644 index a31de8c64e..0000000000 --- a/libs/pbd/pbd/filesystem_paths.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright (C) 2007 Tim Mayberry - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef PBD_FILESYSTEM_PATHS_INCLUDED -#define PBD_FILESYSTEM_PATHS_INCLUDED - -#include - -#include "pbd/filesystem.h" - -namespace PBD { - - std::vector system_data_directories (); - - std::vector system_config_directories (); - -} // namespace PBD - -#endif diff --git a/libs/pbd/pbd/signals.h b/libs/pbd/pbd/signals.h index e20a126163..dc53b31f94 100644 --- a/libs/pbd/pbd/signals.h +++ b/libs/pbd/pbd/signals.h @@ -110,6 +110,11 @@ public: ScopedConnection& operator= (UnscopedConnection const & o) { + if (_c == o) { + return *this; + } + + disconnect (); _c = o; return *this; } diff --git a/libs/pbd/test/signals_test.cc b/libs/pbd/test/signals_test.cc index 9ca1bf536b..9dd4a7f007 100644 --- a/libs/pbd/test/signals_test.cc +++ b/libs/pbd/test/signals_test.cc @@ -5,6 +5,14 @@ using namespace std; CPPUNIT_TEST_SUITE_REGISTRATION (SignalsTest); +void +SignalsTest::setUp () +{ + if (!Glib::thread_supported ()) { + Glib::thread_init (); + } +} + class Emitter { public: void emit () { diff --git a/libs/pbd/test/signals_test.h b/libs/pbd/test/signals_test.h index 8beb02ab1e..37fa9d9f96 100644 --- a/libs/pbd/test/signals_test.h +++ b/libs/pbd/test/signals_test.h @@ -10,6 +10,7 @@ class SignalsTest : public CppUnit::TestFixture CPPUNIT_TEST_SUITE_END (); public: + void setUp (); void testEmission (); void testDestruction (); void testScopedConnectionList (); diff --git a/libs/pbd/wscript b/libs/pbd/wscript index 23a63e40a1..48a7a731b2 100644 --- a/libs/pbd/wscript +++ b/libs/pbd/wscript @@ -43,8 +43,7 @@ def configure(conf): conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT',mandatory=False) conf.check(header_name='execinfo.h', define_name='HAVE_EXECINFO',mandatory=False) conf.check(header_name='unistd.h', define_name='HAVE_UNISTD',mandatory=False) - if conf.check_cc(function_name='posix_memalign', header_name='stdlib.h', cflags='-D_XOPEN_SOURCE=600',mandatory=False) == False: - conf.define ('NO_POSIX_MEMALIGN',1) + conf.check_cc(function_name='posix_memalign', header_name='stdlib.h', cflags='-D_XOPEN_SOURCE=600', define_name='HAVE_POSIX_MEMALIGN', mandatory=False) conf.write_config_header('libpbd-config.h', remove=False) @@ -55,7 +54,7 @@ def configure(conf): def build(bld): - # Make signal.h using signal.h.py + # Make signals_generated.h using signals.py bld(rule = 'python ${SRC} ${TGT}', source = 'pbd/signals.py', target = 'pbd/signals_generated.h') # Library @@ -80,7 +79,6 @@ def build(bld): epa.cc error.cc filesystem.cc - filesystem_paths.cc file_manager.cc file_utils.cc fpu.cc diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc index c2220c6fde..a9f5aa9341 100644 --- a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc +++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc @@ -114,7 +114,7 @@ system_midi_map_search_path () return spath_env; } - SearchPath spath (system_data_search_path()); + SearchPath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(midi_map_dir_name); // just return the first directory in the search path that exists diff --git a/libs/surfaces/mackie/device_info.cc b/libs/surfaces/mackie/device_info.cc index 5646650eeb..8d2186cf0c 100644 --- a/libs/surfaces/mackie/device_info.cc +++ b/libs/surfaces/mackie/device_info.cc @@ -421,7 +421,7 @@ static const char* const devinfo_dir_name = "mcp"; static const char* const devinfo_suffix = ".device"; static SearchPath -system_devinfo_search_path () +devinfo_search_path () { bool devinfo_path_defined = false; sys::path spath_env (Glib::getenv (devinfo_env_variable_name, devinfo_path_defined)); @@ -430,21 +430,12 @@ system_devinfo_search_path () return spath_env; } - SearchPath spath (system_data_search_path()); + SearchPath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(devinfo_dir_name); return spath; } -static sys::path -user_devinfo_directory () -{ - sys::path p(user_config_directory()); - p /= devinfo_dir_name; - - return p; -} - static bool devinfo_filter (const string &str, void */*arg*/) { @@ -459,8 +450,7 @@ DeviceInfo::reload_device_info () vector s; vector *devinfos; PathScanner scanner; - SearchPath spath (system_devinfo_search_path()); - spath += user_devinfo_directory (); + SearchPath spath (devinfo_search_path()); devinfos = scanner (spath.to_string(), devinfo_filter, 0, false, true); device_info.clear (); diff --git a/libs/surfaces/mackie/device_profile.cc b/libs/surfaces/mackie/device_profile.cc index d7667ce721..3a9013dc9f 100644 --- a/libs/surfaces/mackie/device_profile.cc +++ b/libs/surfaces/mackie/device_profile.cc @@ -56,7 +56,7 @@ static const char* const devprofile_dir_name = "mcp"; static const char* const devprofile_suffix = ".profile"; static SearchPath -system_devprofile_search_path () +devprofile_search_path () { bool devprofile_path_defined = false; sys::path spath_env (Glib::getenv (devprofile_env_variable_name, devprofile_path_defined)); @@ -65,7 +65,7 @@ system_devprofile_search_path () return spath_env; } - SearchPath spath (system_data_search_path()); + SearchPath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(devprofile_dir_name); return spath; @@ -94,8 +94,7 @@ DeviceProfile::reload_device_profiles () vector s; vector *devprofiles; PathScanner scanner; - SearchPath spath (system_devprofile_search_path()); - spath += user_devprofile_directory (); + SearchPath spath (devprofile_search_path()); devprofiles = scanner (spath.to_string(), devprofile_filter, 0, false, true); device_profiles.clear (); diff --git a/libs/surfaces/mackie/meter.cc b/libs/surfaces/mackie/meter.cc index a4824d3612..82aef2bef8 100644 --- a/libs/surfaces/mackie/meter.cc +++ b/libs/surfaces/mackie/meter.cc @@ -40,8 +40,8 @@ Meter::factory (Surface& surface, int id, const char* name, Group& group) return m; } -MidiByteArray -Meter::update_message (float dB) +void +Meter::send_update (Surface& surface, float dB) { float def = 0.0f; /* Meter deflection %age */ @@ -75,12 +75,13 @@ Meter::update_message (float dB) if (def > 100.0f) { if (!overload_on) { overload_on = true; - msg << MidiByteArray (2, 0xd0, (id() << 4) | 0xe); + surface.write (MidiByteArray (2, 0xd0, (id() << 4) | 0xe)); + } } else { if (overload_on) { overload_on = false; - msg << MidiByteArray (2, 0xd0, (id() << 4) | 0xf); + surface.write (MidiByteArray (2, 0xd0, (id() << 4) | 0xf)); } } @@ -90,9 +91,12 @@ Meter::update_message (float dB) if (last_segment_value_sent != segment) { last_segment_value_sent = segment; - msg << MidiByteArray (2, 0xD0, (id()<<4) | segment); + surface.write (MidiByteArray (2, 0xD0, (id()<<4) | segment)); } - - return msg; } +MidiByteArray +Meter::zero () +{ + return MidiByteArray (2, 0xD0, (id()<<4 | 0)); +} diff --git a/libs/surfaces/mackie/meter.h b/libs/surfaces/mackie/meter.h index 1898bf8199..b94c7ac98a 100644 --- a/libs/surfaces/mackie/meter.h +++ b/libs/surfaces/mackie/meter.h @@ -35,9 +35,9 @@ public: , last_segment_value_sent (-1) , overload_on (false) {} - MidiByteArray update_message (float dB); + void send_update (Surface&, float dB); - MidiByteArray zero() { return update_message (-99999999.0); } + MidiByteArray zero(); static Control* factory (Surface&, int id, const char*, Group&); diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index 9e4c72eab4..d886f5a658 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -163,7 +163,9 @@ Strip::set_route (boost::shared_ptr r, bool /*with_messages*/) set_vpot_parameter (PanAzimuthAutomation); - _route->solo_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context()); + _route->solo_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context()); + _route->listen_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context()); + _route->mute_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_mute_changed, this), ui_context()); boost::shared_ptr pannable = _route->pannable(); @@ -239,7 +241,7 @@ void Strip::notify_solo_changed () { if (_route && _solo) { - _surface->write (_solo->set_state (_route->soloed() ? on : off)); + _surface->write (_solo->set_state ((_route->soloed() || _route->listening_via_monitor()) ? on : off)); } } @@ -687,7 +689,7 @@ Strip::update_meter () { if (_meter) { float dB = const_cast (_route->peak_meter()).peak_power (0); - _surface->write (_meter->update_message (dB)); + _meter->send_update (*_surface, dB); } } diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc index afff3cdcd8..88479d9c28 100644 --- a/libs/surfaces/osc/osc.cc +++ b/libs/surfaces/osc/osc.cc @@ -191,8 +191,7 @@ OSC::start () PBD::sys::path url_file; - if (find_file_in_search_path (ardour_search_path() + system_config_search_path(), - "osc_url", url_file)) { + if (find_file_in_search_path (ardour_config_search_path(), "osc_url", url_file)) { _osc_url_file = url_file.to_string(); ofstream urlfile; diff --git a/libs/surfaces/wscript b/libs/surfaces/wscript index f281247208..57770340b8 100644 --- a/libs/surfaces/wscript +++ b/libs/surfaces/wscript @@ -44,9 +44,9 @@ def configure(conf): for i in children: sub_config_and_use(conf, i) - autowaf.check_pkg(conf, 'libusb-1.0', uselib_store='USB', mandatory=False) - if Options.options.tranzport and conf.is_defined('HAVE_USB'): - conf.define('BUILD_TRANZPORT', 1) + #autowaf.check_pkg(conf, 'libusb-1.0', uselib_store='USB', mandatory=False) + #if Options.options.tranzport and conf.is_defined('HAVE_USB'): + # conf.define('BUILD_TRANZPORT', 1) conf.check_cc (header_name='linux/input.h', define_name='BUILD_POWERMATE',mandatory=False) autowaf.check_pkg (conf, 'liblo', mandatory=False, uselib_store="LO", atleast_version="0.24") diff --git a/mcp/cmc.device b/mcp/cmc.device new file mode 100644 index 0000000000..31867044ba --- /dev/null +++ b/mcp/cmc.device @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/mcp/wscript b/mcp/wscript new file mode 100644 index 0000000000..b1ff9c156b --- /dev/null +++ b/mcp/wscript @@ -0,0 +1,18 @@ +#!/usr/bin/python + +import os + +top = '.' +out = 'build' + +def configure(conf): + pass + +def build(bld): + devinfo = bld.path.ant_glob ('*.device') + profiles = bld.path.ant_glob ('*.profile') + bld.install_files (os.path.join(bld.env['DATADIR'], 'ardour3', 'mcp'), devinfo) + bld.install_files (os.path.join(bld.env['DATADIR'], 'ardour3', 'mcp'), profiles) + +def options(opt): + pass diff --git a/patchfiles/wscript b/patchfiles/wscript new file mode 100644 index 0000000000..3b852974c3 --- /dev/null +++ b/patchfiles/wscript @@ -0,0 +1,16 @@ +#!/usr/bin/python + +import os + +top = '.' +out = 'build' + +def configure(conf): + pass + +def build(bld): + patchfiles = bld.path.ant_glob ('*.midnam') + bld.install_files (os.path.join(bld.env['DATADIR'], 'ardour3', 'patchfiles'), patchfiles) + +def options(opt): + pass diff --git a/tools/linux_packaging/ardour.sh.in b/tools/linux_packaging/ardour.sh.in index 6946341993..83f69bb2b6 100644 --- a/tools/linux_packaging/ardour.sh.in +++ b/tools/linux_packaging/ardour.sh.in @@ -1,5 +1,7 @@ #!/bin/sh +# This is Linux-specific startup script for a bundled version of Ardour + while [ $# -gt 0 ] ; do echo "arg = $1" case $1 in @@ -11,9 +13,9 @@ while [ $# -gt 0 ] ; do esac done -#LD_LIBRARY_PATH needs to be set (empty) so that epa can swap between the original and the bundled version +# LD_LIBRARY_PATH needs to be set here so that epa can swap between the original and the bundled version +# (the original one will be stored in PREBUNDLE_ENV) export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} - export PREBUNDLE_ENV="$(env)" BIN_DIR=$(dirname $(readlink -f $0)) @@ -35,12 +37,13 @@ export ARDOUR_BUNDLED=true %ENV% -export GTK_PATH=$INSTALL_DIR/libs/clearlooks${GTK_PATH:+:$GTK_PATH} -export GTK_MODULES="" # Disable extra modules from being loaded by gtk (example, libcanberra-gtk-module.so) +# Disable extra modules from being loaded by gtk (example, libcanberra-gtk-module.so) +export GTK_MODULES="" +# Set this so that the executable will find all the right libraries inside the bundle export LD_LIBRARY_PATH=$INSTALL_DIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} # create install-location-dependent config files for Pango and GDK image loaders -# We have to do this every time because its possible that BIN_DIR has changed +# We have to do this every time because its possible that LIB_DIR has changed sed "s?@ROOTDIR@/modules?$LIB_DIR/modules?" < $ETC_DIR/pango.modules.in > $USER_ARDOUR_DIR/pango.modules sed "s?@ROOTDIR@/loaders?$LIB_DIR/loaders?" < $ETC_DIR/gdk-pixbuf.loaders.in > $USER_ARDOUR_DIR/gdk-pixbuf.loaders diff --git a/tools/linux_packaging/build b/tools/linux_packaging/build index f8d1843352..b930977bba 100755 --- a/tools/linux_packaging/build +++ b/tools/linux_packaging/build @@ -144,16 +144,20 @@ APPLIB=$APPDIR/lib Libraries=$APPLIB Etc=$APPDIR/etc Shared=$APPDIR/share + Plugins=$APPLIB/plugins Surfaces=$APPLIB/surfaces Panners=$APPLIB/panners -ExportFormats=$Shared/export -Locale=$Shared/locale -MidiMaps=$Shared/midi_maps -MackieControl=$Shared/mcp + Modules=$Libraries/modules Loaders=$Libraries/loaders +Templates=$Shared/templates +ExportFormats=$Shared/export +Locale=$Shared/locale +MidiMaps=$Shared/midi_maps +PatchFiles=$Shared/patchfiles +MackieControl=$Shared/mcp if [ x$PRINT_SYSDEPS != x ] ; then # @@ -187,9 +191,11 @@ mkdir -p $Shared mkdir -p $Locale mkdir -p $Surfaces mkdir -p $MidiMaps +mkdir -p $PatchFiles mkdir -p $MackieControl mkdir -p $ExportFormats mkdir -p $Panners +mkdir -p $Templates mkdir -p $Shared/templates mkdir -p $Shared/doc @@ -466,6 +472,13 @@ for x in $BUILD_ROOT/../midi_maps/*.map ; do echo Copied MIDI map $x done +# MIDNAM Patch Files +# got to be careful with names here +for x in $BUILD_ROOT/../patchfiles/*.midnam ; do + cp "$x" $PatchFiles + echo Copied MIDNAM file "$x" +done + # MackieControl data # got to be careful with names here for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do @@ -473,6 +486,13 @@ for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do echo Copied Mackie Control file $x done +# Templates +for f in $BUILD_ROOT/../templates/* ; do + if [ -d "$f" ] ; then + echo Template: $f ; cp -r "$f" $Templates ; + fi +done + # ExportFormats # got to be careful with names here for x in $BUILD_ROOT/../export/*.preset $BUILD_ROOT/../export/*.format ; do @@ -515,7 +535,6 @@ while [ true ] ; do # do not include libjack deps=`LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file | awk '{print $3}'` - # LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file | egrep "(/opt/|/local/|libs/|/usr/lib|/gtk)" | grep -v 'libjack\.' echo -n "." for dep in $deps ; do if test "not" = ${dep}; then @@ -534,9 +553,13 @@ while [ true ] ; do if echo $dep | grep -qs "^/lib/" ; then continue; fi # don't include jack if echo $dep | grep -qs libjack ; then continue; fi + # don't include ALSA + if echo $dep | grep -qs libasound ; then continue; fi # don't include any X Window libraries - if echo $dep | grep -qs libX ; then continue; fi + if echo $dep | grep -qs libX\. ; then continue; fi if echo $dep | grep -qs libxcb ; then continue; fi + if echo $dep | grep -qs libICE\. ; then continue; fi + if echo $dep | grep -qs libSM\. ; then continue; fi # don't include libc if echo $dep | grep -qs 'libc\.' ; then continue; fi # don't include libstdc++ @@ -597,10 +620,10 @@ cp $BUILD_ROOT/gtk2_ardour/ardour3*.rc $Etc cp ../../gtk2_ardour/ardour3_ui_default.conf $Etc/ardour3_ui_default.conf cp ../../gtk2_ardour/ardour3_ui_default.conf $Etc/ardour3_ui.conf cp ../../instant.xml $Etc/instant.xml -cp -r ../../gtk2_ardour/icons $Etc -cp -r ../../gtk2_ardour/pixmaps $Etc cp ../../gtk2_ardour/step_editing.bindings $Etc cp ../../gtk2_ardour/mixer.bindings $Etc +cp -r ../../gtk2_ardour/icons $Shared +cp -r ../../gtk2_ardour/pixmaps $Shared # @@ -614,8 +637,6 @@ fi # share stuff cp -R ../../gtk2_ardour/splash.png $Shared -# currently no templates -#cp ../../templates/*.template $Shared/templates/ # go through and recursively remove any .svn dirs in the bundle for svndir in `find $APPDIR -name .svn -type d`; do diff --git a/tools/linux_packaging/stage2.run b/tools/linux_packaging/stage2.run index cb15b9ba4c..e284e8a97a 100755 --- a/tools/linux_packaging/stage2.run +++ b/tools/linux_packaging/stage2.run @@ -377,7 +377,7 @@ else fi PGM_EXEC_PATH="${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/bin/${PGM_EXEC_FILE}" -ICON_PATH="${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/etc/icons" +ICON_PATH="${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/share/icons" MENU_FILE_PATH="${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/share" ################################ diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build index 4a4e8847d3..040c4a7ea5 100755 --- a/tools/osx_packaging/osx_build +++ b/tools/osx_packaging/osx_build @@ -3,6 +3,7 @@ # script for pulling together a MacOSX app bundle. GTKQUARTZ_ROOT=$HOME/gtk/inst +ARDOURSTACK_ROOT=$HOME/a3/inst if pkg-config --modversion gtk+-2.0 | grep -s 2.22 ; then # older GTK @@ -95,18 +96,27 @@ echo "Info string is $info_string" APPDIR=${APPNAME}.app APPROOT=$APPDIR/Contents -Frameworks=$APPROOT/Frameworks +Frameworks=$APPROOT/lib Resources=$APPROOT/Resources -Plugins=$APPROOT/Plugins -Surfaces=$APPROOT/Surfaces -Panners=$APPROOT/Panners -MidiMaps=$APPROOT/MidiMaps -MCP=$APPROOT/MCP -ExportFormats=$APPROOT/ExportFormats -Templates=$APPROOT/Templates -Shared=$Resources/share -Etc=$Resources/etc +# +# Since this is OS X, don't try to distinguish between etc and shared +# (machine dependent and independent data) - just put everything +# into Resources. +# +Shared=$Resources +Etc=$Resources Locale=$Resources/locale +# +# Bundled Plugins live in a top level folder +# +Plugins=$APPROOT/Plugins +Surfaces=$Frameworks/surfaces +Panners=$Frameworks/panners +MidiMaps=$Shared/midi_maps +ExportFormats=$Shared/export +Templates=$Shared/templates +PatchFiles=$Shared/patchfiles +MackieControl=$Shared/mcp if [ x$PRINT_SYSDEPS != x ] ; then # @@ -141,6 +151,7 @@ mkdir -p $Templates mkdir -p $Frameworks/modules mkdir -p $Shared/templates mkdir -p $Etc +mkdir -p $MackieControl # maybe set variables env="" @@ -280,35 +291,60 @@ cat > pangorc < $Resources/pango.modules +env PANGO_RC_FILE=pangorc $GTKQUARTZ_ROOT/bin/pango-querymodules | sed "s?$GTKQUARTZ_ROOT/lib/pango/1.6.0/modules/?@executable_path/../lib/modules/?" > $Resources/pango.modules rm pangorc # generate a new GDK pixbufs loaders file -gdk-pixbuf-query-loaders | sed "s?$GDKPIXBUF_LOADERS/?@executable_path/../Frameworks/modules/?" > $Resources/gdk-pixbuf.loaders +gdk-pixbuf-query-loaders | sed "s?$GDKPIXBUF_LOADERS/?@executable_path/../lib/modules/?" > $Resources/gdk-pixbuf.loaders # this one is special - we will set GTK_PATH to $Frameworks/clearlooks cp $BUILD_ROOT/libs/clearlooks-newer/libclearlooks.dylib $Frameworks mkdir -p $Frameworks/clearlooks/engines (cd $Frameworks/clearlooks/engines && ln -s $BUILD_ROOT/libclearlooks.dylib libclearlooks.dylib && ln -s ../../libclearlooks.dylib libclearlooks.so) +# Control Surface shared libraries cp $BUILD_ROOT/libs/surfaces/*/libardour_*.dylib $Surfaces +# hack ... move libardour_cp back into Frameworks +mv $Surfaces/libardourcp*.dylib $Frameworks + +# Panners cp $BUILD_ROOT/libs/panners/*/lib*.dylib $Panners -(cd ../../export && - for f in *.preset ; do - echo ExportFormat: $f; cp "$f" ../tools/osx_packaging/$ExportFormats ; -done) -(cd $BUILD_ROOT/../templates && \ - for f in * ; do - if [ -d "$f" ] ; then - echo Template: $f ; cp -r "$f" ../tools/osx_packaging/$Templates ; - fi -done) -# MIDI maps -cp ../../midi_maps/*.map $MidiMaps -# Mackie support files -cp ../../mcp/*.{device,profile} $MCP +# Export Formats/Presets +for f in $BUILD_ROOT/../export/*.preset $BUILD_ROOT/../export/*.format ; do + echo ExportFormat: $f + cp "$f" $ExportFormats ; +done + +# Session and Route templates +for f in $BUILD_ROOT/../templates/* ; do + if [ -d "$f" ] ; then + echo Template: $f + cp -r "$f" $Templates ; + fi +done + +# MidiMaps +# got to be careful with names here +for x in $BUILD_ROOT/../midi_maps/*.map ; do + cp "$x" $MidiMaps + echo Copied MIDI map $x +done + +# MIDNAM Patch Files +# got to be careful with names here +for x in $BUILD_ROOT/../patchfiles/*.midnam ; do + cp "$x" $PatchFiles + echo Copied MIDNAM file "$x" +done + +# MackieControl data +# got to be careful with names here +for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do + cp "$x" $MackieControl + echo Copied Mackie Control file $x +done # VAMP plugins that we use cp $BUILD_ROOT/libs/vamp-plugins/libardourvampplugins.dylib $Frameworks @@ -319,7 +355,7 @@ while [ true ] ; do if ! file $file | grep -qs Mach-O ; then continue fi - deps=`otool -L $file | awk '{print $1}' | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | grep -v 'libjack\.'` + deps=`otool -L $file | awk '{print $1}' | egrep "($GTKQUARTZ_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | grep -v 'libjack\.'` # echo -n "." for dep in $deps ; do base=`basename $dep` @@ -390,9 +426,9 @@ fi for exe in $executables; do EXE=$APPROOT/MacOS/$exe changes="" - for lib in `otool -L $EXE | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do + for lib in `otool -L $EXE | egrep "($GTKQUARTZ_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do base=`basename $lib` - changes="$changes -change $lib @executable_path/../Frameworks/$base" + changes="$changes -change $lib @executable_path/../lib/$base" done if test "x$changes" != "x" ; then install_name_tool $changes $EXE @@ -416,12 +452,12 @@ for libdir in $Frameworks $Frameworks/modules $Surfaces $Panners ; do # change all the dependencies changes="" - for lib in `otool -L $dylib | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do + for lib in `otool -L $dylib | egrep "($GTKQUARTZ_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do base=`basename $lib` if echo $lib | grep -s libbase; then changes="$changes -change $lib @executable_path/../$libbase/$base" else - changes="$changes -change $lib @executable_path/../Frameworks/$base" + changes="$changes -change $lib @executable_path/../lib/$base" fi done diff --git a/wscript b/wscript index ae3a7a9b2e..b61dc41c0f 100644 --- a/wscript +++ b/wscript @@ -8,7 +8,7 @@ import subprocess import sys # Variables for 'waf dist' -VERSION = '3.0beta3' +VERSION = '3.0beta4' APPNAME = 'Ardour3' # Mandatory variables @@ -36,6 +36,7 @@ children = [ 'templates', 'export', 'midi_maps', + 'mcp', 'manual' ] @@ -232,11 +233,6 @@ def set_compiler_flags (conf,opt): if not build_host_supports_sse: print("\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)") - # check this even if we aren't using FPU optimization - if not conf.is_defined('HAVE_POSIX_MEMALIGN'): - optimization_flags.append("-DNO_POSIX_MEMALIGN") - debug_flags.append("-DNO_POSIX_MEMALIGN") - # end optimization section # @@ -408,8 +404,8 @@ def options(opt): help='Raise a floating point exception if a denormal is detected') opt.add_option('--test', action='store_true', default=False, dest='build_tests', help="Build unit tests") - opt.add_option('--tranzport', action='store_true', default=False, dest='tranzport', - help='Compile with support for Frontier Designs Tranzport (if libusb is available)') + #opt.add_option('--tranzport', action='store_true', default=False, dest='tranzport', + # help='Compile with support for Frontier Designs Tranzport (if libusb is available)') opt.add_option('--universal', action='store_true', default=False, dest='universal', help='Compile as universal binary (OS X ONLY, requires that external libraries are universal)') opt.add_option('--generic', action='store_true', default=False, dest='generic', @@ -463,16 +459,21 @@ def configure(conf): print('Please use a different version or re-configure with --debug') exit (1) - if sys.platform == 'darwin': + # libintl may or may not be trivially locatable. On OS X this is always + # true. On Linux it will depend on whether we're on a normal Linux distro, + # in which case libintl.h is going to be available in /usr/include and + # the library itself is part of glibc, or on a bare-bones build system + # where we need to pick it up from the GTK dependency stack. + # + if not os.path.isfile ('/usr/include/libintl.h'): + # XXXX hack hack hack + prefinclude = ''.join ([ '-I', os.path.expanduser ('~/gtk/inst/include') ]) + preflib = ''.join ([ '-L', os.path.expanduser ('~/gtk/inst/lib') ]) + conf.env.append_value('CFLAGS', [ prefinclude ]) + conf.env.append_value('CXXFLAGS', [prefinclude ]) + conf.env.append_value('LINKFLAGS', [ preflib ]) - # libintl may or may not be trivially locatable - if not os.path.isfile ('/usr/include/libintl.h'): - # XXXX hack hack hack - prefinclude = ''.join ([ '-I', os.path.expanduser ('~/gtk/inst/include') ]) - preflib = ''.join ([ '-L', os.path.expanduser ('~/gtk/inst/lib') ]) - conf.env.append_value('CFLAGS', [ prefinclude ]) - conf.env.append_value('CXXFLAGS', [prefinclude ]) - conf.env.append_value('LINKFLAGS', [ preflib ]) + if sys.platform == 'darwin': # this is required, potentially, for anything we link and then relocate into a bundle conf.env.append_value('LINKFLAGS', [ '-Xlinker', '-headerpad_max_install_names' ]) @@ -487,12 +488,6 @@ def configure(conf): conf.define ('TOP_MENUBAR',1) conf.define ('GTKOSX',1) - # - # need this on OS X to pick up long long variants of several math functions - # - - conf.env.append_value('CXXFLAGS_APPLEUTILITY', '-I../libs') - # # Define OSX as a uselib to use when compiling # on Darwin to add all applicable flags at once # @@ -501,10 +496,13 @@ def configure(conf): conf.env.append_value('CXXFLAGS_OSX', '-mmacosx-version-min=10.4') conf.env.append_value('CFLAGS_OSX', '-mmacosx-version-min=10.4') + # It would be nice to be able to use this to force back-compatibility with 10.4 + # but even by the time of 11, the 10.4 SDK is no longer available in any normal + # way. + # #conf.env.append_value('CXXFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk") #conf.env.append_value('CFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk") - #conf.env.append_value('LINKFLAGS_OSX', "-isysroot /Developer/SDKs/MacOSX10.4u.sdk") - + #conf.env.append_value('LINKFLAGS_OSX', "-sysroot /Developer/SDKs/MacOSX10.4u.sdk") #conf.env.append_value('LINKFLAGS_OSX', "-sysroot /Developer/SDKs/MacOSX10.4u.sdk") conf.env.append_value('CXXFLAGS_OSX', "-msse") @@ -613,8 +611,8 @@ def configure(conf): conf.env['ENABLE_NLS'] = True if opts.build_tests: conf.env['BUILD_TESTS'] = opts.build_tests - if opts.tranzport: - conf.env['TRANZPORT'] = 1 + #if opts.tranzport: + # conf.env['TRANZPORT'] = 1 if opts.windows_vst: conf.define('WINDOWS_VST_SUPPORT', 1) conf.env['WINDOWS_VST_SUPPORT'] = True @@ -692,8 +690,7 @@ const char* const ardour_config_info = "\\n\\ write_config_text('Samplerate', conf.is_defined('HAVE_SAMPLERATE')) # write_config_text('Soundtouch', conf.is_defined('HAVE_SOUNDTOUCH')) write_config_text('Translation', opts.nls) - write_config_text('SoundGrid support', opts.soundgrid) - write_config_text('Tranzport', opts.tranzport) +# write_config_text('Tranzport', opts.tranzport) write_config_text('Unit tests', conf.env['BUILD_TESTS']) write_config_text('Universal binary', opts.universal) write_config_text('Generic x86 CPU', opts.generic) @@ -763,11 +760,3 @@ def i18n_po(bld): def i18n_mo(bld): bld.recurse (i18n_children) -def install_not_supported(bld): - print ('Installing Ardour 3 is currently unsupported. Run it via the command ./ardev from within the gtk2_ardour directory.') - sys.exit (1) - -from waflib import Build -class install(Build.InstallContext): - cmd = 'install' - fun = 'install_not_supported'