aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer-hdrs.c
diff options
context:
space:
mode:
Diffstat (limited to 'composer/e-msg-composer-hdrs.c')
-rw-r--r--composer/e-msg-composer-hdrs.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c
index f497f35f85..e6caed6184 100644
--- a/composer/e-msg-composer-hdrs.c
+++ b/composer/e-msg-composer-hdrs.c
@@ -246,12 +246,12 @@ create_from_optionmenu (EMsgComposerHdrs *hdrs)
gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), history);
gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", hdrs);
}
-
+
hbox = gtk_hbox_new (FALSE, 3);
gtk_box_pack_start_defaults (GTK_BOX (hbox), omenu);
gtk_widget_show (omenu);
gtk_widget_show (hbox);
-
+
return hbox;
}
@@ -822,10 +822,16 @@ e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs,
item = l->data;
account = gtk_object_get_data (GTK_OBJECT (item), "account");
- if (i == default_account ||
- (account_name && ((account->name && !strcmp (account_name, account->name))
- || (account->id->address && strstr (account_name, account->id->address))))) {
- /* set the correct optionlist item */
+ if (account_name) {
+ if (account->name && !strcmp (account_name, account->name)) {
+ /* set the correct optionlist item */
+ gtk_option_menu_set_history (omenu, i);
+ gtk_signal_emit_by_name (GTK_OBJECT (item), "activate", hdrs);
+
+ return;
+ }
+ } else if (i == default_account) {
+ /* set the default optionlist item */
gtk_option_menu_set_history (omenu, i);
gtk_signal_emit_by_name (GTK_OBJECT (item), "activate", hdrs);