aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/ChangeLog7
-rw-r--r--composer/e-msg-composer.c25
2 files changed, 19 insertions, 13 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 2cb7b0f989..670bd82651 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,10 @@
+2003-01-16 Jeffrey Stedfast <fejj@ximian.com>
+
+ * e-msg-composer.c (signature_cb): mail_config_get_signature_list
+ now returns a GSList.
+ (setup_signatures_menu): Same.
+ (set_signature_gui): Here too.
+
2003-01-14 Ettore Perazzoli <ettore@ximian.com>
* e-msg-composer.c (do_exit): Make dialog HIG compliant
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index ed41aa5a8c..422abc406a 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1913,7 +1913,7 @@ signature_cb (GtkWidget *w, EMsgComposer *composer)
composer->signature = NULL;
composer->auto_signature = TRUE;
} else {
- composer->signature = g_list_nth_data (mail_config_get_signature_list (), idx - 2);
+ composer->signature = g_slist_nth_data (mail_config_get_signature_list (), idx - 2);
composer->auto_signature = FALSE;
}
if (old_sig != composer->signature || old_auto != composer->auto_signature)
@@ -1981,10 +1981,9 @@ sig_select_item (EMsgComposer *composer)
static void
setup_signatures_menu (EMsgComposer *composer)
{
- GList *l, *list;
- gint len = 0;
GtkWidget *menu;
GtkWidget *mi;
+ GSList *node;
#define ADD(x) \
mi = (x ? gtk_menu_item_new_with_label (x) : gtk_menu_item_new ()); \
@@ -1995,17 +1994,17 @@ setup_signatures_menu (EMsgComposer *composer)
ADD (_("None"));
ADD (_("Autogenerated"));
- list = mail_config_get_signature_list ();
- if (list)
- for (l = list; l; len ++, l = l->next) {
- ADD(((MailConfigSignature *)l->data)->name);
- }
+ node = mail_config_get_signature_list ();
+ while (node != NULL) {
+ ADD (((MailConfigSignature *) node->data)->name);
+ node = node->next;
+ }
#undef ADD
-
+
gtk_widget_show (menu);
gtk_option_menu_set_menu (GTK_OPTION_MENU (composer->sig_omenu), menu);
sig_select_item (composer);
-
+
g_signal_connect (menu, "selection-done", (GCallback)signature_cb, composer);
}
@@ -3359,9 +3358,9 @@ set_signature_gui (EMsgComposer *composer)
str = GNOME_GtkHTML_Editor_Engine_getParagraphData (composer->editor_engine, "signature_name", &ev);
if (ev._major == CORBA_NO_EXCEPTION && str) {
if (!strncmp (str, "name:", 5)) {
- GList *list = NULL;
- gchar *decoded_signature_name = decode_signature_name (str + 5);
-
+ GSList *list = NULL;
+ char *decoded_signature_name = decode_signature_name (str + 5);
+
list = mail_config_get_signature_list ();
if (list && decoded_signature_name)
for (; list; list = list->next) {