pidgin: cc7bd801: I like icons in my statusbox.

darkrain42 at pidgin.im darkrain42 at pidgin.im
Sun Apr 26 19:00:51 EDT 2009


-----------------------------------------------------------------
Revision: cc7bd8014e5aad2cfee2243816c1dbb53f7cd888
Ancestor: 371b6104658ad98c418ac711643192c2e34428ea
Author: darkrain42 at pidgin.im
Date: 2009-04-26T22:54:17
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/cc7bd8014e5aad2cfee2243816c1dbb53f7cd888

Modified files:
        pidgin/gtkstatusbox.c

ChangeLog: 

I like icons in my statusbox.

-------------- next part --------------
============================================================
--- pidgin/gtkstatusbox.c	e1dd3b9bae367d95014264456bf09e261f54991c
+++ pidgin/gtkstatusbox.c	d7467a27dcbb73ac551dee71957bf8759bc60284
@@ -602,6 +602,18 @@ pidgin_status_box_class_init (PidginStat
 	                               );
 }
 
+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 @@ pidgin_status_box_refresh(PidginStatusBo
 	    }
 
 		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 @@ add_popular_statuses(PidginStatusBox *st
 		/* Get an appropriate status icon */
 		prim = purple_savedstatus_get_type(saved);
 
-
 		if (purple_savedstatus_is_transient(saved))
 		{
 			/*
@@ -2146,6 +2158,7 @@ pidgin_status_box_add(PidginStatusBox *s
 		}
 
 		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);


More information about the Commits mailing list