From: Florian Müllner Date: Wed, 28 Jul 2021 19:48:01 +0000 (+0200) Subject: widget: Change callback scope X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~1^2~23^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bc386c9a6047a19f1d9d1d3d996846d03ac19a74;p=gtk4.git widget: Change callback scope Look who changed his mind since commit 8e2ffb3b46 :-) The "call" scope means that the callback is only used during the function call itself (here: gtk_widget_class_install_action()). That's clearly wrong here, as the callback is invoked every time the action is activated. Arguably the "notified" scope is a better match here, where the lack of a GDestroyNotify parameter suggests that the callback may be used forever (which is the case here). Related: #3498 --- diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 724ee32eae..61511601bb 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -12465,7 +12465,7 @@ gtk_widget_class_add_action (GtkWidgetClass *widget_class, * @widget_class: a `GtkWidgetClass` * @action_name: a prefixed action name, such as "clipboard.paste" * @parameter_type: (nullable): the parameter type - * @activate: (scope call): callback to use when the action is activated + * @activate: (scope notified): callback to use when the action is activated * * This should be called at class initialization time to specify * actions to be added for all instances of this class.