Merge lp:~stolowski/libunity/new-query-on-activate into lp:libunity

Proposed by Paweł Stołowski
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 283
Merged at revision: 285
Proposed branch: lp:~stolowski/libunity/new-query-on-activate
Merge into: lp:libunity
Diff against target: 90 lines (+17/-2)
4 files modified
debian/changelog (+1/-0)
debian/libunity9.symbols (+2/-0)
protocol/protocol-scope-interface.vala (+2/-1)
src/unity-result-activation.vala (+12/-1)
To merge this branch: bzr merge lp:~stolowski/libunity/new-query-on-activate
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michal Hruby (community) Approve
Review via email: mp+181844@code.launchpad.net

Commit message

Add a new activation response that tells Unity to issue a new search query.

Description of the change

Add a new activation response that tells Unity to issue a new search query.

Please don't globally approve (pending design review).

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 :

78 + public ActivationResponse.do_search (string search_string)

Since this is a constructor and public API, can we make it "ActivationResponse.with_search (string, FilterSet?, SearchMetadata?)" instead? No need to handle the two extra params right now.

56 + DO_SEARCH

PERFORM_ pls :)

Otherwise looking good.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Paweł Stołowski (stolowski) wrote :

Changed as suggested.

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

Looking good

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-08-27 09:40:19 +0000
3+++ debian/changelog 2013-08-27 14:22:09 +0000
4@@ -2,6 +2,7 @@
5
6 [ Pawel Stolowski ]
7 * Removed openweathermap scope from list of client scopes.
8+ * Support new search on activation request.
9
10 [ Michal Hruby ]
11 * Added colorize API to AnnotatedIcon.
12
13=== modified file 'debian/libunity9.symbols'
14--- debian/libunity9.symbols 2013-08-27 09:40:19 +0000
15+++ debian/libunity9.symbols 2013-08-27 14:22:09 +0000
16@@ -61,6 +61,7 @@
17 unity_abstract_scope_normalize_search_query@Base 7.0.0daily13.05.31ubuntu.unity.next
18 unity_abstract_scope_results_invalidated@Base 7.0.9+13.10.20130723
19 unity_activation_response_construct@Base 4.0.0
20+ unity_activation_response_construct_with_search@Base 0replaceme
21 unity_activation_response_construct_with_preview@Base 5.90.0
22 unity_activation_response_get_goto_uri@Base 4.0.0
23 unity_activation_response_get_handled@Base 4.0.0
24@@ -68,6 +69,7 @@
25 unity_activation_response_get_preview@Base 5.90.0
26 unity_activation_response_get_type@Base 4.0.0
27 unity_activation_response_new@Base 4.0.0
28+ unity_activation_response_new_with_search@Base 0replaceme
29 unity_activation_response_new_with_preview@Base 5.90.0
30 unity_activation_response_set_goto_uri@Base 4.0.0
31 unity_activation_response_set_preview@Base 5.90.0
32
33=== modified file 'protocol/protocol-scope-interface.vala'
34--- protocol/protocol-scope-interface.vala 2013-07-16 17:23:39 +0000
35+++ protocol/protocol-scope-interface.vala 2013-08-27 14:22:09 +0000
36@@ -37,7 +37,8 @@
37 SHOW_DASH,
38 HIDE_DASH,
39 GOTO_DASH_URI,
40- SHOW_PREVIEW
41+ SHOW_PREVIEW,
42+ PERFORM_SEARCH
43 }
44
45 public enum ActionType
46
47=== modified file 'src/unity-result-activation.vala'
48--- src/unity-result-activation.vala 2013-03-11 18:36:48 +0000
49+++ src/unity-result-activation.vala 2013-08-27 14:22:09 +0000
50@@ -37,7 +37,8 @@
51 SHOW_DASH,
52 HIDE_DASH,
53 GOTO_DASH_URI,
54- SHOW_PREVIEW
55+ SHOW_PREVIEW,
56+ PERFORM_SEARCH
57 }
58
59 public class ActivationResponse : Object
60@@ -50,6 +51,13 @@
61 Object (handled:handled, goto_uri:goto_uri);
62 }
63
64+ public ActivationResponse.with_search (string search_string, FilterSet? filter_set, SearchMetadata? search_metadata)
65+ {
66+ // filter_set and search_metadata are not currently handled
67+ Object (handled:HandledType.PERFORM_SEARCH);
68+ _new_query = search_string;
69+ }
70+
71 public ActivationResponse.with_preview (Preview preview)
72 {
73 Object (handled:HandledType.SHOW_PREVIEW);
74@@ -57,6 +65,7 @@
75 }
76
77 private Preview _preview;
78+ private string? _new_query;
79
80 internal HashTable<string, Variant> get_hints ()
81 {
82@@ -66,6 +75,8 @@
83 hash["goto-uri"] = goto_uri;
84 if (_preview != null)
85 hash["preview"] = _preview.serialize ();
86+ if (_new_query != null)
87+ hash["query"] = _new_query;
88
89 return hash;
90 }

Subscribers

People subscribed via source and target branches