Merge lp:~mhr3/unity-lens-applications/no-results-hint into lp:unity-lens-applications

Proposed by Michal Hruby
Status: Merged
Approved by: Mikkel Kamstrup Erlandsen
Approved revision: 258
Merged at revision: 257
Proposed branch: lp:~mhr3/unity-lens-applications/no-results-hint
Merge into: lp:unity-lens-applications
Diff against target: 34 lines (+20/-0)
2 files modified
TESTS-TODO.txt (+14/-0)
src/daemon.vala (+6/-0)
To merge this branch: bzr merge lp:~mhr3/unity-lens-applications/no-results-hint
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) Approve
Review via email: mp+88746@code.launchpad.net

Description of the change

Send no-results-hint when there are no results.

To post a comment you must log in.
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :
review: Needs Fixing
258. By Michal Hruby

Add file explaining tests

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

On the one!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'TESTS-TODO.txt'
2--- TESTS-TODO.txt 1970-01-01 00:00:00 +0000
3+++ TESTS-TODO.txt 2012-01-19 12:16:24 +0000
4@@ -0,0 +1,14 @@
5+Since testing lenses is dependant on multiple components in the system,
6+we will implement a `unity-tool` to help which will be able to talk
7+to the lenses and examine their results.
8+
9+Here are some of the use-cases it will be used for:
10+
11+1) Start a domain-specific search which should return non-zero number
12+ of results.
13+
14+2) Start a search with non-sensical string and check that it returns 0 results
15+ and that the "no-results-hint" is set in the method reply.
16+
17+More to come...
18+
19
20=== modified file 'src/daemon.vala'
21--- src/daemon.vala 2012-01-16 09:38:11 +0000
22+++ src/daemon.vala 2012-01-19 12:16:24 +0000
23@@ -473,6 +473,12 @@
24 }
25 }
26
27+ if (model.get_n_rows () == 0)
28+ {
29+ search.set_reply_hint ("no-results-hint",
30+ _("Sorry, there are no applications that match your search."));
31+ }
32+
33 search.finished ();
34 }
35

Subscribers

People subscribed via source and target branches