Return valid transport, only if the account is enabled.

2005-10-22  Parthasarathi Susarla <sparthasarathi@novell.com>

	* mail-config.c: (mail_config_get_default_account):
	Return valid transport, only if the account is enabled.

2005-10-22  Parthasarathi Susarla <sparthasarathi@novell.com>

	* em-composer-utils.c: (create_new_composer):
	If the account corresponding to the fromuri is not enabled.
	Then load the preferred account from the composer.
----------------------------------------------------------------------

svn path=/trunk/; revision=30555
This commit is contained in:
Parthasarathi Susarla
2005-10-22 08:18:50 +00:00
committed by Parthasarathi Susarla
parent a0ce7e9771
commit 05601e86eb
6 changed files with 26 additions and 9 deletions

View File

@ -1,3 +1,14 @@
2005-10-22 Parthasarathi Susarla <sparthasarathi@novell.com>
* mail-config.c: (mail_config_get_default_account):
Return valid transport, only if the account is enabled.
2005-10-22 Parthasarathi Susarla <sparthasarathi@novell.com>
* em-composer-utils.c: (create_new_composer):
If the account corresponding to the fromuri is not enabled.
Then load the preferred account from the composer.
2005-10-21 Jeff Cai <jeff.cai@sun.com>
Reverse previous patch because of bug 319376.
@ -10,11 +21,10 @@
because it will be -1 on linux if being declared one bit of int.
2005-10-19 Philip Van Hoof <pvanhoof@gnome.org>
composer/e-msg-composer-select-file.c,
composer/e-msg-composer.c, composer/e-msg-composer.h,
composer/evolution-composer.c, composer/listener.c,
** See bug 318611
mail/em-composer-utils.c,
plugins/mailing-list-actions/mailing-list-actions.c:
data hiding
2005-10-19 Harish Krishnaswamy <kharish@novell.com>

View File

@ -588,6 +588,13 @@ create_new_composer (const char *subject, const char *fromuri)
if (fromuri)
account = mail_config_get_account_by_source_url(fromuri);
/* If the account corresponding to the fromuri is not enabled.
* We get the preffered account from the composer and use that
* as the account to send the mail.
*/
if (!account)
account = e_msg_composer_get_preferred_account (composer);
e_msg_composer_set_headers (composer, account?account->name:NULL, NULL, NULL, NULL, subject);
em_composer_utils_setup_default_callbacks (composer);

View File

@ -1725,7 +1725,7 @@ emft_get_folder_info__got (struct _mail_msg *mm)
gtk_tree_model_get_iter ((GtkTreeModel *) model, &root, path);
/* if we had an error, then we need to re-set the load subdirs state and collapse the node */
if (camel_exception_is_set(&mm->ex)) {
if (!m->fi && camel_exception_is_set(&mm->ex)) {
gtk_tree_store_set(model, &root, COL_BOOL_LOAD_SUBDIRS, TRUE, -1);
gtk_tree_view_collapse_row (priv->treeview, path);
gtk_tree_path_free (path);

View File

@ -59,7 +59,7 @@ void em_format_html_display_paste (EMFormatHTMLDisplay *efhd);
void em_format_html_display_zoom_in (EMFormatHTMLDisplay *efhd);
void em_format_html_display_zoom_out (EMFormatHTMLDisplay *efhd);
void em_format_html_display_zoom_reset (EMFormatHTMLDisplay *efhd);
EAttachmentBar * em_format_html_display_get_bar (EMFormatHTMLDisplay *efhd);
EAttachmentBar *em_format_html_display_get_bar (EMFormatHTMLDisplay *efhd);
gboolean em_format_html_display_popup_menu (EMFormatHTMLDisplay *efhd);

View File

@ -741,7 +741,7 @@ mail_config_get_default_transport (void)
EIterator *iter;
account = mail_config_get_default_account ();
if (account && account->transport && account->transport->url && account->transport->url[0])
if (account && account->enabled && account->transport && account->transport->url && account->transport->url[0])
return account->transport;
/* return the first account with a transport? */
@ -749,7 +749,7 @@ mail_config_get_default_transport (void)
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
if (account->transport && account->transport->url && account->transport->url[0]) {
if (account->enabled && account->transport && account->transport->url && account->transport->url[0]) {
g_object_unref (iter);
return account->transport;

View File

@ -1073,7 +1073,7 @@ get_folderinfo_got (struct _mail_msg *mm)
{
struct _get_folderinfo_msg *m = (struct _get_folderinfo_msg *)mm;
if (camel_exception_is_set (&mm->ex)) {
if (!m->info && camel_exception_is_set (&mm->ex)) {
char *url;
url = camel_service_get_url (CAMEL_SERVICE (m->store));