summaryrefslogtreecommitdiff
path: root/gtk2_ardour/sfdb_ui.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/sfdb_ui.cc')
-rw-r--r--gtk2_ardour/sfdb_ui.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index e239f432d5..af950d8e6e 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -175,7 +175,7 @@ SoundFileBox::set_session(Session* s)
bool
SoundFileBox::setup_labels (const ustring& filename)
{
- if (path.empty()) {
+ if (!path.empty()) {
// save existing tags
tags_changed ();
}
@@ -407,6 +407,13 @@ SoundFileBrowser::~SoundFileBrowser ()
}
void
+SoundFileBrowser::clear_selection ()
+{
+ chooser.unselect_all ();
+ found_list_view.get_selection()->unselect_all ();
+}
+
+void
SoundFileBrowser::chooser_file_activated ()
{
preview.audition ();
@@ -499,13 +506,13 @@ SoundFileBrowser::get_paths ()
if (n == 0) {
vector<ustring> filenames = chooser.get_filenames();
vector<ustring>::iterator i;
+
for (i = filenames.begin(); i != filenames.end(); ++i) {
struct stat buf;
if ((!stat((*i).c_str(), &buf)) && S_ISREG(buf.st_mode)) {
results.push_back (*i);
}
}
- return results;
} else {
@@ -518,8 +525,9 @@ SoundFileBrowser::get_paths ()
results.push_back (str);
}
- return results;
}
+
+ return results;
}
void