From 1f8616951bd964a2fe36cfd62889f3fd486faf4c Mon Sep 17 00:00:00 2001 From: fgerlits Date: Fri, 4 Aug 2006 16:36:24 +0000 Subject: [PATCH] Fixing #1732. --- .../src/products/gLiveSupport/src/SearchWindow.cxx | 12 ++++++++++-- livesupport/src/products/gLiveSupport/var/root.txt | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/livesupport/src/products/gLiveSupport/src/SearchWindow.cxx b/livesupport/src/products/gLiveSupport/src/SearchWindow.cxx index af1520e14..89d3db04a 100644 --- a/livesupport/src/products/gLiveSupport/src/SearchWindow.cxx +++ b/livesupport/src/products/gLiveSupport/src/SearchWindow.cxx @@ -446,6 +446,9 @@ void SearchWindow :: localSearch(Ptr::Ref criteria) throw () { + displayMessage("pleaseWaitMsg", localSearchResults); + gLiveSupport->runMainLoop(); + Ptr::Ref searchResults; try { searchResults = gLiveSupport->search(criteria); @@ -472,9 +475,14 @@ SearchWindow :: displaySearchResults( Ptr::Ref widgetFactory = WidgetFactory::getInstance(); - GLiveSupport::PlayableList::const_iterator it; + GLiveSupport::PlayableList::const_iterator it = searchResults->begin(); - for (it = searchResults->begin(); it != searchResults->end(); ++it) { + if (it == searchResults->end()) { + displayMessage("nothingFoundMsg", treeModel); + return; + } + + for ( ; it != searchResults->end(); ++it) { Ptr::Ref playable = *it; Gtk::TreeModel::Row row = *treeModel->append(); diff --git a/livesupport/src/products/gLiveSupport/var/root.txt b/livesupport/src/products/gLiveSupport/var/root.txt index 977d1e5f7..c8786cb20 100644 --- a/livesupport/src/products/gLiveSupport/var/root.txt +++ b/livesupport/src/products/gLiveSupport/var/root.txt @@ -219,6 +219,7 @@ root:table remoteSearchErrorMsg:string { "Search failed: {0}." } uploadToHubErrorMsg:string { "Uploading to hub failed: {0}." } downloadFromHubErrorMsg:string { "Downloading from hub failed: {0}." } + nothingFoundMsg:string { "No files found." } } advancedSearchEntry:table {