summaryrefslogtreecommitdiff
path: root/dash
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2013-05-03 01:34:04 +0000
committerTarmac <>2013-05-03 01:34:04 +0000
commitb0477dbe8dfe65756eec88b8e68824923d0d213f (patch)
treea4cd273f2c7048e9316bb878edf1e2155a6093c8 /dash
parente566b528eb47e11a39cbc874cfdf9a45f6dee3b2 (diff)
parenta6d8b8d086df8b3ca03f708692ab63af1fd6516f (diff)
Fix "There is no content..." message. Fixes: https://bugs.launchpad.net/bugs/1170728.
Approved by Michal Hruby, PS Jenkins bot. (bzr r3008.2.126)
Diffstat (limited to 'dash')
-rwxr-xr-xdash/ScopeView.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/dash/ScopeView.cpp b/dash/ScopeView.cpp
index 6a9193738..ee85a9b48 100755
--- a/dash/ScopeView.cpp
+++ b/dash/ScopeView.cpp
@@ -670,9 +670,9 @@ void ScopeView::OnResultRemoved(Result const& result)
void ScopeView::CheckNoResults(glib::HintsMap const& hints)
{
- gint count = scope_->results()->count();
+ gint const count = scope_->results()->count();
- if (count == 0 && !no_results_active_ && !search_string_.empty())
+ if (count == 0)
{
std::stringstream markup;
glib::HintsMap::const_iterator it;
@@ -681,13 +681,10 @@ void ScopeView::CheckNoResults(glib::HintsMap const& hints)
markup << "<span size='larger' weight='bold'>";
if (it != hints.end())
- {
markup << it->second.GetString();
- }
else
- {
markup << _("Sorry, there is nothing that matches your search.");
- }
+
markup << "</span>";
LOG_DEBUG(logger) << "The no-result-hint is: " << markup.str();
@@ -870,16 +867,16 @@ void ScopeView::Draw(nux::GraphicsEngine& graphics_engine, bool force_draw)
void ScopeView::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw)
{
- nux::Geometry const& geo(GetGeometry());
+ nux::Geometry const& geo = GetGeometry();
graphics_engine.PushClippingRectangle(geo);
CheckScrollBarState();
if (!IsFullRedraw() && RedirectedAncestor())
{
if (filter_bar_ && filter_bar_->IsVisible() && filter_bar_->IsRedrawNeeded())
- {
graphics::ClearGeometry(filter_bar_->GetGeometry());
- }
+ else if (no_results_ && no_results_->IsVisible() && no_results_->IsRedrawNeeded())
+ graphics::ClearGeometry(no_results_->GetGeometry());
}
layout_->ProcessDraw(graphics_engine, force_draw);