# HG changeset patch # User Sean Egan # Date 1173130617 0 # Node ID 79144a15ea786227f07be9fc70b5c7c689868168 # Parent 52ee22ba2cd270092e82411fcfc2f87270367e1c 16px tray icons. These are used if the tray is shorter than 22px, and in Windows where all tray icons are 16x16. I still need to attach to a resizing signal to make them automatically update when the tray resizes. diff -r 52ee22ba2cd2 -r 79144a15ea78 configure.ac --- a/configure.ac Mon Mar 05 01:58:25 2007 +0000 +++ b/configure.ac Mon Mar 05 21:36:57 2007 +0000 @@ -1943,6 +1943,7 @@ pidgin/pixmaps/toolbar/16/Makefile pidgin/pixmaps/toolbar/16/scalable/Makefile pidgin/pixmaps/tray/Makefile + pidgin/pixmaps/tray/16/Makefile pidgin/pixmaps/tray/22/Makefile pidgin/plugins/Makefile pidgin/plugins/cap/Makefile diff -r 52ee22ba2cd2 -r 79144a15ea78 pidgin/gaimstock.c --- a/pidgin/gaimstock.c Mon Mar 05 01:58:25 2007 +0000 +++ b/pidgin/gaimstock.c Mon Mar 05 21:36:57 2007 +0000 @@ -166,13 +166,13 @@ { PIDGIN_STOCK_TOOLBAR_TYPING, "toolbar", "typing.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, { PIDGIN_STOCK_TOOLBAR_PENDING, "status", "message-pending.png", TRUE, FALSE, FALSE, FALSE, FALSE, FALSE }, - { PIDGIN_STOCK_TRAY_AVAILABLE, "tray", "tray-online.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE }, - { PIDGIN_STOCK_TRAY_AWAY, "tray", "tray-away.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE }, - { PIDGIN_STOCK_TRAY_BUSY, "tray", "tray-busy.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE }, - { PIDGIN_STOCK_TRAY_XA, "tray", "tray-extended-away.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE }, - { PIDGIN_STOCK_TRAY_OFFLINE, "tray", "tray-offline.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE }, - { PIDGIN_STOCK_TRAY_CONNECT, "tray", "tray-connecting.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE }, - { PIDGIN_STOCK_TRAY_PENDING, "tray", "tray-message.png", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE } + { PIDGIN_STOCK_TRAY_AVAILABLE, "tray", "tray-online.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, + { PIDGIN_STOCK_TRAY_AWAY, "tray", "tray-away.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, + { PIDGIN_STOCK_TRAY_BUSY, "tray", "tray-busy.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, + { PIDGIN_STOCK_TRAY_XA, "tray", "tray-extended-away.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, + { PIDGIN_STOCK_TRAY_OFFLINE, "tray", "tray-offline.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, + { PIDGIN_STOCK_TRAY_CONNECT, "tray", "tray-connecting.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE }, + { PIDGIN_STOCK_TRAY_PENDING, "tray", "tray-message.png", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE } }; static gchar * diff -r 52ee22ba2cd2 -r 79144a15ea78 pidgin/gtkdocklet-x11.c --- a/pidgin/gtkdocklet-x11.c Mon Mar 05 01:58:25 2007 +0000 +++ b/pidgin/gtkdocklet-x11.c Mon Mar 05 21:36:57 2007 +0000 @@ -115,37 +115,16 @@ break; } - if(icon_name) - gtk_image_set_from_stock(GTK_IMAGE(image), icon_name, gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_SMALL)); - -#if 0 - GdkPixbuf *p; - GdkBitmap *mask = NULL; - - p = gtk_widget_render_icon(GTK_WIDGET(image), icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR, NULL); - - if (p && (gdk_pixbuf_get_colorspace(p) == GDK_COLORSPACE_RGB) && (gdk_pixbuf_get_bits_per_sample(p) == 8) - && (gdk_pixbuf_get_has_alpha(p)) && (gdk_pixbuf_get_n_channels(p) == 4)) { - int len = gdk_pixbuf_get_width(p) * gdk_pixbuf_get_height(p); - guchar *data = gdk_pixbuf_get_pixels(p); - guchar *bitmap = g_malloc((len / 8) + 1); - int i; - - for (i = 0; i < len; i++) - if (data[i*4 + 3] > 55) - bitmap[i/8] |= 1 << i % 8; - else - bitmap[i/8] &= ~(1 << i % 8); - - mask = gdk_bitmap_create_from_data(GDK_DRAWABLE(GTK_WIDGET(image)->window), bitmap, gdk_pixbuf_get_width(p), gdk_pixbuf_get_height(p)); - g_free(bitmap); + if(icon_name) { + int icon_size; + GtkAllocation alloc = GTK_WIDGET(docklet)->allocation; + printf("height: %d\n", alloc.height); + if (alloc.height < 22) + icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL); + else + icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_SMALL); + gtk_image_set_from_stock(GTK_IMAGE(image), icon_name, icon_size); } - - if (mask) - gdk_window_shape_combine_mask(image->window, mask, 0, 0); - - g_object_unref(G_OBJECT(p)); -#endif } static void diff -r 52ee22ba2cd2 -r 79144a15ea78 pidgin/pixmaps/tray/16/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/pixmaps/tray/16/Makefile.am Mon Mar 05 21:36:57 2007 +0000 @@ -0,0 +1,18 @@ +TRAY_ICONS = tray-away.png \ + tray-busy.png \ + tray-connecting.png \ + tray-extended-away.png \ + tray-message.png \ + tray-offline.png \ + tray-online.png + +EXTRA_DIST = tray-away.ico \ + tray-busy.ico \ + tray-connecting.ico \ + tray-extended-away.ico \ + tray-message.ico \ + tray-offline.ico \ + tray-online.ico + +pidgintraypixdir = $(datadir)/pixmaps/pidgin/tray/16 +pidgintraypix_DATA = $(TRAY_ICONS) diff -r 52ee22ba2cd2 -r 79144a15ea78 pidgin/pixmaps/tray/16/Makefile.mingw --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/pixmaps/tray/16/Makefile.mingw Mon Mar 05 21:36:57 2007 +0000 @@ -0,0 +1,20 @@ +# +# Makefile.mingw +# +# Description: Makefile for win32 (mingw) version of Pidgin pixmaps +# + +GAIM_TOP := ../../../.. +include $(GAIM_TOP)/libpurple/win32/global.mak + +datadir = $(GAIM_INSTALL_DIR) +include ./Makefile.am + +.PHONY: install + +install: + if test '$(pidgintraypix_DATA)'; then \ + mkdir -p $(pidgintraypixdir); \ + cp $(pidgintraypix_DATA) $(pidgintraypixdir); \ + fi; + diff -r 52ee22ba2cd2 -r 79144a15ea78 pidgin/pixmaps/tray/16/tray-away.png Binary file pidgin/pixmaps/tray/16/tray-away.png has changed diff -r 52ee22ba2cd2 -r 79144a15ea78 pidgin/pixmaps/tray/16/tray-busy.png Binary file pidgin/pixmaps/tray/16/tray-busy.png has changed diff -r 52ee22ba2cd2 -r 79144a15ea78 pidgin/pixmaps/tray/16/tray-connecting.png Binary file pidgin/pixmaps/tray/16/tray-connecting.png has changed diff -r 52ee22ba2cd2 -r 79144a15ea78 pidgin/pixmaps/tray/16/tray-extended-away.png Binary file pidgin/pixmaps/tray/16/tray-extended-away.png has changed diff -r 52ee22ba2cd2 -r 79144a15ea78 pidgin/pixmaps/tray/16/tray-message.png Binary file pidgin/pixmaps/tray/16/tray-message.png has changed diff -r 52ee22ba2cd2 -r 79144a15ea78 pidgin/pixmaps/tray/16/tray-offline.png Binary file pidgin/pixmaps/tray/16/tray-offline.png has changed diff -r 52ee22ba2cd2 -r 79144a15ea78 pidgin/pixmaps/tray/16/tray-online.png Binary file pidgin/pixmaps/tray/16/tray-online.png has changed diff -r 52ee22ba2cd2 -r 79144a15ea78 pidgin/pixmaps/tray/Makefile.am --- a/pidgin/pixmaps/tray/Makefile.am Mon Mar 05 01:58:25 2007 +0000 +++ b/pidgin/pixmaps/tray/Makefile.am Mon Mar 05 21:36:57 2007 +0000 @@ -1,4 +1,4 @@ -SUBDIRS = 22 +SUBDIRS = 16 22 EXTRA_DIST = \ Makefile.mingw \ diff -r 52ee22ba2cd2 -r 79144a15ea78 pidgin/win32/gtkdocklet-win32.c --- a/pidgin/win32/gtkdocklet-win32.c Mon Mar 05 01:58:25 2007 +0000 +++ b/pidgin/win32/gtkdocklet-win32.c Mon Mar 05 21:36:57 2007 +0000 @@ -443,7 +443,7 @@ static HICON load_hicon_from_stock(const char *stock) { HICON hicon = NULL; GdkPixbuf *pixbuf = gtk_widget_render_icon(image, stock, - gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_SMALL), NULL); + gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL), NULL); if (pixbuf) { hicon = pixbuf_to_hicon(pixbuf);