diff plugins/docklet/docklet-x11.c @ 6894:c2fb9192377b

[gaim-migrate @ 7441] robot101: instead of blinking between the one with the envelope, and the one without, it's going to blink between blank and the one with the envelope committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Fri, 19 Sep 2003 23:18:40 +0000
parents 8f94cce8faa5
children 395e62cf7bf6
line wrap: on
line diff
--- a/plugins/docklet/docklet-x11.c	Fri Sep 19 15:54:45 2003 +0000
+++ b/plugins/docklet/docklet-x11.c	Fri Sep 19 23:18:40 2003 +0000
@@ -36,6 +36,7 @@
 /* globals */
 static EggTrayIcon *docklet = NULL;
 static GtkWidget *image = NULL;
+static GdkPixbuf *blank_icon = NULL;
 
 /* protos */
 static void docklet_x11_create();
@@ -109,6 +110,20 @@
 }
 
 static void
+docklet_x11_blank_icon()
+{
+	if (!blank_icon) {
+		gint width, height;
+
+		gtk_icon_size_lookup(GTK_ICON_SIZE_LARGE_TOOLBAR, &width, &height);
+		blank_icon = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, width, height);
+		gdk_pixbuf_fill(blank_icon, 0);
+	}
+
+	gtk_image_set_from_pixbuf(GTK_IMAGE(image), blank_icon);
+}
+
+static void
 docklet_x11_destroy()
 {
 	docklet_remove(GTK_WIDGET_VISIBLE(docklet));
@@ -119,6 +134,10 @@
 	g_object_unref(G_OBJECT(docklet));
 	docklet = NULL;
 
+	if (blank_icon)
+		g_object_unref(G_OBJECT(blank_icon));
+	blank_icon = NULL;
+
 	gaim_debug(GAIM_DEBUG_INFO, "tray icon", "destroyed\n");
 }
 
@@ -157,7 +176,8 @@
 {
 	docklet_x11_create,
 	docklet_x11_destroy,
-	docklet_x11_update_icon
+	docklet_x11_update_icon,
+	docklet_x11_blank_icon
 };
 
 void