diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-01 15:39:43 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-01 15:39:43 +0000 |
commit | 8b0e6623698b11c9c053c78a82863ee7591dc3b7 (patch) | |
tree | 5c8ad83419b9591adf0a9599c12f0a0bdbacc08f | |
parent | bd3b9d763b0409c8e59d5ea38857d604e917818a (diff) |
add ferret icon; fix up JACK discovery on systems with inadequate PATH; change ferret layout a bit
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2984 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/engine_dialog.cc | 28 | ||||
-rw-r--r-- | gtk2_ardour/icons/ferret_02.png | bin | 0 -> 3951 bytes | |||
-rw-r--r-- | gtk2_ardour/rhythm_ferret.cc | 14 |
3 files changed, 33 insertions, 9 deletions
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index f36044cbe3..0eaff9ed1f 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -909,7 +909,7 @@ EngineControl::find_jack_servers (vector<string>& strings) _NSGetExecutablePath (execpath, &pathsz); - Glib::ustring path (Glib::path_get_dirname (execpath)); + string path (Glib::path_get_dirname (execpath)); path += "/jackd"; if (Glib::file_test (path, FILE_TEST_EXISTS)) { @@ -931,8 +931,30 @@ EngineControl::find_jack_servers (vector<string>& strings) PathScanner scanner; vector<string *> *jack_servers; std::map<string,int> un; - - path = getenv ("PATH"); + char *p; + bool need_minimal_path = false; + + p = getenv ("PATH"); + + if (p && *p) { + path = p; + } else { + need_minimal_path = true; + } + +#ifdef __APPLE__ + // many mac users don't have PATH set up to include + // likely installed locations of JACK + need_minimal_path = true; +#endif + + if (need_minimal_path) { + if (path.empty()) { + path = "/usr/bin:/bin:/usr/local/bin:/opt/local/bin"; + } else { + path += ":/usr/local/bin:/opt/local/bin"; + } + } jack_servers = scanner (path, jack_server_filter, 0, false, true); diff --git a/gtk2_ardour/icons/ferret_02.png b/gtk2_ardour/icons/ferret_02.png Binary files differnew file mode 100644 index 0000000000..a6d625b64e --- /dev/null +++ b/gtk2_ardour/icons/ferret_02.png diff --git a/gtk2_ardour/rhythm_ferret.cc b/gtk2_ardour/rhythm_ferret.cc index cb24e97f43..d8d2f3c28b 100644 --- a/gtk2_ardour/rhythm_ferret.cc +++ b/gtk2_ardour/rhythm_ferret.cc @@ -13,6 +13,7 @@ #include "rhythm_ferret.h" #include "audio_region_view.h" #include "public_editor.h" +#include "utils.h" #include "i18n.h" @@ -57,9 +58,9 @@ RhythmFerret::RhythmFerret (PublicEditor& e) { upper_hpacker.set_spacing (6); - upper_hpacker.pack_start (operation_frame, true, true); - upper_hpacker.pack_start (selection_frame, true, true); upper_hpacker.pack_start (ferret_frame, true, true); + upper_hpacker.pack_start (selection_frame, true, true); + upper_hpacker.pack_start (operation_frame, true, true); op_packer.pack_start (region_split_button, false, false); op_packer.pack_start (tempo_button, false, false); @@ -107,15 +108,17 @@ RhythmFerret::RhythmFerret (PublicEditor& e) analyze_button.signal_clicked().connect (mem_fun (*this, &RhythmFerret::run_analysis)); ferret_frame.add (ferret_packer); - - // Glib::RefPtr<Pixbuf> logo_pixbuf ("somefile"); + logo = manage (new Gtk::Image (::get_icon (X_("ferret_02")))); + if (logo) { lower_hpacker.pack_start (*logo, false, false); } - lower_hpacker.pack_start (operation_clarification_label, false, false); + lower_hpacker.pack_start (operation_clarification_label, true, true); lower_hpacker.pack_start (action_button, false, false); + lower_hpacker.set_border_width (6); + lower_hpacker.set_spacing (6); action_button.signal_clicked().connect (mem_fun (*this, &RhythmFerret::do_action)); @@ -197,7 +200,6 @@ int RhythmFerret::run_percussion_onset_analysis (boost::shared_ptr<Readable> readable, nframes64_t offset, AnalysisFeatureList& results) { TransientDetector t (session->frame_rate()); - bool existing_results = !results.empty(); for (uint32_t i = 0; i < readable->n_channels(); ++i) { |