changeset 26784:5987aeb4b0a3

I like icons in my statusbox.
author Paul Aurich <paul@darkrain42.org>
date Sun, 26 Apr 2009 22:54:17 +0000
parents 3c35dcebefe7
children baa23b7a4d42
files pidgin/gtkstatusbox.c
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkstatusbox.c	Sun Apr 26 17:01:05 2009 +0000
+++ b/pidgin/gtkstatusbox.c	Sun Apr 26 22:54:17 2009 +0000
@@ -602,6 +602,18 @@
 	                               );
 }
 
+static GdkPixbuf *
+pidgin_status_box_get_pixbuf(PidginStatusBox *status_box, const char *stock)
+{
+	GdkPixbuf *pixbuf;
+	GtkIconSize icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL);
+
+	pixbuf = gtk_widget_render_icon (GTK_WIDGET(status_box), stock,
+	                                 icon_size, "PidginStatusBox");
+
+	return pixbuf;
+}
+
 /**
  * This updates the text displayed on the status box so that it shows
  * the current status.  This is the only function in this file that
@@ -707,6 +719,7 @@
 	    }
 
 		stock = pidgin_stock_id_from_status_primitive(prim);
+		pixbuf = pidgin_status_box_get_pixbuf(status_box, stock);
 	}
 
 	if (status_box->account != NULL) {
@@ -922,7 +935,6 @@
 		/* Get an appropriate status icon */
 		prim = purple_savedstatus_get_type(saved);
 
-
 		if (purple_savedstatus_is_transient(saved))
 		{
 			/*
@@ -2146,6 +2158,7 @@
 		}
 
 		stock = pidgin_stock_id_from_status_primitive(prim);
+		pixbuf = pidgin_status_box_get_pixbuf(status_box, stock);
 	}
 
 	gtk_list_store_append(status_box->dropdown_store, &iter);