From 2b98861f868e89c7777ff31b131d6a0c2fb8cf71 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 21 May 2002 21:54:58 +0000 Subject: Only clear the text/html signature menus if they are non-NULL. 2002-05-21 Jeffrey Stedfast * mail-account-gui.c (sig_fill_options): Only clear the text/html signature menus if they are non-NULL. svn path=/trunk/; revision=16972 --- mail/ChangeLog | 3 +++ mail/mail-account-gui.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index ed4c07da42..5e63ab9271 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,8 @@ 2002-05-21 Jeffrey Stedfast + * mail-account-gui.c (sig_fill_options): Only clear the text/html + signature menus if they are non-NULL. + * mail-composer-prefs.c (spell_save_values): Use a new macro, STR_EQUAL, to tell if the 2 values are equal or not rather than using strcmp since one or both strings could be NULL. diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index a3a6245133..490b7ea023 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -22,6 +22,7 @@ * */ + #ifdef HAVE_CONFIG_H #include #endif @@ -1206,8 +1207,11 @@ sig_fill_options (MailAccountGui *gui) menu_text = gtk_option_menu_get_menu (GTK_OPTION_MENU (gui->sig_option_text)); menu_html = gtk_option_menu_get_menu (GTK_OPTION_MENU (gui->sig_option_html)); - clear_menu (menu_text); - clear_menu (menu_html); + if (menu_text) + clear_menu (menu_text); + + if (menu_html) + clear_menu (menu_html); gtk_menu_append (GTK_MENU (menu_text), gtk_menu_item_new_with_label (_("None"))); gtk_menu_append (GTK_MENU (menu_html), gtk_menu_item_new_with_label (_("None"))); -- cgit