mirror of
https://github.com/brl/mutter.git
synced 2025-03-03 11:58:09 +00:00
cookbooks/examples: Use g_signal_handlers_disconnect_by_func()
The disconnect_matched() function is a bit too complicated, and its simpler wrapper disconnect_by_func() is functionally equivalent in the cases used by the cookbook examples.
This commit is contained in:
parent
63a05fca9d
commit
72caef0de0
@ -1580,12 +1580,8 @@ foo_button_pressed_cb (ClutterActor *actor,
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/* remove the button press handler from the rectangle */
|
/* remove the button press handler from the rectangle */
|
||||||
g_signal_handlers_disconnect_matched (actor,
|
g_signal_handlers_disconnect_by_func (actor,
|
||||||
G_SIGNAL_MATCH_FUNC,
|
G_CALLBACK (foo_button_pressed_cb),
|
||||||
0,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
foo_button_pressed_cb,
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/* add a callback to clean up the script when the rig is destroyed */
|
/* add a callback to clean up the script when the rig is destroyed */
|
||||||
|
@ -46,12 +46,8 @@ foo_button_pressed_cb (ClutterActor *actor,
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/* remove the button press handler from the rectangle */
|
/* remove the button press handler from the rectangle */
|
||||||
g_signal_handlers_disconnect_matched (actor,
|
g_signal_handlers_disconnect_by_func (actor,
|
||||||
G_SIGNAL_MATCH_FUNC,
|
G_CALLBACK (foo_button_pressed_cb),
|
||||||
0,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
foo_button_pressed_cb,
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/* add a callback to clean up the script when the rig is destroyed */
|
/* add a callback to clean up the script when the rig is destroyed */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user