Merge lp:~stolowski/unity-lens-applications/fuzzy-public-content into lp:~unity-team/unity-lens-applications/libunity7-compatible

Proposed by Paweł Stołowski
Status: Merged
Approved by: Michal Hruby
Approved revision: 348
Merged at revision: 347
Proposed branch: lp:~stolowski/unity-lens-applications/fuzzy-public-content
Merge into: lp:~unity-team/unity-lens-applications/libunity7-compatible
Diff against target: 93 lines (+11/-4)
4 files modified
src/daemon.vala (+2/-2)
src/unity-package-search.cc (+5/-0)
src/unity-package-search.h (+3/-2)
vapi/unity-package-search.vapi (+1/-0)
To merge this branch: bzr merge lp:~stolowski/unity-lens-applications/fuzzy-public-content
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+162978@code.launchpad.net

This proposal supersedes a proposal from 2013-05-08.

Commit message

Mark results of libcolumbus fuzzy searches as 'default' content (as opposed to 'personal'). Also mark apps returned by software-center-dbus-provider as 'default', unless they were purchased before.

Description of the change

Mark results of libcolumbus fuzzy searches as 'default' content (as opposed to 'personal'). Also mark apps returned by software-center-dbus-provider as 'default', unless they were purchased before.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:347
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~stolowski/unity-lens-applications/fuzzy-public-content/+merge/162978/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-team-unity-lens-applications-libunity7-compatible-ci/17/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-team-unity-lens-applications-libunity7-compatible-raring-amd64-ci/17

Click here to trigger a rebuild:
http://s-jenkins:8080/job/unity-team-unity-lens-applications-libunity7-compatible-ci/17/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

18 + var result_type = (category == Category.INSTALLED && !results.fuzzy_search) ?

Should be category != Category.AVAILABLE && ...

review: Needs Fixing
348. By Paweł Stołowski

Fixed conditional to treat all apps from category other than AVAILABLE as personal content, as this also includes
more categories than just INSTALLED (e.g. RECENT apps).

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

This doesn't really fix the linked bug, merely moves the results to non-first place (and only in some cases).

That being said, I'm approving this, but don't think the status of the linked bug changed.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/daemon.vala'
2--- src/daemon.vala 2013-05-01 19:19:03 +0000
3+++ src/daemon.vala 2013-05-08 16:01:27 +0000
4@@ -914,7 +914,7 @@
5
6 model.append (uri, icon_obj,
7 category,
8- Unity.ResultType.PERSONAL,
9+ pinfo != null && pinfo.paid ? Unity.ResultType.PERSONAL : Unity.ResultType.DEFAULT,
10 "application/x-desktop",
11 app.application_name,
12 "", //comment
13@@ -1013,7 +1013,7 @@
14 icon_str = icon.to_string ();
15 }
16
17- var result_type = category == Category.INSTALLED ?
18+ var result_type = (category != Category.AVAILABLE && !results.fuzzy_search) ?
19 Unity.ResultType.PERSONAL : Unity.ResultType.DEFAULT;
20 model.append (uri, icon_str,
21 category,
22
23=== modified file 'src/unity-package-search.cc'
24--- src/unity-package-search.cc 2013-04-29 21:25:01 +0000
25+++ src/unity-package-search.cc 2013-05-08 16:01:27 +0000
26@@ -680,6 +680,7 @@
27 // Retrieve the results, note that we build the result->results
28 // list in reverse order and then reverse it before we return it
29 result->num_hits = matches.get_matches_estimated ();
30+ result->fuzzy_search = false;
31
32 for (Xapian::MSetIterator i = matches.begin(); i != matches.end(); ++i)
33 {
34@@ -731,6 +732,7 @@
35 }
36
37 result->results = g_slist_reverse (result->results);
38+ result->fuzzy_search = true;
39 return result;
40 }
41
42@@ -819,6 +821,7 @@
43 g_hash_table_unref (unique);
44
45 result->num_hits = num_matches;
46+ result->fuzzy_search = false;
47 return result;
48 }
49
50@@ -835,6 +838,7 @@
51
52 result = g_slice_new0 (UnityPackageSearchResult);
53 result->num_hits = n_apps;
54+ result->fuzzy_search = false;
55 lastdocid = searcher->db->get_lastdocid ();
56
57 /* Since we really just pick random apps we may end up with dupes */
58@@ -976,6 +980,7 @@
59 }
60
61 result->num_hits = num_matches;
62+ result->fuzzy_search = false;
63 return result;
64 }
65
66
67=== modified file 'src/unity-package-search.h'
68--- src/unity-package-search.h 2013-04-29 21:25:01 +0000
69+++ src/unity-package-search.h 2013-05-08 16:01:27 +0000
70@@ -37,8 +37,9 @@
71
72 typedef struct
73 {
74- GSList *results;
75- gint num_hits;
76+ GSList *results;
77+ gint num_hits;
78+ gboolean fuzzy_search;
79 } UnityPackageSearchResult;
80
81 typedef struct
82
83=== modified file 'vapi/unity-package-search.vapi'
84--- vapi/unity-package-search.vapi 2013-04-29 21:25:01 +0000
85+++ vapi/unity-package-search.vapi 2013-05-08 16:01:27 +0000
86@@ -43,6 +43,7 @@
87 public SearchResult ();
88 public GLib.SList<PackageInfo> results;
89 public int num_hits;
90+ public bool fuzzy_search;
91 }
92
93 [Compact]

Subscribers

People subscribed via source and target branches

to all changes: