sadrul.gtkblist-theme: 408c04a7: Fix some assertion failures.

sadrul at pidgin.im sadrul at pidgin.im
Sat Apr 18 19:30:33 EDT 2009


-----------------------------------------------------------------
Revision: 408c04a7b04e850ba1577bcfae598fb5e4135891
Ancestor: 57f070738f2e957ce4d038ccc062933940a72f1b
Author: sadrul at pidgin.im
Date: 2009-04-18T23:21:56
Branch: im.pidgin.sadrul.gtkblist-theme
URL: http://d.pidgin.im/viewmtn/revision/info/408c04a7b04e850ba1577bcfae598fb5e4135891

Modified files:
        pidgin/gtkblist-theme.c pidgin/plugins/themeedit.c

ChangeLog: 

Fix some assertion failures.

-------------- next part --------------
============================================================
--- pidgin/gtkblist-theme.c	780c41dc395f985aa83c249b59ac4d9101671ed8
+++ pidgin/gtkblist-theme.c	2b4bed7a60022ef9316adb8f31b92576e8ab698f
@@ -127,7 +127,8 @@ copy_font_and_color(const PidginThemeFon
 	PidginThemeFont *copy = g_new0(PidginThemeFont, 1);
 	copy->font  = g_strdup(pair->font);
 	strncpy(copy->color, pair->color, sizeof(copy->color) - 1);
-	copy->gdkcolor = gdk_color_copy(pair->gdkcolor);
+	if (pair->gdkcolor)
+		copy->gdkcolor = gdk_color_copy(pair->gdkcolor);
 	return copy;
 }
 
============================================================
--- pidgin/plugins/themeedit.c	731d861f6f186f16a8f3dcdfa1c949c7d9c01ea4
+++ pidgin/plugins/themeedit.c	2c3b1419d2faec40a9d52deac5895e153ab08c64
@@ -130,12 +130,14 @@ theme_color_select(GtkWidget *widget, gp
 	} else {
 		PidginThemeFont *pair = NULL;
 		g_object_get(G_OBJECT(theme), prop, &pair, NULL);
-		color = pidgin_theme_font_get_color(pair);
+		if (pair)
+			color = pidgin_theme_font_get_color(pair);
 	}
 
 	dialog = gtk_color_selection_dialog_new(_("Select Color"));
-	gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(dialog)->colorsel),
-			color);
+	if (color)
+		gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(dialog)->colorsel),
+				color);
 	g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(theme_color_selected),
 			prop);
 
@@ -232,7 +234,7 @@ pidgin_blist_theme_edit(void)
 	};
 
 	dialog = pidgin_create_dialog(_("Pidgin Buddylist Theme Editor"), 0, "theme-editor", FALSE);
-	box = pidgin_dialog_get_vbox(GTK_DIALOG(dialog));
+	box = pidgin_dialog_get_vbox_with_properties(GTK_DIALOG(dialog), FALSE, PIDGIN_HIG_BOX_SPACE);
 
 	theme = pidgin_blist_get_theme();
 	if (!theme) {
@@ -266,6 +268,7 @@ pidgin_blist_theme_edit(void)
 		}
 	}
 
+	gtk_dialog_set_has_separator(GTK_DIALOG(dialog), TRUE);
 	pidgin_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_SAVE, G_CALLBACK(save_blist_theme), dialog);
 	gtk_widget_show_all(dialog);
 


More information about the Commits mailing list