From c1e091c761ca5f673831d4547db80b1ba1c59399 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 22 Mar 2007 15:37:50 +0000 Subject: Fixed problems with window icon on Windows as much as possible. --- ChangeLog | 3 +++ data/icons/CMakeLists.txt | 4 +--- data/icons/Makefile.am | 5 +---- data/icons/tmw-32x32.png | Bin 0 -> 2228 bytes src/main.cpp | 4 +++- tmw.cbp | 22 ++++++++++++++++------ 6 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 data/icons/tmw-32x32.png diff --git a/ChangeLog b/ChangeLog index 8609f63f..c0cb7052 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,9 @@ registration. Fixed a crash caused by deleting an OkDialog twice (it also deletes itself). Made the register dialog a bit wider. Register dialog no longer clears username field when it is invalid. + * src/main.cpp, data/icons/CMakeLists.txt, data/icons/Makefile.am, + data/icons/tmw-32x32.png: Use a 32x32 non-alpha layered window icon. + * tmw.cbp: Updated project file. 2007-03-21 Bjørn Lindeijer diff --git a/data/icons/CMakeLists.txt b/data/icons/CMakeLists.txt index 009ed32e..60bfc921 100644 --- a/data/icons/CMakeLists.txt +++ b/data/icons/CMakeLists.txt @@ -1,7 +1,5 @@ SET(FILES - tmw.ico - tmw.png - tmw.xpm + tmw-32x32.png ) INSTALL(FILES ${FILES} DESTINATION ${DATA_DIR}/icons) diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am index 9697a363..3354d7ff 100644 --- a/data/icons/Makefile.am +++ b/data/icons/Makefile.am @@ -1,10 +1,7 @@ iconsdir = $(pkgdatadir)/data/icons -icons_DATA = \ - tmw.ico \ - tmw.png \ - tmw.xpm +icons_DATA = tmw-32x32.png install-data-local: $(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps diff --git a/data/icons/tmw-32x32.png b/data/icons/tmw-32x32.png new file mode 100644 index 00000000..af9ad35c Binary files /dev/null and b/data/icons/tmw-32x32.png differ diff --git a/src/main.cpp b/src/main.cpp index 88a862e0..810dc758 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -257,7 +257,9 @@ void init_engine(const Options &options) } SDL_WM_SetCaption("The Mana World", NULL); - SDL_WM_SetIcon(IMG_Load(TMW_DATADIR "data/icons/tmw.png"), NULL); + SDL_Surface *icon = IMG_Load(TMW_DATADIR "data/icons/tmw-32x32.png"); + SDL_SetAlpha(icon, SDL_SRCALPHA, SDL_ALPHA_OPAQUE); + SDL_WM_SetIcon(icon, NULL); #ifdef USE_OPENGL bool useOpenGL = (config.getValue("opengl", 0) == 1); diff --git a/tmw.cbp b/tmw.cbp index a8c2b798..f03cce59 100644 --- a/tmw.cbp +++ b/tmw.cbp @@ -1109,6 +1109,16 @@