diff options
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 25 |
1 files changed, 12 insertions, 13 deletions
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) { |