diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/backup-restore/backup-restore.c | 8 | ||||
-rw-r--r-- | plugins/backup-restore/org-gnome-backup-restore.eplug.xml | 2 | ||||
-rw-r--r-- | plugins/imap-features/imap-headers.c | 32 | ||||
-rw-r--r-- | plugins/imap-features/org-gnome-imap-features.eplug.xml | 2 |
4 files changed, 21 insertions, 23 deletions
diff --git a/plugins/backup-restore/backup-restore.c b/plugins/backup-restore/backup-restore.c index acef0ae223..1a389703e9 100644 --- a/plugins/backup-restore/backup-restore.c +++ b/plugins/backup-restore/backup-restore.c @@ -52,9 +52,9 @@ gboolean e_plugin_ui_init (GtkUIManager *ui_manager, GtkWidget * backup_restore_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data); void backup_restore_commit (EPlugin *ep, - EMConfigTargetAccount *target); + EMConfigTargetSettings *target); void backup_restore_abort (EPlugin *ep, - EMConfigTargetAccount *target); + EMConfigTargetSettings *target); typedef enum _br_flags { BR_OK = 1 << 0, @@ -434,7 +434,7 @@ backup_restore_page (EPlugin *ep, void backup_restore_commit (EPlugin *ep, - EMConfigTargetAccount *target) + EMConfigTargetSettings *target) { GObject *assistant; gchar *file; @@ -456,7 +456,7 @@ backup_restore_commit (EPlugin *ep, void backup_restore_abort (EPlugin *ep, - EMConfigTargetAccount *target) + EMConfigTargetSettings *target) { /* Nothing really */ } diff --git a/plugins/backup-restore/org-gnome-backup-restore.eplug.xml b/plugins/backup-restore/org-gnome-backup-restore.eplug.xml index 653ad6299f..4899b2dd8a 100644 --- a/plugins/backup-restore/org-gnome-backup-restore.eplug.xml +++ b/plugins/backup-restore/org-gnome-backup-restore.eplug.xml @@ -23,7 +23,7 @@ </hook> <hook class="org.gnome.evolution.mail.config:1.0"> - <group target="account" id="org.gnome.evolution.mail.config.accountWizard" commit="backup_restore_commit" abort="backup_restore_abort"> + <group target="settings" id="org.gnome.evolution.mail.config.accountWizard" commit="backup_restore_commit" abort="backup_restore_abort"> <item type="page" path="0.startup_page.10.backup_restore" factory="backup_restore_page"/> </group> </hook> diff --git a/plugins/imap-features/imap-headers.c b/plugins/imap-features/imap-headers.c index a496106372..f09f880b36 100644 --- a/plugins/imap-features/imap-headers.c +++ b/plugins/imap-features/imap-headers.c @@ -78,18 +78,17 @@ void imap_headers_commit (EPlugin *efp, EConfigHookItemFactoryData *data) { - EMConfigTargetAccount *target_account; + EMConfigTargetSettings *target; CamelFetchHeadersType fetch_headers; - CamelSettings *settings; - EAccount *modified_account; gboolean use_imap = g_getenv ("USE_IMAP") != NULL; + const gchar *protocol; - target_account = (EMConfigTargetAccount *) data->config->target; - modified_account = target_account->modified_account; - settings = target_account->settings; + target = (EMConfigTargetSettings *) data->config->target; + protocol = target->storage_protocol; + + if (g_strcmp0 (protocol, "imap") == 0 || + (use_imap && g_strcmp0 (protocol, "groupwise") == 0)) { - if (g_str_has_prefix (modified_account->source->url, "imap://") || - (use_imap && g_str_has_prefix (modified_account->source->url, "groupwise://"))) { GtkTreeModel *model; GtkTreeIter iter; gint n_children; @@ -123,7 +122,7 @@ imap_headers_commit (EPlugin *efp, fetch_headers = CAMEL_FETCH_HEADERS_BASIC_AND_MAILING_LIST; g_object_set ( - settings, + target->storage_settings, "fetch-headers", fetch_headers, "fetch-headers-extra", strv, NULL); @@ -249,9 +248,7 @@ GtkWidget * org_gnome_imap_headers (EPlugin *epl, EConfigHookItemFactoryData *data) { - EMConfigTargetAccount *target_account; - CamelSettings *settings; - EAccount *account; + EMConfigTargetSettings *target; GtkWidget *vbox; GtkBuilder *builder; GtkWidget *button; @@ -262,19 +259,20 @@ org_gnome_imap_headers (EPlugin *epl, CamelFetchHeadersType fetch_headers = 0; gchar **extra_headers = NULL; gboolean use_imap = g_getenv ("USE_IMAP") != NULL; + const gchar *protocol; guint ii, length = 0; ui = g_new0 (EPImapFeaturesData, 1); - target_account = (EMConfigTargetAccount *) data->config->target; - account = target_account->modified_account; - settings = target_account->settings; + target = (EMConfigTargetSettings *) data->config->target; + protocol = target->storage_protocol; - if (!g_str_has_prefix (account->source->url, "imap://") && !(use_imap && g_str_has_prefix (account->source->url, "groupwise://"))) + if (g_strcmp0 (protocol, "imap") != 0 && + !(use_imap && g_strcmp0 (protocol, "groupwise") == 0)) return NULL; g_object_get ( - settings, + target->storage_settings, "fetch-headers", &fetch_headers, "fetch-headers-extra", &extra_headers, NULL); diff --git a/plugins/imap-features/org-gnome-imap-features.eplug.xml b/plugins/imap-features/org-gnome-imap-features.eplug.xml index fdbfdc78ef..c4d27bddd0 100644 --- a/plugins/imap-features/org-gnome-imap-features.eplug.xml +++ b/plugins/imap-features/org-gnome-imap-features.eplug.xml @@ -8,7 +8,7 @@ <hook class="org.gnome.evolution.mail.config:1.0"> <group id="org.gnome.evolution.mail.config.accountEditor" - target="account" commit = "imap_headers_commit" abort="imap_headers_abort"> + target="settings" commit = "imap_headers_commit" abort="imap_headers_abort"> <item type="page" path="70.IMAP Headers" label="IMAP Headers" factory="org_gnome_imap_headers"/> </group> </hook> |