From 2859868109a8060016c077769df2182cbd15220d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 27 Sep 2007 19:45:47 +0000 Subject: fix crash bug caused by incorrectly setting transience of audio clocks in the SoundFileBox git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2496 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_audio_import.cc | 4 ++-- gtk2_ardour/sfdb_ui.cc | 19 ++++++++++++------- gtk2_ardour/sfdb_ui.h | 6 +++--- svn_revision.h | 2 +- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc index 6ab8da8e45..02faf1bb6c 100644 --- a/gtk2_ardour/editor_audio_import.cc +++ b/gtk2_ardour/editor_audio_import.cc @@ -74,7 +74,7 @@ Editor::add_external_audio_action (ImportMode mode_hint) } if (sfbrowser == 0) { - sfbrowser = new SoundFileOmega (*this, _("Add existing audio"), session, 0, mode_hint); + sfbrowser = new SoundFileOmega (*this, _("Add existing audio"), session, 0, true, mode_hint); } else { sfbrowser->set_mode (mode_hint); } @@ -107,7 +107,7 @@ Editor::external_audio_dialog () } if (sfbrowser == 0) { - sfbrowser = new SoundFileOmega (*this, _("Add existing audio"), session, track_cnt); + sfbrowser = new SoundFileOmega (*this, _("Add existing audio"), session, track_cnt, true); } else { sfbrowser->reset (track_cnt); } diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index 489fb59fcc..d302907faa 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -96,13 +96,15 @@ importmode2string (ImportMode mode) case ImportAsTapeTrack: return _("as new tape tracks"); } + /*NOTREACHED*/ + return _("as new tracks"); } -SoundFileBox::SoundFileBox () +SoundFileBox::SoundFileBox (bool persistent) : _session(0), table (6, 2), - length_clock ("sfboxLengthClock", false, "EditCursorClock", false, true, false), - timecode_clock ("sfboxTimecodeClock", false, "EditCursorClock", false, false, false), + length_clock ("sfboxLengthClock", !persistent, "EditCursorClock", false, true, false), + timecode_clock ("sfboxTimecodeClock", !persistent, "EditCursorClock", false, false, false), main_box (false, 6), autoplay_btn (_("Auto-play")) @@ -381,12 +383,14 @@ SoundFileBox::save_tags (const vector& tags) Library->save_changes (); } -SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::Session* s) +SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::Session* s, bool persistent) : ArdourDialog (parent, title, false, false), found_list (ListStore::create(found_list_columns)), chooser (FILE_CHOOSER_ACTION_OPEN), found_list_view (found_list), + preview (persistent), found_search_btn (_("Search")) + { VBox* vbox; HBox* hbox; @@ -928,7 +932,7 @@ SoundFileOmega::check_link_status (const Session& s, const vector& path } SoundFileChooser::SoundFileChooser (Gtk::Window& parent, string title, ARDOUR::Session* s) - : SoundFileBrowser (parent, title, s) + : SoundFileBrowser (parent, title, s, false) { set_size_request (780, 300); chooser.set_select_multiple (false); @@ -964,8 +968,9 @@ SoundFileChooser::get_filename () return paths.front(); } -SoundFileOmega::SoundFileOmega (Gtk::Window& parent, string title, ARDOUR::Session* s, int selected_tracks, Editing::ImportMode mode_hint) - : SoundFileBrowser (parent, title, s), +SoundFileOmega::SoundFileOmega (Gtk::Window& parent, string title, ARDOUR::Session* s, int selected_tracks, bool persistent, + Editing::ImportMode mode_hint) + : SoundFileBrowser (parent, title, s, persistent), copy_files_btn ( _("Copy files to session")), selected_track_cnt (selected_tracks) { diff --git a/gtk2_ardour/sfdb_ui.h b/gtk2_ardour/sfdb_ui.h index 7133a5fa78..43f76a9ea2 100644 --- a/gtk2_ardour/sfdb_ui.h +++ b/gtk2_ardour/sfdb_ui.h @@ -52,7 +52,7 @@ class GainMeter; class SoundFileBox : public Gtk::VBox { public: - SoundFileBox (); + SoundFileBox (bool persistent); virtual ~SoundFileBox () {}; void set_session (ARDOUR::Session* s); @@ -118,7 +118,7 @@ class SoundFileBrowser : public ArdourDialog Glib::RefPtr found_list; public: - SoundFileBrowser (Gtk::Window& parent, std::string title, ARDOUR::Session* _s); + SoundFileBrowser (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, bool persistent); virtual ~SoundFileBrowser (); virtual void set_session (ARDOUR::Session*); @@ -184,7 +184,7 @@ class SoundFileOmega : public SoundFileBrowser { public: - SoundFileOmega (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, int selected_tracks, + SoundFileOmega (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, int selected_tracks, bool persistent, Editing::ImportMode mode_hint = Editing::ImportAsTrack); void reset (int selected_tracks); diff --git a/svn_revision.h b/svn_revision.h index 9595ad0428..56687c29ae 100644 --- a/svn_revision.h +++ b/svn_revision.h @@ -1,4 +1,4 @@ #ifndef __ardour_svn_revision_h__ #define __ardour_svn_revision_h__ -static const char* ardour_svn_revision = "2234"; +static const char* ardour_svn_revision = "2494"; #endif -- cgit v1.2.3