diff pidgin/gtkdocklet-x11.c @ 18684:5c1ed6296b56

propagate from branch 'im.pidgin.pidgin' (head b195e262642015df66e36d33e9dd16ecae5df9d5) to branch 'im.pidgin.soc.2007.xmpp' (head 06f9dbd73b69e26dc9f56873a9ce106146bb1b18)
author Andreas Monitzer <pidgin@monitzer.com>
date Wed, 11 Jul 2007 22:27:44 +0000
parents 474283509a2a
children 44b4e8bd759b
line wrap: on
line diff
--- a/pidgin/gtkdocklet-x11.c	Wed Jul 11 15:59:09 2007 +0000
+++ b/pidgin/gtkdocklet-x11.c	Wed Jul 11 22:27:44 2007 +0000
@@ -125,8 +125,12 @@
 		int icon_size;
 		if (docklet_height < 22)
 			icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL);
+		else if (docklet_height < 32)
+			icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_SMALL);
+		else if (docklet_height < 48)
+			icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_MEDIUM);
 		else
-			icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_SMALL);
+			icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_LARGE);
 
 		gtk_image_set_from_stock(GTK_IMAGE(image), icon_name, icon_size);
 	}
@@ -135,9 +139,9 @@
 static void
 docklet_x11_resize_icon(GtkWidget *widget)
 {
-	if (docklet_height == widget->allocation.height)
+	if (docklet_height == MIN(widget->allocation.height, widget->allocation.width))
 		return;
-	docklet_height = widget->allocation.height;
+	docklet_height = MIN(widget->allocation.height, widget->allocation.width);
 	pidgin_docklet_update_icon();
 }
 
@@ -281,7 +285,7 @@
 	 * The x11 docklet tracks whether it successfully embedded in a pref and
 	 * allows for a longer timeout period if it successfully embedded the last
 	 * time it was run. This should hopefully solve problems with the buddy
-	 * list not properly starting hidden when gaim is started on login.
+	 * list not properly starting hidden when Pidgin is started on login.
 	 */
 	if(!recreate) {
 		pidgin_docklet_embedded();