Revision 706fa9e7d7e063f5d2e0ff4a4cf5dea081c8de51
datallah at pidgin.im
datallah at pidgin.im
Thu Apr 5 00:25:49 EDT 2007
o -----------------------------------------------------------------
| Revision: 706fa9e7d7e063f5d2e0ff4a4cf5dea081c8de51
| Ancestor: 89b134a88140fb6702f5621076b6fd306b258c9a
| Author: datallah at pidgin.im
| Date: 2007-04-05T04:25:11
| Branch: im.pidgin.pidgin
|
| Deleted entries:
| pidgin/pixmaps/tray/22/tray-away.ico
| pidgin/pixmaps/tray/22/tray-busy.ico
| pidgin/pixmaps/tray/22/tray-extended-away.ico
| pidgin/pixmaps/tray/22/tray-message.ico
| pidgin/pixmaps/tray/22/tray-offline.ico
| pidgin/pixmaps/tray/22/tray-online.ico
| Added files:
| pidgin/pixmaps/tray/16/available_4bit.ico
| pidgin/pixmaps/tray/16/away_4bit.ico
| pidgin/pixmaps/tray/16/busy_4bit.ico
| pidgin/pixmaps/tray/16/connecting_4bit.ico
| pidgin/pixmaps/tray/16/extended-away_4bit.ico
| pidgin/pixmaps/tray/16/message_4bit.ico
| pidgin/pixmaps/tray/16/offline_4bit.ico
| Modified files:
| pidgin/pixmaps/tray/16/Makefile.am
| pidgin/pixmaps/tray/22/Makefile.am
| pidgin/win32/gtkdocklet-win32.c pidgin/win32/gtkwin32dep.c
| pidgin/win32/gtkwin32dep.h pidgin/win32/pidgin_dll_rc.rc.in
| pidgin/win32/resource.h
|
| ChangeLog:
|
| 4bit icons for windows < XP. These are certainly not as pretty as the originals, but look a lot better than scaled down versions.
|
| ============================================================
| # pidgin/pixmaps/tray/16/available_4bit.ico is binary
| ============================================================
| # pidgin/pixmaps/tray/16/away_4bit.ico is binary
| ============================================================
| # pidgin/pixmaps/tray/16/busy_4bit.ico is binary
| ============================================================
| # pidgin/pixmaps/tray/16/connecting_4bit.ico is binary
| ============================================================
| # pidgin/pixmaps/tray/16/extended-away_4bit.ico is binary
| ============================================================
| # pidgin/pixmaps/tray/16/message_4bit.ico is binary
| ============================================================
| # pidgin/pixmaps/tray/16/offline_4bit.ico is binary
| ============================================================
| --- pidgin/pixmaps/tray/16/Makefile.am e136ba4f826400f2b22b6b994c51dcd8f3048cd2
| +++ pidgin/pixmaps/tray/16/Makefile.am 593835f7e2e20e35ae405c632ba608627bea811e
| @@ -6,7 +6,14 @@ TRAY_ICONS = tray-away.png \
| tray-offline.png \
| tray-online.png
|
| -EXTRA_DIST = $(TRAY_ICONS)
| +EXTRA_DIST = $(TRAY_ICONS) \
| + available_4bit.ico \
| + away_4bit.ico \
| + busy_4bit.ico \
| + connecting_4bit.ico \
| + extended-away_4bit.ico \
| + message_4bit.ico \
| + offline_4bit.ico
|
| pidgintraypixdir = $(datadir)/pixmaps/pidgin/tray/16
| pidgintraypix_DATA = $(TRAY_ICONS)
| ============================================================
| --- pidgin/pixmaps/tray/22/Makefile.am 77e603dad975f631243b9cab59971cc9d766af69
| +++ pidgin/pixmaps/tray/22/Makefile.am 470cb9dee5584d9097fd68dbdeab943733d12117
| @@ -6,14 +6,7 @@ TRAY_ICONS = tray-away.png \
| tray-offline.png \
| tray-online.png
|
| -EXTRA_DIST = $(TRAY_ICONS) \
| - tray-away.ico \
| - tray-busy.ico \
| - tray-extended-away.ico \
| - tray-message.ico \
| - tray-offline.ico \
| - tray-online.ico
| -# tray-connecting.ico
| +EXTRA_DIST = $(TRAY_ICONS)
|
| pidgintraypixdir = $(datadir)/pixmaps/pidgin/tray/22
| pidgintraypix_DATA = $(TRAY_ICONS)
| ============================================================
| --- pidgin/win32/gtkdocklet-win32.c 921b1715317b514e72fe1501cd9e4583c669b5c0
| +++ pidgin/win32/gtkdocklet-win32.c 2760ab14f3342542492d4196e1db69b7fb42430d
| @@ -107,7 +107,7 @@ static HWND systray_create_hiddenwin() {
| wcex.lpfnWndProc = systray_mainmsg_handler;
| wcex.cbClsExtra = 0;
| wcex.cbWndExtra = 0;
| - wcex.hInstance = winpidgin_hinstance();
| + wcex.hInstance = winpidgin_exe_hinstance();
| wcex.hIcon = NULL;
| wcex.hCursor = NULL,
| wcex.hbrBackground = NULL;
| @@ -118,7 +118,7 @@ static HWND systray_create_hiddenwin() {
| RegisterClassEx(&wcex);
|
| /* Create the window */
| - return (CreateWindow(wname, "", 0, 0, 0, 0, 0, GetDesktopWindow(), NULL, winpidgin_hinstance(), 0));
| + return (CreateWindow(wname, "", 0, 0, 0, 0, 0, GetDesktopWindow(), NULL, winpidgin_exe_hinstance(), 0));
| }
|
| static void systray_init_icon(HWND hWnd) {
| @@ -533,6 +533,7 @@ static void winpidgin_tray_create() {
|
|
| static void winpidgin_tray_create() {
| + OSVERSIONINFO osinfo;
| /* dummy window to process systray messages */
| systray_hwnd = systray_create_hiddenwin();
|
| @@ -544,6 +545,32 @@ static void winpidgin_tray_create() {
| gtk_object_sink(GTK_OBJECT(image));
| #endif
|
| + osinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
| + GetVersionEx(&osinfo);
| +
| + /* Load icons, and init systray notify icon
| + * NOTE: Windows < XP only supports displaying 4-bit images in the Systray,
| + * 2K and ME will use the highest color depth that the desktop will support,
| + * but will scale it back to 4-bits for display.
| + * That is why we use custom 4-bit icons for pre XP Windowses */
| + if (osinfo.dwMajorVersion < 5 || (osinfo.dwMajorVersion == 5 && osinfo.dwMinorVersion == 0))
| + {
| + cached_icons[DOCKLET_STATUS_OFFLINE] = (HICON) LoadImage(winpidgin_dll_hinstance(),
| + MAKEINTRESOURCE(PIDGIN_TRAY_OFFLINE_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION);
| + cached_icons[DOCKLET_STATUS_AVAILABLE] = (HICON) LoadImage(winpidgin_dll_hinstance(),
| + MAKEINTRESOURCE(PIDGIN_TRAY_AVAILABLE_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION);
| + cached_icons[DOCKLET_STATUS_AWAY] = (HICON) LoadImage(winpidgin_dll_hinstance(),
| + MAKEINTRESOURCE(PIDGIN_TRAY_AWAY_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION);
| + cached_icons[DOCKLET_STATUS_XA] = (HICON) LoadImage(winpidgin_dll_hinstance(),
| + MAKEINTRESOURCE(PIDGIN_TRAY_XA_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION);
| + cached_icons[DOCKLET_STATUS_BUSY] = (HICON) LoadImage(winpidgin_dll_hinstance(),
| + MAKEINTRESOURCE(PIDGIN_TRAY_BUSY_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION);
| + cached_icons[DOCKLET_STATUS_CONNECTING] = (HICON) LoadImage(winpidgin_dll_hinstance(),
| + MAKEINTRESOURCE(PIDGIN_TRAY_CONNECTING_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION);
| + cached_icons[DOCKLET_STATUS_PENDING] = (HICON) LoadImage(winpidgin_dll_hinstance(),
| + MAKEINTRESOURCE(PIDGIN_TRAY_PENDING_4BIT), IMAGE_ICON, 16, 16, LR_CREATEDIBSECTION);
| + }
| +
| /* Create icon in systray */
| systray_init_icon(systray_hwnd);
|
| ============================================================
| --- pidgin/win32/gtkwin32dep.c 75750947f08f686f863508121accff0c28ad562a
| +++ pidgin/win32/gtkwin32dep.c 933947487af226ce2af1d7e83c3acf50a862d895
| @@ -68,10 +68,14 @@ static LPFNFLASHWINDOWEX MyFlashWindowEx
| * PUBLIC CODE
| */
|
| -HINSTANCE winpidgin_hinstance(void) {
| +HINSTANCE winpidgin_exe_hinstance(void) {
| return exe_hInstance;
| }
|
| +HINSTANCE winpidgin_dll_hinstance(void) {
| + return dll_hInstance;
| +}
| +
| int winpidgin_gz_decompress(const char* in, const char* out) {
| gzFile fin;
| FILE *fout;
| @@ -224,7 +228,7 @@ static HWND winpidgin_message_window_ini
| wcx.lpfnWndProc = message_window_handler;
| wcx.cbClsExtra = 0;
| wcx.cbWndExtra = 0;
| - wcx.hInstance = winpidgin_hinstance();
| + wcx.hInstance = winpidgin_exe_hinstance();
| wcx.hIcon = NULL;
| wcx.hCursor = NULL;
| wcx.hbrBackground = NULL;
| @@ -236,7 +240,7 @@ static HWND winpidgin_message_window_ini
|
| /* Create the window */
| if(!(win_hwnd = CreateWindow(wname, TEXT("WinpidginMsgWin"), 0, 0, 0, 0, 0,
| - NULL, NULL, winpidgin_hinstance(), 0))) {
| + NULL, NULL, winpidgin_exe_hinstance(), 0))) {
| purple_debug_error("winpidgin",
| "Unable to create message window.\n");
| return NULL;
| ============================================================
| --- pidgin/win32/gtkwin32dep.h 29481a4976ba9c9ba8e84a6fbe3860b22e43ff2c
| +++ pidgin/win32/gtkwin32dep.h 89ca374112d12a64e079314de5381605240e51b3
| @@ -26,7 +26,8 @@
| #include <gtk/gtk.h>
| #include "conversation.h"
|
| -HINSTANCE winpidgin_hinstance(void);
| +HINSTANCE winpidgin_dll_hinstance(void);
| +HINSTANCE winpidgin_exe_hinstance(void);
|
| /* Utility */
| int winpidgin_gz_decompress(const char* in, const char* out);
| ============================================================
| --- pidgin/win32/pidgin_dll_rc.rc.in cd24dca73034fb23adce3bd3b3bad9b36a1ff27d
| +++ pidgin/win32/pidgin_dll_rc.rc.in 4b601efa6794be2b5de302ca1e222fe0807f2c45
| @@ -1,6 +1,9 @@
| #include <winver.h>
| #include "version.h"
| +#include "resource.h"
|
| +#define PIXMAPDIR "pixmaps/tray/16/"
| +
| VS_VERSION_INFO VERSIONINFO
| FILEVERSION PURPLE_MAJOR_VERSION,PURPLE_MINOR_VERSION,PURPLE_MICRO_VERSION,0
| PRODUCTVERSION PURPLE_MAJOR_VERSION,PURPLE_MINOR_VERSION,PURPLE_MICRO_VERSION,0
| @@ -30,3 +33,10 @@ VS_VERSION_INFO VERSIONINFO
| END
| END
|
| +PIDGIN_TRAY_AVAILABLE_4BIT ICON PIXMAPDIR "available_4bit.ico"
| +PIDGIN_TRAY_AWAY_4BIT ICON PIXMAPDIR "away_4bit.ico"
| +PIDGIN_TRAY_BUSY_4BIT ICON PIXMAPDIR "busy_4bit.ico"
| +PIDGIN_TRAY_XA_4BIT ICON PIXMAPDIR "extended-away_4bit.ico"
| +PIDGIN_TRAY_OFFLINE_4BIT ICON PIXMAPDIR "offline_4bit.ico"
| +PIDGIN_TRAY_CONNECTING_4BIT ICON PIXMAPDIR "connecting_4bit.ico"
| +PIDGIN_TRAY_PENDING_4BIT ICON PIXMAPDIR "message_4bit.ico"
| ============================================================
| --- pidgin/win32/resource.h a591843c704319f57eecd22433d92ccce9164f49
| +++ pidgin/win32/resource.h 95a3ff807a837dd4ae1435e7527bd24cf93adac1
| @@ -1 +1,8 @@
| -#define PURPLE_ICON 104
| +#define PIDGIN_ICON 104
| +#define PIDGIN_TRAY_AVAILABLE_4BIT 105
| +#define PIDGIN_TRAY_AWAY_4BIT 106
| +#define PIDGIN_TRAY_BUSY_4BIT 107
| +#define PIDGIN_TRAY_XA_4BIT 108
| +#define PIDGIN_TRAY_OFFLINE_4BIT 109
| +#define PIDGIN_TRAY_CONNECTING_4BIT 110
| +#define PIDGIN_TRAY_PENDING_4BIT 111
To get the patch for this revision, please do this:
mtn log --last 1 --diffs --from 706fa9e7d7e063f5d2e0ff4a4cf5dea081c8de51
More information about the Commits
mailing list