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
=== modified file 'src/unity-place.vala'
--- src/unity-place.vala 2011-03-21 10:57:23 +0000
+++ src/unity-place.vala 2011-04-06 14:42:19 +0000
@@ -255,7 +255,12 @@
255 try {255 try {
256 Variant vhints = hints;256 Variant vhints = hints;
257 var params = new Variant ("(us@a{ss})", section, search, vhints);257 var params = new Variant ("(us@a{ss})", section, search, vhints);
258 var conn = Bus.get_sync(BusType.SESSION); 258 var conn = Bus.get_sync(BusType.SESSION);
259
260 /* Make sure we push any changes to the models *before* sending
261 * the SearchFinished signal */
262 parent_entry.flush_all_models ();
263
259 conn.emit_signal (null, /* dest name */264 conn.emit_signal (null, /* dest name */
260 parent_entry.dbus_path, /* orig path */265 parent_entry.dbus_path, /* orig path */
261 "com.canonical.Unity.PlaceEntry", /* iface */266 "com.canonical.Unity.PlaceEntry", /* iface */
@@ -482,6 +487,34 @@
482 return info.hints.size ();487 return info.hints.size ();
483 }488 }
484489
490 public void flush_all_models ()
491 {
492 /* Important note: If the revision queues of the models are empty
493 * these calls are just no-ops */
494 if (sections_model is Dee.SharedModel)
495 {
496 (sections_model as Dee.SharedModel).flush_revision_queue ();
497 }
498
499 if (entry_renderer_info.results_model is Dee.SharedModel)
500 {
501 (entry_renderer_info.results_model as Dee.SharedModel).flush_revision_queue ();
502 }
503 if (entry_renderer_info.groups_model is Dee.SharedModel)
504 {
505 (entry_renderer_info.groups_model as Dee.SharedModel).flush_revision_queue ();
506 }
507
508 if (global_renderer_info.results_model is Dee.SharedModel)
509 {
510 (entry_renderer_info.results_model as Dee.SharedModel).flush_revision_queue ();
511 }
512 if (global_renderer_info.groups_model is Dee.SharedModel)
513 {
514 (global_renderer_info.groups_model as Dee.SharedModel).flush_revision_queue ();
515 }
516 }
517
485 /*518 /*
486 * Internal API519 * Internal API
487 */520 */

Subscribers

People subscribed via source and target branches