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
=== modified file 'src/applet-main.c'
--- src/applet-main.c 2013-09-19 21:56:33 +0000
+++ src/applet-main.c 2014-02-25 21:16:04 +0000
@@ -498,16 +498,16 @@
498 /* disconnect the callbacks */498 /* disconnect the callbacks */
499 if (G_IS_OBJECT (entry->label)) {499 if (G_IS_OBJECT (entry->label)) {
500 g_object_disconnect (entry->label,500 g_object_disconnect (entry->label,
501 "signal::show", G_CALLBACK(something_shown), menuitem,501 "any-signal", G_CALLBACK(something_shown), menuitem,
502 "signal::hide", G_CALLBACK(something_hidden), menuitem,502 "any-signal", G_CALLBACK(something_hidden), menuitem,
503 "signal::notify::sensitive", G_CALLBACK(sensitive_cb), menuitem,503 "any-signal", G_CALLBACK(sensitive_cb), menuitem,
504 NULL);504 NULL);
505 }505 }
506 if (G_IS_OBJECT (entry->image)) {506 if (G_IS_OBJECT (entry->image)) {
507 g_object_disconnect (entry->image,507 g_object_disconnect (entry->image,
508 "signal::show", G_CALLBACK(something_shown), menuitem,508 "any-signal", G_CALLBACK(something_shown), menuitem,
509 "signal::hide", G_CALLBACK(something_hidden), menuitem,509 "any-signal", G_CALLBACK(something_hidden), menuitem,
510 "signal::notify::sensitive", G_CALLBACK(sensitive_cb), menuitem,510 "any-signal", G_CALLBACK(sensitive_cb), menuitem,
511 NULL);511 NULL);
512 }512 }
513513

Subscribers

People subscribed via source and target branches