diff options
author | Jason Leach <jleach@ximian.com> | 2001-07-19 09:25:35 +0800 |
---|---|---|
committer | Jacob Leach <jleach@src.gnome.org> | 2001-07-19 09:25:35 +0800 |
commit | fbc89c9d81653b782438c55b0e5259c5524759de (patch) | |
tree | fad71b836be284d95065bdefe40abbca7c1d1d08 /composer | |
parent | c87ef1f0a3302d89aacafcff22de49e442c18dc4 (diff) | |
download | gsoc2013-evolution-fbc89c9d81653b782438c55b0e5259c5524759de.tar gsoc2013-evolution-fbc89c9d81653b782438c55b0e5259c5524759de.tar.gz gsoc2013-evolution-fbc89c9d81653b782438c55b0e5259c5524759de.tar.bz2 gsoc2013-evolution-fbc89c9d81653b782438c55b0e5259c5524759de.tar.lz gsoc2013-evolution-fbc89c9d81653b782438c55b0e5259c5524759de.tar.xz gsoc2013-evolution-fbc89c9d81653b782438c55b0e5259c5524759de.tar.zst gsoc2013-evolution-fbc89c9d81653b782438c55b0e5259c5524759de.zip |
Update to the new way of finding the default account.
2001-07-18 Jason Leach <jleach@ximian.com>
* e-msg-composer-hdrs.c (create_from_optionmenu): Update to the
new way of finding the default account.
svn path=/trunk/; revision=11219
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 5 | ||||
-rw-r--r-- | composer/e-msg-composer-hdrs.c | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 0af11d69eb..5ac58d046d 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,8 @@ +2001-07-18 Jason Leach <jleach@ximian.com> + + * e-msg-composer-hdrs.c (create_from_optionmenu): Update to the + new way of finding the default account. + 2001-07-18 Iain Holmes <iain@ximian.com> * e-msg-composer.c (do_exit): Use a messagebox. diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c index b21f7ca323..f27f32fe2d 100644 --- a/composer/e-msg-composer-hdrs.c +++ b/composer/e-msg-composer-hdrs.c @@ -183,10 +183,13 @@ create_from_optionmenu (EMsgComposerHdrs *hdrs) const GSList *accounts; GtkWidget *item; int i = 0, history = 0; + int default_account; omenu = gtk_option_menu_new (); menu = gtk_menu_new (); - + + default_account = mail_config_get_default_account_num (); + accounts = mail_config_get_accounts (); while (accounts) { const MailConfigAccount *account; @@ -217,7 +220,7 @@ create_from_optionmenu (EMsgComposerHdrs *hdrs) gtk_signal_connect (GTK_OBJECT (item), "activate", GTK_SIGNAL_FUNC (from_changed), hdrs); - if (account->default_account) { + if (i == default_account) { first = item; history = i; } @@ -733,12 +736,15 @@ e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs, GtkWidget *item; GSList *l; int i = 0; + int default_account = 0; g_return_if_fail (hdrs != NULL); g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs)); omenu = GTK_OPTION_MENU (hdrs->priv->from.entry); + default_account = mail_config_get_default_account_num (); + /* find the item that represents the account and activate it */ l = hdrs->priv->from_options; while (l) { @@ -747,7 +753,7 @@ e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs, account = gtk_object_get_data (GTK_OBJECT (item), "account"); if ((account_name && !strcmp (account_name, account->name)) || - (!account_name && account->default_account)) { + (!account_name && i == default_account)) { /* set the correct optionlist item */ gtk_option_menu_set_history (omenu, i); gtk_signal_emit_by_name (GTK_OBJECT (item), "activate", hdrs); |