# HG changeset patch # User Sadrul Habib Chowdhury # Date 1240096916 0 # Node ID e9e253607e3544a571cbc81e1cc965a5b0446510 # Parent 4fca203e33be0d44eddbde8db8a4c36e548bf7a8 Fix some assertion failures. diff -r 4fca203e33be -r e9e253607e35 pidgin/gtkblist-theme.c --- a/pidgin/gtkblist-theme.c Sat Apr 18 18:13:04 2009 +0000 +++ b/pidgin/gtkblist-theme.c Sat Apr 18 23:21:56 2009 +0000 @@ -127,7 +127,8 @@ 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; } diff -r 4fca203e33be -r e9e253607e35 pidgin/plugins/themeedit.c --- a/pidgin/plugins/themeedit.c Sat Apr 18 18:13:04 2009 +0000 +++ b/pidgin/plugins/themeedit.c Sat Apr 18 23:21:56 2009 +0000 @@ -130,12 +130,14 @@ } 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 @@ }; 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 @@ } } + 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);