<URL: http://bugs.freeciv.org/Ticket/Display.html?id=35985 >
> [dmarks - Mi 21. Feb 2007, 12:59:16]:
>
> On 2/21/07, Christian Prochaska <[EMAIL PROTECTED]> wrote:
> >
> > <URL: http://bugs.freeciv.org/Ticket/Display.html?id=35985 >
> >
> > > [dmarks - Di 20. Feb 2007, 23:11:20]:
> > >
> > > BTW, any way of forcing the win32 builds to use the executable's ICO
> > > instead of civicon.png as window manager icon? The Windows window
> > > manager can scale its native format with anti-aliasing, while the
> > > Linux-style window manager icon looks craptacular (no anti-aliasing at
> > > all) whatever you do. You can tell the difference very well, since the
> > > ICO shows up in the taskbar for a second or so while starting up,
> > > before the Freeciv code changes it to the PNG.
> > >
> > > ~Daniel
> > >
> >
> > The attached patch makes sure that the icon of the executable is used in
> > all clients on Windows (this also solves PR#36346).
> >
> >
>
> Nice! Does this affect the icon in the city window too?
>
> ~Daniel
>
No, that was missing. Updated patch attached.
Index: client/gui-gtk-2.0/citydlg.c
===================================================================
--- client/gui-gtk-2.0/citydlg.c (revision 12681)
+++ client/gui-gtk-2.0/citydlg.c (working copy)
@@ -1194,8 +1194,11 @@
gtk_widget_realize(pdialog->shell);
+ /* keep the icon of the executable on Windows (see PR#36491) */
+#ifndef WIN32_NATIVE
gtk_window_set_icon(GTK_WINDOW(pdialog->shell),
sprite_get_pixbuf(get_icon_sprite(tileset, ICON_CITYDLG)));
+#endif
/* Set old size. The size isn't saved in any way. */
if (citydialog_width && citydialog_height) {
Index: client/gui-gtk-2.0/gui_main.c
===================================================================
--- client/gui-gtk-2.0/gui_main.c (revision 12681)
+++ client/gui-gtk-2.0/gui_main.c (working copy)
@@ -1409,9 +1409,12 @@
tileset_load_tiles(tileset);
+ /* keep the icon of the executable on Windows (see PR#36491) */
+#ifndef WIN32_NATIVE
/* Only call this after tileset_load_tiles is called. */
gtk_window_set_icon(GTK_WINDOW(toplevel),
sprite_get_pixbuf(get_icon_sprite(tileset, ICON_FREECIV)));
+#endif
setup_widgets();
load_cursors();
Index: client/gui-gtk-2.0/mapview.c
===================================================================
--- client/gui-gtk-2.0/mapview.c (revision 12681)
+++ client/gui-gtk-2.0/mapview.c (working copy)
@@ -794,6 +794,9 @@
reset_unit_table();
blank_max_unit_size();
+ /* keep the icon of the executable on Windows (see PR#36491) */
+#ifndef WIN32_NATIVE
gtk_window_set_icon(GTK_WINDOW(toplevel),
sprite_get_pixbuf(get_icon_sprite(tileset, ICON_FREECIV)));
+#endif
}
Index: client/gui-win32/gui_stuff.c
===================================================================
--- client/gui-win32/gui_stuff.c (revision 12681)
+++ client/gui-win32/gui_stuff.c (working copy)
@@ -259,7 +259,7 @@
wndclass->cbClsExtra=0;
wndclass->cbWndExtra=0;
wndclass->lpfnWndProc=(WNDPROC) layout_wnd_proc;
- wndclass->hIcon=NULL;
+ wndclass->hIcon=LoadIcon(GetModuleHandle(NULL), "SDL_app");
wndclass->hCursor=LoadCursor(NULL,IDC_ARROW);
wndclass->hInstance=freecivhinst;
wndclass->hbrBackground=CreateSolidBrush(GetSysColor(15));
Index: win32/clienticon.rc
===================================================================
--- win32/clienticon.rc (revision 12681)
+++ win32/clienticon.rc (working copy)
@@ -1,3 +1,4 @@
#include <windows.h>
-client_icon ICON "client.ico"
+/* must be named "SDL_app" to work with the SDL client */
+SDL_app ICON "client.ico"
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev