soc.2008.themes: d370f990: Fixed some small rendering errors in con...

ffdragon at soc.pidgin.im ffdragon at soc.pidgin.im
Tue Aug 5 22:55:38 EDT 2008


-----------------------------------------------------------------
Revision: d370f99001126b27ce4cf920e66083b8ff7cd629
Ancestor: 0ebb2c5ee87ee44da1b02c556a5def7eb8fbda03
Author: ffdragon at soc.pidgin.im
Date: 2008-08-05T18:51:24
Branch: im.pidgin.soc.2008.themes
URL: http://d.pidgin.im/viewmtn/revision/info/d370f99001126b27ce4cf920e66083b8ff7cd629

Modified files:
        pidgin/gtkblist.c pidgin/gtkprefs.c

ChangeLog: 

Fixed some small rendering errors in conversations and prefs

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	39a0af96a6e9ba8334d55cf0e1f10586a0b06872
+++ pidgin/gtkblist.c	5d6d9f0a1cdee60b18d462274ae34bac29c3487b
@@ -3828,7 +3828,7 @@ pidgin_blist_get_name_markup(PurpleBuddy
 	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 @@ pidgin_blist_get_name_markup(PurpleBuddy
 		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>", 
============================================================
--- pidgin/gtkprefs.c	a34d020aa1e58363f6e5c8e24a03ee94198b3b76
+++ pidgin/gtkprefs.c	0994c396b1e631ad5012d4ef6272906f43cc95a9
@@ -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 @@ prefs_themes_sort(PurpleTheme *theme)
 {
 	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 @@ prefs_themes_sort(PurpleTheme *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; 
 
@@ -648,8 +650,8 @@ prefs_themes_init()
 	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 @@ interface_page(void)
 	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 @@ sound_page(void)
 	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);
 	


More information about the Commits mailing list