Merge lp:~charlesk/indicator-applet/lp-1284840 into lp:indicator-applet

Proposed by Charles Kerr
Status: Merged
Approved by: Ted Gould
Approved revision: 424
Merged at revision: 424
Proposed branch: lp:~charlesk/indicator-applet/lp-1284840
Merge into: lp:indicator-applet
Diff against target: 25 lines (+6/-6)
1 file modified
src/applet-main.c (+6/-6)
To merge this branch: bzr merge lp:~charlesk/indicator-applet/lp-1284840
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+208231@code.launchpad.net

Commit message

Use the correct signal_spec syntax when calling g_object_disconnect().

Description of the change

Use the correct signal_spec syntax when calling g_object_disconnect().

Prior to this patch, we're using the same syntax as g_object_connect(), which is wrong.

The docs say this about _disconnect():

> The signal specs expected by this function have the form "any_signal", which means to disconnect any signal with matching callback and data, or "any_signal::signal_name", which only disconnects the signal named "signal_name".

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
Ted Gould (ted) wrote :

They docs say "any_signal" but looking at the code "any-signal" should work as well.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/applet-main.c'
2--- src/applet-main.c 2013-09-19 21:56:33 +0000
3+++ src/applet-main.c 2014-02-25 21:16:04 +0000
4@@ -498,16 +498,16 @@
5 /* disconnect the callbacks */
6 if (G_IS_OBJECT (entry->label)) {
7 g_object_disconnect (entry->label,
8- "signal::show", G_CALLBACK(something_shown), menuitem,
9- "signal::hide", G_CALLBACK(something_hidden), menuitem,
10- "signal::notify::sensitive", G_CALLBACK(sensitive_cb), menuitem,
11+ "any-signal", G_CALLBACK(something_shown), menuitem,
12+ "any-signal", G_CALLBACK(something_hidden), menuitem,
13+ "any-signal", G_CALLBACK(sensitive_cb), menuitem,
14 NULL);
15 }
16 if (G_IS_OBJECT (entry->image)) {
17 g_object_disconnect (entry->image,
18- "signal::show", G_CALLBACK(something_shown), menuitem,
19- "signal::hide", G_CALLBACK(something_hidden), menuitem,
20- "signal::notify::sensitive", G_CALLBACK(sensitive_cb), menuitem,
21+ "any-signal", G_CALLBACK(something_shown), menuitem,
22+ "any-signal", G_CALLBACK(something_hidden), menuitem,
23+ "any-signal", G_CALLBACK(sensitive_cb), menuitem,
24 NULL);
25 }
26

Subscribers

People subscribed via source and target branches