Re: Trouble with signal ID lookup for "popped-up"
- From: Eric Williams <ericwill redhat com>
- To: '-' <makepost firemail cc>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Trouble with signal ID lookup for "popped-up"
- Date: Wed, 10 Jan 2018 09:35:32 -0500
Hello,
On 01/09/2018 05:58 PM, '-' wrote:
Hi,
Is GtkMenu a dynamic class? Might need to demand-create it by increasing
its reference count, and keep the reference alive, until you no longer
need the signal ID. Otherwise ID can be different, or not exist, at the
time you try actually using it, as signals get destroyed and created again:
```c
GObjectClass *class = g_type_class_ref (GTK_TYPE_MENU);
g_signal_lookup ("popped-up", GTK_TYPE_MENU);
// Do something with the signal...
g_type_class_unref (class);
// Shouldn't be relying on the signal at this point.
```
This did the trick, thank you!
Eric
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]