changeset 23487:09feece6ecd5

Fixed some small rendering errors in conversations and prefs
author Justin Rodriguez <ffdragon@soc.pidgin.im>
date Tue, 05 Aug 2008 18:51:24 +0000
parents 3baef5c88959
children d93578eb7244
files pidgin/gtkblist.c pidgin/gtkprefs.c
diffstat 2 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Fri Aug 01 22:57:11 2008 +0000
+++ b/pidgin/gtkblist.c	Tue Aug 05 18:51:24 2008 +0000
@@ -3828,7 +3828,7 @@
 	presence = purple_buddy_get_presence(b);
 
 	/* Name is all that is needed */
-	if (biglist || !aliased) {
+	if (!aliased && biglist) {
 
 		/* Status Info */
 		prpl = purple_find_prpl(purple_account_get_protocol_id(b->account));
@@ -3953,13 +3953,13 @@
 		status_font = (pair != NULL && pair->font != NULL) ? pair->font : "";
 	}
 
-	if (selected) {
+	if (!aliased && selected) {
 		name_color = "black";
 		status_color = "black";
 	}
 
 	/* Put it all together */
-	if (biglist && (statustext || idletime)) {
+	if (!aliased && biglist && (statustext || idletime)) {
 		/* using <span size='smaller'> breaks the status, so it must be seperated into <small><span>*/
 		text = g_strdup_printf("<span font_desc='%s' foreground='%s'>%s</span>\n"
 				 	"<small><span font_desc='%s' foreground='%s'>%s%s%s</span></small>", 
--- a/pidgin/gtkprefs.c	Fri Aug 01 22:57:11 2008 +0000
+++ b/pidgin/gtkprefs.c	Tue Aug 05 18:51:24 2008 +0000
@@ -58,6 +58,8 @@
 #define PROXYUSER 2
 #define PROXYPASS 3
 
+#define PREFS_OPTIMAL_ICON_SIZE 32
+
 static int sound_row_sel = 0;
 static GtkWidget *prefsnotebook;
 
@@ -599,14 +601,14 @@
 {
 	GdkPixbuf *pixbuf = NULL;
 	GtkTreeIter iter;
-	gchar *image_full, *markup;
+	gchar *image_full = NULL, *markup;
 	const gchar *name, *author, *description;
 	
 	if (PURPLE_IS_SOUND_THEME(theme)){
 		
 		image_full = purple_theme_get_image_full(theme);
 		if (image_full != NULL){
-			pixbuf = gdk_pixbuf_new_from_file(image_full, NULL);
+			pixbuf = gdk_pixbuf_new_from_file_at_scale(image_full, PREFS_OPTIMAL_ICON_SIZE, PREFS_OPTIMAL_ICON_SIZE, TRUE, NULL);
 			g_free(image_full);
 		} else pixbuf = NULL; 
 
@@ -620,7 +622,7 @@
 
 		image_full = purple_theme_get_image_full(theme);
 		if (image_full != NULL){
-			pixbuf = gdk_pixbuf_new_from_file(image_full, NULL);
+			pixbuf = gdk_pixbuf_new_from_file_at_scale(image_full, PREFS_OPTIMAL_ICON_SIZE, PREFS_OPTIMAL_ICON_SIZE, TRUE, NULL);
 			g_free(image_full);
 		} else pixbuf = NULL; 
 
@@ -648,8 +650,8 @@
 	gchar *filename;
 	GtkTreeIter iter;
 
-	filename = g_build_filename(DATADIR, "icons", "hicolor", "16x16", "apps", "pidgin.png", NULL);
-	pixbuf= gdk_pixbuf_new_from_file(filename, NULL);
+	filename = g_build_filename(DATADIR, "icons", "hicolor", "32x32", "apps", "pidgin.png", NULL);
+	pixbuf = gdk_pixbuf_new_from_file_at_scale(filename, PREFS_OPTIMAL_ICON_SIZE, PREFS_OPTIMAL_ICON_SIZE, TRUE, NULL);
 	g_free(filename);
 
 	/* sound themes */
@@ -1122,6 +1124,7 @@
 	gtk_box_pack_start(GTK_BOX (vbox), combo_box, TRUE, TRUE, 0);
 
 	cell_rend = gtk_cell_renderer_pixbuf_new();
+	gtk_cell_renderer_set_fixed_size(cell_rend, PREFS_OPTIMAL_ICON_SIZE, PREFS_OPTIMAL_ICON_SIZE);
 	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT (combo_box), cell_rend, FALSE);
 	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo_box), cell_rend, "pixbuf", 0, NULL);
 	
@@ -2155,6 +2158,7 @@
 	gtk_box_pack_start(GTK_BOX (vbox), combo_box, FALSE, FALSE, 0);
 
 	cell_rend = gtk_cell_renderer_pixbuf_new();
+	gtk_cell_renderer_set_fixed_size(cell_rend, PREFS_OPTIMAL_ICON_SIZE, PREFS_OPTIMAL_ICON_SIZE);
 	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT (combo_box), cell_rend, FALSE);
 	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo_box), cell_rend, "pixbuf", 0, NULL);