After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 128762 - implemented gdk_window_set_icon_list for win32
implemented gdk_window_set_icon_list for win32
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.2.x
Other Windows
: Normal normal
: ---
Assigned To: Tor Lillqvist
gtk-bugs
: 116821 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-12-08 00:32 UTC by Tim Evans
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch against gtk+-2.2.4 to fix this bug (12.15 KB, patch)
2003-12-08 00:32 UTC, Tim Evans
none Details | Review
corrected patch, previous patch doesn't compile (12.16 KB, patch)
2003-12-08 00:35 UTC, Tim Evans
none Details | Review
updated patch to remove warnings with empty icon list (12.20 KB, patch)
2003-12-08 03:45 UTC, Tim Evans
none Details | Review
patch of both gdkwindow-win32.c and gdkwindow-win32.h (12.61 KB, patch)
2003-12-08 20:54 UTC, Tim Evans
none Details | Review

Description Tim Evans 2003-12-08 00:32:39 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.
Comment 1 Tim Evans 2003-12-08 00:32:53 UTC
Created attachment 22201 [details] [review]
Patch against gtk+-2.2.4 to fix this bug
Comment 2 Tim Evans 2003-12-08 00:35:43 UTC
Created attachment 22202 [details] [review]
corrected patch, previous patch doesn't compile
Comment 3 Tim Evans 2003-12-08 00:50:24 UTC
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.
Comment 4 Tim Evans 2003-12-08 03:45:46 UTC
Created attachment 22204 [details] [review]
updated patch to remove warnings with empty icon list
Comment 5 Tor Lillqvist 2003-12-08 05:57:43 UTC
Thanks! Could you please also write up a ChangeLog entry?
Comment 6 Tor Lillqvist 2003-12-08 06:00:19 UTC
BTW, you mention you changed GdkWindowImplWin32, but I don't see that 
in the patch?
Comment 7 Tim Evans 2003-12-08 20:53:51 UTC
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.
----------------------------------------
Comment 8 Tim Evans 2003-12-08 20:54:57 UTC
Created attachment 22227 [details] [review]
patch of both gdkwindow-win32.c and gdkwindow-win32.h
Comment 9 Tor Lillqvist 2003-12-14 01:07:10 UTC
Patch applied to gtk-2-2 and HEAD.
Comment 10 Tor Lillqvist 2004-02-01 20:39:37 UTC
*** Bug 116821 has been marked as a duplicate of this bug. ***