Re: GtkComboBox question
- From: Igor Korot <ikorot earthlink net>
- To: Mike Massonnet <mmassonnet gmail com>, gtk-list gnome org
- Subject: Re: GtkComboBox question
- Date: Thu, 12 Mar 2009 14:04:36 -0400 (EDT)
>From: Mike Massonnet <mmassonnet gmail com>
>Sent: Mar 11, 2009 8:52 PM
>To: gtk-list gnome org
>Cc: Igor Korot <ikorot earthlink net>
>Subject: Re: GtkComboBox question
>Le Wed, 11 Mar 2009 19:32:29 -0400 (EDT),
>Igor Korot <ikorot earthlink net> a écrit :
>> So basically what I'm looking for is this code:
>> g_signal_connect( combo->popup-shown, "notify::popup-shown",
>Nope, the definition is (Object, "sig-name", callback, user_data), and
>combo->popup-shown is completely wrong. You want to pass the combobox.
Yes. Learned it the hard way. I wish the place I'm staying for the week
had a web access... ;-)
>> Gets properties of an object.
>> In general, a copy is made of the property contents and the caller is
>> responsible for freeing the memory in the appropriate manner for the
>> type, for instance by calling g_free() or g_object_unref().
>> What scares me is the words "In general". So if this property is
>> boolean, then according to the example that follows, I don't have to
>> free the memory. But then will I have a memory leak?
>No, because you declare the boolean as a local variable. Strings are
>a good example of memory you need to free.
Ok, that clarifies it.
All in all I'm happy to report that this solution works. This is what
you need in order to get the dropdown/closeup signals/events.
A big thank you to Mike and everybody else.
] [Thread Prev