Merge lp:~kamstrup/libunity/search-really-finished into lp:libunity

Proposed by Mikkel Kamstrup Erlandsen
Status: Merged
Merged at revision: 56
Proposed branch: lp:~kamstrup/libunity/search-really-finished
Merge into: lp:libunity
Diff against target: 52 lines (+34/-1)
1 file modified
src/unity-place.vala (+34/-1)
To merge this branch: bzr merge lp:~kamstrup/libunity/search-really-finished
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Review via email: mp+56579@code.launchpad.net

Description of the change

Fixes attached bug across alt-f2, u-pf, u-p-a, and any other place implementation using search.finished() in one fell swoop. See commit log for details.

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

oh! this long standing issue was a Mikkel's bug zomg /o\

Excellent, works as discussed on IRC! approved :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/unity-place.vala'
2--- src/unity-place.vala 2011-03-21 10:57:23 +0000
3+++ src/unity-place.vala 2011-04-06 14:42:19 +0000
4@@ -255,7 +255,12 @@
5 try {
6 Variant vhints = hints;
7 var params = new Variant ("(us@a{ss})", section, search, vhints);
8- var conn = Bus.get_sync(BusType.SESSION);
9+ var conn = Bus.get_sync(BusType.SESSION);
10+
11+ /* Make sure we push any changes to the models *before* sending
12+ * the SearchFinished signal */
13+ parent_entry.flush_all_models ();
14+
15 conn.emit_signal (null, /* dest name */
16 parent_entry.dbus_path, /* orig path */
17 "com.canonical.Unity.PlaceEntry", /* iface */
18@@ -482,6 +487,34 @@
19 return info.hints.size ();
20 }
21
22+ public void flush_all_models ()
23+ {
24+ /* Important note: If the revision queues of the models are empty
25+ * these calls are just no-ops */
26+ if (sections_model is Dee.SharedModel)
27+ {
28+ (sections_model as Dee.SharedModel).flush_revision_queue ();
29+ }
30+
31+ if (entry_renderer_info.results_model is Dee.SharedModel)
32+ {
33+ (entry_renderer_info.results_model as Dee.SharedModel).flush_revision_queue ();
34+ }
35+ if (entry_renderer_info.groups_model is Dee.SharedModel)
36+ {
37+ (entry_renderer_info.groups_model as Dee.SharedModel).flush_revision_queue ();
38+ }
39+
40+ if (global_renderer_info.results_model is Dee.SharedModel)
41+ {
42+ (entry_renderer_info.results_model as Dee.SharedModel).flush_revision_queue ();
43+ }
44+ if (global_renderer_info.groups_model is Dee.SharedModel)
45+ {
46+ (global_renderer_info.groups_model as Dee.SharedModel).flush_revision_queue ();
47+ }
48+ }
49+
50 /*
51 * Internal API
52 */

Subscribers

People subscribed via source and target branches