[evolution-data-server] Bug 732573 - Preset default Drafts and Sent folders for GOA/UOA accounts
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 732573 - Preset default Drafts and Sent folders for GOA/UOA accounts
- Date: Fri, 6 Mar 2015 06:59:01 +0000 (UTC)
commit cf0b693a6773b2380aaf2a7f9f6dd1a677ad7198
Author: Milan Crha <mcrha redhat com>
Date: Fri Mar 6 07:58:09 2015 +0100
Bug 732573 - Preset default Drafts and Sent folders for GOA/UOA accounts
.../module-gnome-online-accounts.c | 17 +++++++++++++++++
.../module-ubuntu-online-accounts.c | 17 +++++++++++++++++
2 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/modules/gnome-online-accounts/module-gnome-online-accounts.c
b/modules/gnome-online-accounts/module-gnome-online-accounts.c
index a71ec6e..176e63e 100644
--- a/modules/gnome-online-accounts/module-gnome-online-accounts.c
+++ b/modules/gnome-online-accounts/module-gnome-online-accounts.c
@@ -694,7 +694,10 @@ gnome_online_accounts_config_mail_identity (EGnomeOnlineAccounts *extension,
GoaMail *goa_mail;
ESourceExtension *source_extension;
EServerSideSource *server_side_source;
+ ESourceMailSubmission *mail_submission;
+ ESourceMailComposition *mail_composition;
const gchar *extension_name;
+ gchar *tmp;
goa_mail = goa_object_get_mail (goa_object);
/* NULL, when the Mail part is disabled */
@@ -711,6 +714,20 @@ gnome_online_accounts_config_mail_identity (EGnomeOnlineAccounts *extension,
g_object_unref (goa_mail);
+ /* Set default Sent folder to the On This Computer/Sent */
+ mail_submission = e_source_get_extension (source, E_SOURCE_EXTENSION_MAIL_SUBMISSION);
+ tmp = e_source_mail_submission_dup_sent_folder (mail_submission);
+ if (!tmp || !*tmp)
+ e_source_mail_submission_set_sent_folder (mail_submission, "folder://local/Sent");
+ g_free (tmp);
+
+ /* Set default Drafts folder to the On This Computer/Drafts */
+ mail_composition = e_source_get_extension (source, E_SOURCE_EXTENSION_MAIL_COMPOSITION);
+ tmp = e_source_mail_composition_dup_drafts_folder (mail_composition);
+ if (!tmp || !*tmp)
+ e_source_mail_composition_set_drafts_folder (mail_composition, "folder://local/Drafts");
+ g_free (tmp);
+
/* Clients may change the source by may not remove it. */
server_side_source = E_SERVER_SIDE_SOURCE (source);
e_server_side_source_set_writable (server_side_source, TRUE);
diff --git a/modules/ubuntu-online-accounts/module-ubuntu-online-accounts.c
b/modules/ubuntu-online-accounts/module-ubuntu-online-accounts.c
index c785116..8788974 100644
--- a/modules/ubuntu-online-accounts/module-ubuntu-online-accounts.c
+++ b/modules/ubuntu-online-accounts/module-ubuntu-online-accounts.c
@@ -418,6 +418,9 @@ ubuntu_online_accounts_config_mail_identity (EUbuntuOnlineAccounts *extension,
const gchar *email_address)
{
EServerSideSource *server_side_source;
+ ESourceMailSubmission *mail_submission;
+ ESourceMailComposition *mail_composition;
+ gchar *tmp;
if (email_address != NULL) {
ESourceMailIdentity *source_extension;
@@ -428,6 +431,20 @@ ubuntu_online_accounts_config_mail_identity (EUbuntuOnlineAccounts *extension,
source_extension, email_address);
}
+ /* Set default Sent folder to the On This Computer/Sent */
+ mail_submission = e_source_get_extension (source, E_SOURCE_EXTENSION_MAIL_SUBMISSION);
+ tmp = e_source_mail_submission_dup_sent_folder (mail_submission);
+ if (!tmp || !*tmp)
+ e_source_mail_submission_set_sent_folder (mail_submission, "folder://local/Sent");
+ g_free (tmp);
+
+ /* Set default Drafts folder to the On This Computer/Drafts */
+ mail_composition = e_source_get_extension (source, E_SOURCE_EXTENSION_MAIL_COMPOSITION);
+ tmp = e_source_mail_composition_dup_drafts_folder (mail_composition);
+ if (!tmp || !*tmp)
+ e_source_mail_composition_set_drafts_folder (mail_composition, "folder://local/Drafts");
+ g_free (tmp);
+
/* Clients may change the source but may not remove it. */
server_side_source = E_SERVER_SIDE_SOURCE (source);
e_server_side_source_set_writable (server_side_source, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]