diff plugins/gevolution/gevolution.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 248b8b39c671
children
line wrap: on
line diff
--- a/plugins/gevolution/gevolution.c	Wed Feb 01 06:07:53 2006 +0000
+++ b/plugins/gevolution/gevolution.c	Wed Feb 01 22:38:34 2006 +0000
@@ -405,7 +405,7 @@
 	GtkWidget *treeview;
 	GtkTreeViewColumn *column;
 	GtkCellRenderer *renderer;
-	GdkPixbuf *pixbuf, *scale = NULL;
+	GdkPixbuf *pixbuf;
 	GtkListStore *model;
 	GList *l;
 
@@ -483,29 +483,22 @@
 
 		gtk_list_store_append(model, &iter);
 
-		pixbuf = gaim_gtk_create_prpl_icon(account);
-
-		if (pixbuf != NULL)
-		{
-			scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16,
-											GDK_INTERP_BILINEAR);
-
-			if (!gaim_account_is_connected(account))
-				gdk_pixbuf_saturate_and_pixelate(scale, scale, 0.0, FALSE);
-		}
+		pixbuf = gaim_gtk_create_prpl_icon(account, 0.5);
+		if ((pixbuf != NULL) && (!gaim_account_is_connected(account)))
+			gdk_pixbuf_saturate_and_pixelate(pixbuf, pixbuf, 0.0, FALSE);
 
 		gtk_list_store_set(model, &iter,
 						   COLUMN_AUTOADD,
 						   gaim_account_get_bool(account, "gevo-autoadd",
 												 FALSE),
-						   COLUMN_ICON, scale,
+						   COLUMN_ICON, pixbuf,
 						   COLUMN_SCREENNAME,
 						   gaim_account_get_username(account),
 						   COLUMN_DATA, account,
 						   -1);
 
-		if (pixbuf != NULL) g_object_unref(G_OBJECT(pixbuf));
-		if (scale  != NULL) g_object_unref(G_OBJECT(scale));
+		if (pixbuf != NULL)
+			g_object_unref(G_OBJECT(pixbuf));
 	}
 
 	gtk_widget_show_all(ret);