Merge lp:~kaijanmaki/hud/fix-updated-query-signals into lp:hud/13.10

Proposed by Antti Kaijanmäki
Status: Merged
Approved by: Pete Woods
Approved revision: 302
Merged at revision: 302
Proposed branch: lp:~kaijanmaki/hud/fix-updated-query-signals
Merge into: lp:hud/13.10
Diff against target: 16 lines (+1/-1)
1 file modified
src/service.c (+1/-1)
To merge this branch: bzr merge lp:~kaijanmaki/hud/fix-updated-query-signals
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Pete Woods (community) Approve
Review via email: mp+175040@code.launchpad.net

Commit message

Fix hud-service emitting multiple UpdatedQuery signals.

To post a comment you must log in.
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

The hud-service has one "always open" query which it uses for the legacy interface. The problem is that the source-changed signal was getting connected each time hud receives StartQuery and as the query is shared it just adds one additional signal each time on the shared query causing the legacy_update to be called multiple times on a single source-changed.

This change connects to the signal only when when query is first created.

Revision history for this message
Pete Woods (pete-woods) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:302
http://jenkins.qa.ubuntu.com/job/hud-ci/107/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/hud-saucy-amd64-ci/68
    SUCCESS: http://jenkins.qa.ubuntu.com/job/hud-saucy-i386-ci/68

Click here to trigger a rebuild:
http://s-jenkins:8080/job/hud-ci/107/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/service.c'
2--- src/service.c 2013-06-14 00:48:33 +0000
3+++ src/service.c 2013-07-16 14:56:24 +0000
4@@ -528,11 +528,11 @@
5 if (query == NULL) {
6 query = build_query (all_sources, application_list, connection, g_dbus_method_invocation_get_sender(invocation), search_string);
7 g_object_set_data_full(G_OBJECT(query), LEGACY_QUERY_SENDER, g_strdup(g_dbus_method_invocation_get_sender(invocation)), g_free);
8+ g_signal_connect(query, "changed", G_CALLBACK(legacy_update), connection);
9 } else {
10 hud_query_update_search(query, search_string);
11 }
12
13- g_signal_connect(query, "changed", G_CALLBACK(legacy_update), connection);
14 g_dbus_method_invocation_return_value (invocation, describe_legacy_query (query));
15
16 g_variant_unref(vsearch);

Subscribers

People subscribed via source and target branches