Re: GtkComboBox question
- From: Mike Massonnet <mmassonnet gmail com>
- To: gtk-list gnome org
- Subject: Re: GtkComboBox question
- Date: Thu, 12 Mar 2009 01:52:28 +0100
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",
> G_CALLBACK(...),combo);
>
> right?
Nope, the definition is (Object, "sig-name", callback, user_data), and
combo->popup-shown is completely wrong. You want to pass the combobox.
> "
> 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.
Mike
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]