summaryrefslogtreecommitdiff
path: root/gtk2_ardour/sfdb_ui.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2012-12-21 20:26:48 +0000
committerRobin Gareus <robin@gareus.org>2012-12-21 20:26:48 +0000
commit92a2b8cb3fb1620b222162269b1e954a8bc32f48 (patch)
tree519c85417648af5b397d3bbf8373495654955621 /gtk2_ardour/sfdb_ui.cc
parent09f5940c8cf303c37f2820b3872393605db097f9 (diff)
more freesound UI tweaks:
* shrink filename column between searches * match-count: translatable sigular/plural forms git-svn-id: svn://localhost/ardour2/branches/3.0@13703 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/sfdb_ui.cc')
-rw-r--r--gtk2_ardour/sfdb_ui.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 8463375412..3ac1dff2ab 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -844,6 +844,7 @@ SoundFileBrowser::freesound_search()
{
#ifdef FREESOUND
freesound_list->clear();
+ freesound_list_view.get_column(1)->set_sizing(TREE_VIEW_COLUMN_GROW_ONLY);
matches = 0;
string search_string = freesound_entry.get_text ();
@@ -1013,9 +1014,17 @@ SoundFileBrowser::freesound_search()
gdk_window_set_cursor (get_window()->gobj(), prev_cursor);
freesound_progress_bar.set_fraction(0.0);
- freesound_progress_bar.set_text(
- string_compose(_("found %1 matche(s)"), matches));
-
+ switch (matches) {
+ case 0:
+ freesound_progress_bar.set_text(_("Search returned no results."));
+ break;
+ case 1:
+ freesound_progress_bar.set_text(_("Found one match."));
+ break;
+ default:
+ freesound_progress_bar.set_text(string_compose(_("Found %1 matche(s)"), matches));
+ }
+ freesound_list_view.get_column(1)->set_sizing(TREE_VIEW_COLUMN_AUTOSIZE);
#endif
}