From 92a2b8cb3fb1620b222162269b1e954a8bc32f48 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 21 Dec 2012 20:26:48 +0000 Subject: [PATCH] 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 --- gtk2_ardour/sfdb_ui.cc | 15 ++++++++++++--- 1 file 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 }