From e6c3ff40c49f05c4c10f320cbb8a4a98ac7ea50c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 16 May 2007 02:21:41 +0000 Subject: [PATCH] add alternate filters for soundfile browser git-svn-id: svn://localhost/ardour2/trunk@1848 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/sfdb_ui.cc | 10 ++++++++-- gtk2_ardour/sfdb_ui.h | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index 19e265b79e..5415cd70cb 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -306,8 +306,14 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s) found_list_view.get_selection()->set_mode (Gtk::SELECTION_MULTIPLE); - filter.add_custom (Gtk::FILE_FILTER_FILENAME, mem_fun(*this, &SoundFileBrowser::on_custom)); - chooser.set_filter (filter); + custom_filter.add_custom (Gtk::FILE_FILTER_FILENAME, mem_fun(*this, &SoundFileBrowser::on_custom)); + custom_filter.set_name (_("Probable audio files")); + + matchall_filter.add_pattern ("*.*"); + matchall_filter.set_name (_("All files")); + + chooser.add_filter (custom_filter); + chooser.add_filter (matchall_filter); chooser.set_select_multiple (true); chooser.signal_update_preview().connect(mem_fun(*this, &SoundFileBrowser::update_preview)); diff --git a/gtk2_ardour/sfdb_ui.h b/gtk2_ardour/sfdb_ui.h index bbc6e2edd4..34c3f558bb 100644 --- a/gtk2_ardour/sfdb_ui.h +++ b/gtk2_ardour/sfdb_ui.h @@ -94,7 +94,8 @@ class SoundFileBrowser : public ArdourDialog protected: Gtk::FileChooserWidget chooser; - Gtk::FileFilter filter; + Gtk::FileFilter custom_filter; + Gtk::FileFilter matchall_filter; SoundFileBox preview; static Glib::ustring persistent_folder;