summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadrul Habib Chowdhury <sadrul@pidgin.im>2009-04-18 23:21:56 +0000
committerSadrul Habib Chowdhury <sadrul@pidgin.im>2009-04-18 23:21:56 +0000
commit3358bdd35a428ecae990df30e18dd7edddeb5c45 (patch)
treee4b9c813af96b2e472d412eeeab1557adcff71e2
parent2d61455a18153e66dbb3959b8da6d2467d590d5f (diff)
downloadpidgin-3358bdd35a428ecae990df30e18dd7edddeb5c45.tar.gz
Fix some assertion failures.
-rw-r--r--pidgin/gtkblist-theme.c3
-rw-r--r--pidgin/plugins/themeedit.c11
2 files changed, 9 insertions, 5 deletions
diff --git a/pidgin/gtkblist-theme.c b/pidgin/gtkblist-theme.c
index 88f6b1d8cd..586922c881 100644
--- a/pidgin/gtkblist-theme.c
+++ b/pidgin/gtkblist-theme.c
@@ -127,7 +127,8 @@ copy_font_and_color(const PidginThemeFont *pair)
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 --git a/pidgin/plugins/themeedit.c b/pidgin/plugins/themeedit.c
index 518285f0e5..90632d9713 100644
--- a/pidgin/plugins/themeedit.c
+++ b/pidgin/plugins/themeedit.c
@@ -130,12 +130,14 @@ theme_color_select(GtkWidget *widget, gpointer prop)
} 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);