Merge lp:~azzar1/unity/no-result-hint into lp:~unity-team/unity/libunity-7.0-breakage

Proposed by Andrea Azzarone
Status: Merged
Approved by: Michal Hruby
Approved revision: no longer in the source branch.
Merged at revision: 3134
Proposed branch: lp:~azzar1/unity/no-result-hint
Merge into: lp:~unity-team/unity/libunity-7.0-breakage
Diff against target: 62 lines (+7/-9)
2 files modified
dash/ScopeView.cpp (+6/-9)
unity-shared/StaticCairoText.cpp (+1/-0)
To merge this branch: bzr merge lp:~azzar1/unity/no-result-hint
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+162272@code.launchpad.net

Commit message

Fix "There is no content..." message.

Description of the change

== Problem ==
Bug #1170728: 'There is no content...' message is missing if there no results when opening some lenses.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

Works well, +1

review: Approve
Revision history for this message
Michal Hruby (mhr3) wrote :

8 - gint count = scope_->results()->count();
9 + gint const count = scope_->results()->count();

A bit useless though...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dash/ScopeView.cpp'
2--- dash/ScopeView.cpp 2013-04-25 15:31:32 +0000
3+++ dash/ScopeView.cpp 2013-05-02 23:10:32 +0000
4@@ -670,9 +670,9 @@
5
6 void ScopeView::CheckNoResults(glib::HintsMap const& hints)
7 {
8- gint count = scope_->results()->count();
9+ gint const count = scope_->results()->count();
10
11- if (count == 0 && !no_results_active_ && !search_string_.empty())
12+ if (count == 0)
13 {
14 std::stringstream markup;
15 glib::HintsMap::const_iterator it;
16@@ -681,13 +681,10 @@
17 markup << "<span size='larger' weight='bold'>";
18
19 if (it != hints.end())
20- {
21 markup << it->second.GetString();
22- }
23 else
24- {
25 markup << _("Sorry, there is nothing that matches your search.");
26- }
27+
28 markup << "</span>";
29
30 LOG_DEBUG(logger) << "The no-result-hint is: " << markup.str();
31@@ -870,16 +867,16 @@
32
33 void ScopeView::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw)
34 {
35- nux::Geometry const& geo(GetGeometry());
36+ nux::Geometry const& geo = GetGeometry();
37 graphics_engine.PushClippingRectangle(geo);
38 CheckScrollBarState();
39
40 if (!IsFullRedraw() && RedirectedAncestor())
41 {
42 if (filter_bar_ && filter_bar_->IsVisible() && filter_bar_->IsRedrawNeeded())
43- {
44 graphics::ClearGeometry(filter_bar_->GetGeometry());
45- }
46+ else if (no_results_ && no_results_->IsVisible() && no_results_->IsRedrawNeeded())
47+ graphics::ClearGeometry(no_results_->GetGeometry());
48 }
49
50 layout_->ProcessDraw(graphics_engine, force_draw);
51
52=== modified file 'unity-shared/StaticCairoText.cpp'
53--- unity-shared/StaticCairoText.cpp 2013-03-19 16:36:22 +0000
54+++ unity-shared/StaticCairoText.cpp 2013-05-02 23:10:32 +0000
55@@ -349,6 +349,7 @@
56 pimpl->text_ = tmp_text;
57 pimpl->need_new_extent_cache_ = true;
58 pimpl->UpdateTexture();
59+ QueueDraw();
60 sigTextChanged.emit(this);
61 }
62 }

Subscribers

People subscribed via source and target branches

to all changes: