From f64614f29cbda928a873f38bb506b05cd49e3924 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 6 Jun 2002 19:19:43 +0000 Subject: Remove the customize toolbar thingy since Michael said that this would fix 2002-06-06 Jeffrey Stedfast * e-msg-composer.c (setup_ui): Remove the customize toolbar thingy since Michael said that this would fix bug #17952. * e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_from_account): Clean up the logic in this. For one, we don't need to do strstr using the account address (wtf??). svn path=/trunk/; revision=17134 --- composer/e-msg-composer-hdrs.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'composer/e-msg-composer-hdrs.c') 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); -- cgit