Merge lp:~mhr3/libunity/filter-state-update into lp:~unity-team/libunity/libunity-7.0

Proposed by Michal Hruby
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 375
Merged at revision: 374
Proposed branch: lp:~mhr3/libunity/filter-state-update
Merge into: lp:~unity-team/libunity/libunity-7.0
Diff against target: 56 lines (+15/-2)
3 files modified
debian/libunity9.symbols (+1/-0)
src/unity-aggregator-scope-private.vala (+5/-0)
src/unity-scope-channel.vala (+9/-2)
To merge this branch: bzr merge lp:~mhr3/libunity/filter-state-update
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+161944@code.launchpad.net

Commit message

Update filter state for all channels after a change.

Description of the change

Update filter state for all channels after a change.

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

Update symbols

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 :

LGTM and works fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/libunity9.symbols'
2--- debian/libunity9.symbols 2013-04-25 16:05:20 +0000
3+++ debian/libunity9.symbols 2013-05-01 21:13:26 +0000
4@@ -378,6 +378,7 @@
5 unity_internal_scope_channel_is_search_running@Base 0replaceme
6 unity_internal_scope_channel_new@Base 6.91.9daily13.04.10ubuntu.unity.experimental.certified
7 unity_internal_scope_channel_register_pushed_model@Base 0replaceme
8+ unity_internal_scope_channel_set_filter_base@Base 0replaceme
9 unity_internal_scope_channel_new@Base 0replaceme
10 unity_internal_scope_channel_set_state@Base 0replaceme
11 unity_internal_scope_channel_wait_for_search@Base 0replaceme
12
13=== modified file 'src/unity-aggregator-scope-private.vala'
14--- src/unity-aggregator-scope-private.vala 2013-04-30 15:58:10 +0000
15+++ src/unity-aggregator-scope-private.vala 2013-05-01 21:13:26 +0000
16@@ -993,6 +993,11 @@
17 queue_property_notification ("Filters",
18 new Variant.variant (this.filters));
19 }
20+
21+ foreach (var channel in _channels.get_values ())
22+ {
23+ channel.set_filter_base (filters_model);
24+ }
25 }
26
27 private void on_proxy_results_invalidated (ChannelType channel_type)
28
29=== modified file 'src/unity-scope-channel.vala'
30--- src/unity-scope-channel.vala 2013-04-30 15:58:10 +0000
31+++ src/unity-scope-channel.vala 2013-05-01 21:13:26 +0000
32@@ -152,6 +152,15 @@
33 backend_model.set_column_names_full (RESULTS_COLUMN_NAMES);
34 backend_model.register_vardict_schema (METADATA_COLUMN, vardict_schema);
35
36+ set_filter_base (filter_model);
37+
38+ return swarm_name;
39+ }
40+
41+ public void set_filter_base (Dee.SerializableModel filter_model)
42+ {
43+ filters = new FilterSet ();
44+
45 // make a copy of filter_model, and handle the filter state there
46 var fm_iter = filter_model.get_first_iter ();
47 var end_iter = filter_model.get_last_iter ();
48@@ -161,8 +170,6 @@
49 if (filter != null) filters.add (filter);
50 fm_iter = filter_model.next (fm_iter);
51 }
52-
53- return swarm_name;
54 }
55
56 public unowned Filter? get_filter_by_id (string filter_id)

Subscribers

People subscribed via source and target branches

to all changes: