Re: gtk_window_set_default_icon_list()
- From: Owen Taylor <otaylor redhat com>
- To: fredderic excite com
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtk_window_set_default_icon_list()
- Date: Tue, 17 May 2005 14:18:51 -0400
On Tue, 2005-05-17 at 00:14 -0400, Freddie Unpenstein wrote:
I've gone looking through the API, and I'll be stuffed if I can figure something out...
As I understand it, you're supposed to load the icons into GdkPixbuf's, store them in a GSList, and
then feed that list to the gtk_window_set_default_icon_list() function. But what then?
Does the function keep the list you gave it, or does it make a copy and expect you to clean it up.
How about the images; does it take an extra reference, and expect you to release yours?
What if you give it a new list; what happens to the old list and the old images?
What if I modify the list after giving it to the function?
Appart from affecting all new windows vs. a specific window, are there any other
differences (especially in terms of memory management) between this function and
gtk_window_set_icon_list()?
Stay tuned, for someone who has a clue to give you this, and other exciting answers...
Same GTK time, same GTK channel...! ;)
When the docs are insufficient, you can always take a look at the
source:
http://cvs.gnome.org/viewcvs/gtk%2B/gtk/gtkwindow.c?view=markup
Take advantage of this whole "open source" thing :-)
Quoting the relevant portion:
g_list_foreach (list,
(GFunc) g_object_ref, NULL);
g_list_foreach (default_icon_list,
(GFunc) g_object_unref, NULL);
g_list_free (default_icon_list);
default_icon_list = g_list_copy (list);
So, it copies the list and references the pixbufs in it. Given enough experience
with the way that GTK+ works, this isn't particularly surprising, but the docs
could certainly be more explicit.
I assume you are going to submit a bug in bugzilla with suggestions for improving
the documentation?
Thanks,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]