GNOME Bugzilla – Bug 128762
implemented gdk_window_set_icon_list for win32
Last modified: 2004-12-22 21:47:04 UTC
I have implemented gdk_window_set_icon_list for win32, and I will attach a patch. The implementation has these features: - Sets both the small and large win32 icons. - gdk_window_set_icon is removed. GTK always calls gdk_window_set_icon_list first so this doesn't break anything. - Chooses the best sized icons from the list. - On Windows XP, creates an icon with an 8-bit alpha channel. Uses a 1-bit mask on older versions of windows. - Changes the definition and size of "struct _GdkWindowImplWin32". If this is a problem for binary compatibility I can work around it. The only feature that I think is missing is for it to prefer alpha/non-alpha pixbufs from the list depending on whether the OS is window xp or not.
Created attachment 22201 [details] [review] Patch against gtk+-2.2.4 to fix this bug
Created attachment 22202 [details] [review] corrected patch, previous patch doesn't compile
Actually, I wouldn't want to just look for a pixbuf without alpha. I might want to look for a pixbuf with a 0 or 255 alpha channel, but that's more complex and probably not worth it. My (second) patch above is good enough for me.
Created attachment 22204 [details] [review] updated patch to remove warnings with empty icon list
Thanks! Could you please also write up a ChangeLog entry?
BTW, you mention you changed GdkWindowImplWin32, but I don't see that in the patch?
I will attach the corrected patch (I blame Monday). Changelog entry would be: ---------------------------------------- Tue Dec 12 09:41:00 2003 Tim Evans <t.evans@aranz.com> * gdk/win32/gdkwindow-win32.[ch]: implemented gdk_window_set_icon_list for win32, with support for big and small icons and support for alpha-channel icons under Windows XP. Replaces the previous implementation of gdk_window_set_icon. ----------------------------------------
Created attachment 22227 [details] [review] patch of both gdkwindow-win32.c and gdkwindow-win32.h
Patch applied to gtk-2-2 and HEAD.
*** Bug 116821 has been marked as a duplicate of this bug. ***