diff src/gtkpounce.c @ 13090:0aa231ebbfd5

[gaim-migrate @ 15452] Changes to some pixbuf stuff. I added a 'gaim_gtk_create_gaim_icon_with_status()' function to util.c, and changed 'gaim_gtk_create_prpl_icon_with_status()' to accept a scale factor because almost everywhere this function was used we would scale the pixbuf to a smaller size as soon as we got it. So there's a bit less code duplication. Also, I think I added some g_object_unref()'s in one or two places where it was missing. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 01 Feb 2006 22:38:34 +0000
parents 69b3d5cbd2b1
children e1e5462b7d81
line wrap: on
line diff
--- a/src/gtkpounce.c	Wed Feb 01 06:07:53 2006 +0000
+++ b/src/gtkpounce.c	Wed Feb 01 22:38:34 2006 +0000
@@ -185,7 +185,7 @@
 	gboolean recurring;
 	const char *pouncer;
 	const char *pouncee;
-	GdkPixbuf *pixbuf, *scale = NULL;
+	GdkPixbuf *pixbuf;
 
 	account = gaim_pounce_get_pouncer(pounce);
 
@@ -194,11 +194,7 @@
 
 	events = gaim_pounce_get_events(pounce);
 
-	pixbuf = gaim_gtk_create_prpl_icon(account);
-
-	if (pixbuf != NULL)
-		scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16,
-										GDK_INTERP_BILINEAR);
+	pixbuf = gaim_gtk_create_prpl_icon(account, 0.5);
 
 	pouncer = gaim_account_get_username(account);
 	pouncee = gaim_pounce_get_pouncee(pounce);
@@ -207,11 +203,14 @@
 	gtk_list_store_append(model, &iter);
 	gtk_list_store_set(model, &iter,
 					   POUNCES_MANAGER_COLUMN_POUNCE, pounce,
-					   POUNCES_MANAGER_COLUMN_ICON, scale,
+					   POUNCES_MANAGER_COLUMN_ICON, pixbuf,
 					   POUNCES_MANAGER_COLUMN_TARGET, pouncee,
 					   POUNCES_MANAGER_COLUMN_ACCOUNT, pouncer,
 					   POUNCES_MANAGER_COLUMN_RECURRING, recurring,
 					   -1);
+
+	if (pixbuf != NULL)
+		g_object_unref(pixbuf);
 }
 
 static void