mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-17 19:21:58 +02:00
cancellable: Connect to cancelled signal using the ID
Avoid fetching the signal-ID by its name since we know it here
This commit is contained in:
parent
eedf75e810
commit
7086823bb2
@ -583,10 +583,12 @@ g_cancellable_connect (GCancellable *cancellable,
|
||||
}
|
||||
else
|
||||
{
|
||||
id = g_signal_connect_data (cancellable, "cancelled",
|
||||
callback, data,
|
||||
(GClosureNotify) data_destroy_func,
|
||||
G_CONNECT_DEFAULT);
|
||||
GClosure *closure;
|
||||
|
||||
closure = g_cclosure_new (callback, data,
|
||||
(GClosureNotify) data_destroy_func);
|
||||
id = g_signal_connect_closure_by_id (cancellable, signals[CANCELLED],
|
||||
0, closure, FALSE);
|
||||
}
|
||||
|
||||
g_mutex_unlock (&cancellable->priv->mutex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user