+ for (list = compose->header_list; list; list = list->next) {
+ ComposeHeaderEntry *hentry=(ComposeHeaderEntry *)list->data;
+
+ if (hentry->type == PREF_ACCOUNT || !list->next) {
+ compose_destroy_headerentry(hentry);
+ continue;
+ }
+
+ state = g_malloc0(sizeof(HeaderEntryState));
+ state->header = combobox_get_active_data(
+ GTK_COMBO_BOX(hentry->combo));
+ state->entry = gtk_editable_get_chars(
+ GTK_EDITABLE(hentry->entry), 0, -1);
+ state->type = hentry->type;
+
+ if (!color_set) {
+ gdk_color_parse("#f5f6be", &yellow);
+ color_set = gdk_colormap_alloc_color(
+ gdk_colormap_get_system(),
+ &yellow, FALSE, TRUE);
+ }
+
+ style = gtk_widget_get_modifier_style(hentry->entry);
+ state->entry_marked = gdk_color_equal(&yellow,
+ &style->base[GTK_STATE_NORMAL]);
+
+ saved_list = g_slist_append(saved_list, state);
+ compose_destroy_headerentry(hentry);
+ }
+
+ compose->header_last = NULL;
+ g_slist_free(compose->header_list);
+ compose->header_list = NULL;
+ compose->header_nextrow = 1;
+ compose_create_header_entry(compose);
+
+ if (ac->set_autocc && ac->auto_cc)
+ compose_entry_append(compose, ac->auto_cc,
+ COMPOSE_CC, PREF_ACCOUNT);
+
+ if (ac->set_autobcc && ac->auto_bcc)
+ compose_entry_append(compose, ac->auto_bcc,
+ COMPOSE_BCC, PREF_ACCOUNT);
+
+ if (ac->set_autoreplyto && ac->auto_replyto)
+ compose_entry_append(compose, ac->auto_replyto,
+ COMPOSE_REPLYTO, PREF_ACCOUNT);
+
+ for (list = saved_list; list; list = list->next) {
+ state = (HeaderEntryState *) list->data;
+
+ compose_entry_append(compose, state->entry,
+ state->header, state->type);
+ if (state->entry_marked)
+ compose_entry_mark_default_to(compose, state->entry);
+
+ g_free(state->entry);
+ }
+ g_slist_free(saved_list);
+
+ combobox_select_by_data(GTK_COMBO_BOX(compose->header_last->combo),
+ (ac->protocol == A_NNTP) ?
+ COMPOSE_NEWSGROUPS : COMPOSE_TO);
+ }
+