[evolution/wip/camel-more-gobject] Seal CamelStore properties
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/camel-more-gobject] Seal CamelStore properties
- Date: Tue, 1 Nov 2016 22:10:26 +0000 (UTC)
commit 047a85957c2470fa61f5737abd865ef3d013584b
Author: Milan Crha <mcrha redhat com>
Date: Tue Nov 1 23:10:27 2016 +0100
Seal CamelStore properties
src/libemail-engine/e-mail-folder-utils.c | 2 +-
src/libemail-engine/mail-folder-cache.c | 18 +++++++++---------
src/libemail-engine/mail-vfolder.c | 4 ++--
src/mail/e-mail-config-defaults-page.c | 2 +-
src/mail/e-mail-folder-create-dialog.c | 2 +-
src/mail/e-mail-reader.c | 2 +-
src/mail/em-folder-properties.c | 4 ++--
src/mail/message-list.c | 10 +++++-----
8 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/src/libemail-engine/e-mail-folder-utils.c b/src/libemail-engine/e-mail-folder-utils.c
index e1ca6d8..5f96387 100644
--- a/src/libemail-engine/e-mail-folder-utils.c
+++ b/src/libemail-engine/e-mail-folder-utils.c
@@ -1158,7 +1158,7 @@ e_mail_folder_remove_sync (CamelFolder *folder,
transparent_cancellable, NULL);
}
- if ((parent_store->flags & CAMEL_STORE_CAN_DELETE_FOLDERS_AT_ONCE) != 0) {
+ if ((camel_store_get_flags (parent_store) & CAMEL_STORE_CAN_DELETE_FOLDERS_AT_ONCE) != 0) {
success = camel_store_delete_folder_sync (
parent_store, full_name, transparent_cancellable, error);
} else {
diff --git a/src/libemail-engine/mail-folder-cache.c b/src/libemail-engine/mail-folder-cache.c
index b18d9bb..5c68cf2 100644
--- a/src/libemail-engine/mail-folder-cache.c
+++ b/src/libemail-engine/mail-folder-cache.c
@@ -271,10 +271,10 @@ store_info_new (CamelStore *store)
/* If these are vfolders then they need to be opened
* now, otherwise they won't keep track of all folders. */
- if (store->flags & CAMEL_STORE_VJUNK)
+ if (camel_store_get_flags (store) & CAMEL_STORE_VJUNK)
store_info->vjunk = camel_store_get_junk_folder_sync (
store, NULL, NULL);
- if (store->flags & CAMEL_STORE_VTRASH)
+ if (camel_store_get_flags (store) & CAMEL_STORE_VTRASH)
store_info->vtrash = camel_store_get_trash_folder_sync (
store, NULL, NULL);
@@ -1441,12 +1441,12 @@ mail_folder_cache_folder_available (MailFolderCache *cache,
return;
/* Disregard virtual Junk folders. */
- if (store->flags & CAMEL_STORE_VJUNK)
+ if (camel_store_get_flags (store) & CAMEL_STORE_VJUNK)
if (g_strcmp0 (folder_name, CAMEL_VJUNK_NAME) == 0)
return;
/* Disregard virtual Trash folders. */
- if (store->flags & CAMEL_STORE_VTRASH)
+ if (camel_store_get_flags (store) & CAMEL_STORE_VTRASH)
if (g_strcmp0 (folder_name, CAMEL_VTRASH_NAME) == 0)
return;
@@ -1491,12 +1491,12 @@ mail_folder_cache_folder_unavailable (MailFolderCache *cache,
return;
/* Disregard virtual Junk folders. */
- if (store->flags & CAMEL_STORE_VJUNK)
+ if (camel_store_get_flags (store) & CAMEL_STORE_VJUNK)
if (g_strcmp0 (folder_name, CAMEL_VJUNK_NAME) == 0)
return;
/* Disregard virtual Trash folders. */
- if (store->flags & CAMEL_STORE_VTRASH)
+ if (camel_store_get_flags (store) & CAMEL_STORE_VTRASH)
if (g_strcmp0 (folder_name, CAMEL_VTRASH_NAME) == 0)
return;
@@ -1543,12 +1543,12 @@ mail_folder_cache_folder_deleted (MailFolderCache *cache,
return;
/* Disregard virtual Junk folders. */
- if (store->flags & CAMEL_STORE_VJUNK)
+ if (camel_store_get_flags (store) & CAMEL_STORE_VJUNK)
if (g_strcmp0 (folder_name, CAMEL_VJUNK_NAME) == 0)
return;
/* Disregard virtual Trash folders. */
- if (store->flags & CAMEL_STORE_VTRASH)
+ if (camel_store_get_flags (store) & CAMEL_STORE_VTRASH)
if (g_strcmp0 (folder_name, CAMEL_VTRASH_NAME) == 0)
return;
@@ -1908,7 +1908,7 @@ mail_folder_cache_maybe_run_initial_setup_sync (CamelService *service,
/* The store doesn't support the function, thus silently pretend success.
Still update the ESource flag, in case the store would implement
the function in the future. */
- if (!(store->flags & CAMEL_STORE_SUPPORTS_INITIAL_SETUP))
+ if (!(camel_store_get_flags (store) & CAMEL_STORE_SUPPORTS_INITIAL_SETUP))
success = TRUE;
else
success = camel_store_initial_setup_sync (store, &save_setup, cancellable,
error);
diff --git a/src/libemail-engine/mail-vfolder.c b/src/libemail-engine/mail-vfolder.c
index eadd318..2e15c1c 100644
--- a/src/libemail-engine/mail-vfolder.c
+++ b/src/libemail-engine/mail-vfolder.c
@@ -414,11 +414,11 @@ folder_is_spethal (CamelStore *store,
/* This is a bit of a hack, but really the only way it can be done
* at the moment. */
- if (store->flags & CAMEL_STORE_VTRASH)
+ if (camel_store_get_flags (store) & CAMEL_STORE_VTRASH)
if (g_strcmp0 (folder_name, CAMEL_VTRASH_NAME) == 0)
return TRUE;
- if (store->flags & CAMEL_STORE_VJUNK)
+ if (camel_store_get_flags (store) & CAMEL_STORE_VJUNK)
if (g_strcmp0 (folder_name, CAMEL_VJUNK_NAME) == 0)
return TRUE;
diff --git a/src/mail/e-mail-config-defaults-page.c b/src/mail/e-mail-config-defaults-page.c
index ed33f85..c9f0842 100644
--- a/src/mail/e-mail-config-defaults-page.c
+++ b/src/mail/e-mail-config-defaults-page.c
@@ -978,7 +978,7 @@ mail_config_defaults_page_constructed (GObject *object)
service = camel_session_ref_service (CAMEL_SESSION (session), e_source_get_uid
(page->priv->original_source));
if (service && CAMEL_IS_STORE (service) &&
- (CAMEL_STORE (service)->flags & CAMEL_STORE_SUPPORTS_INITIAL_SETUP) != 0) {
+ (camel_store_get_flags (CAMEL_STORE (service)) & CAMEL_STORE_SUPPORTS_INITIAL_SETUP) !=
0) {
widget = gtk_button_new_with_mnemonic (_("_Lookup Folders"));
gtk_widget_set_halign (widget, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
diff --git a/src/mail/e-mail-folder-create-dialog.c b/src/mail/e-mail-folder-create-dialog.c
index 9d32b54..53f0891 100644
--- a/src/mail/e-mail-folder-create-dialog.c
+++ b/src/mail/e-mail-folder-create-dialog.c
@@ -315,7 +315,7 @@ mail_folder_create_dialog_constructed (GObject *object)
service = g_queue_pop_head (&queue);
g_warn_if_fail (CAMEL_IS_STORE (service));
- flags = CAMEL_STORE (service)->flags;
+ flags = camel_store_get_flags (CAMEL_STORE (service));
if ((flags & CAMEL_STORE_CAN_EDIT_FOLDERS) == 0)
continue;
diff --git a/src/mail/e-mail-reader.c b/src/mail/e-mail-reader.c
index a186f99..d99ef32 100644
--- a/src/mail/e-mail-reader.c
+++ b/src/mail/e-mail-reader.c
@@ -4546,7 +4546,7 @@ e_mail_reader_check_state (EMailReader *reader)
store = camel_folder_get_parent_store (folder);
is_junk_folder =
(folder->folder_flags & CAMEL_FOLDER_IS_JUNK) != 0;
- is_vtrash_folder = (store->flags & CAMEL_STORE_VTRASH) != 0 && (folder->folder_flags &
CAMEL_FOLDER_IS_TRASH) != 0;
+ is_vtrash_folder = (camel_store_get_flags (store) & CAMEL_STORE_VTRASH) != 0 &&
(folder->folder_flags & CAMEL_FOLDER_IS_TRASH) != 0;
drafts_or_outbox =
em_utils_folder_is_drafts (registry, folder) ||
em_utils_folder_is_outbox (registry, folder);
diff --git a/src/mail/em-folder-properties.c b/src/mail/em-folder-properties.c
index d267b05..e63205d 100644
--- a/src/mail/em-folder-properties.c
+++ b/src/mail/em-folder-properties.c
@@ -739,7 +739,7 @@ emfp_dialog_run (AsyncContext *context)
/*
* Do the calculation only for those accounts that support VTRASHes
*/
- if (parent_store->flags & CAMEL_STORE_VTRASH) {
+ if (camel_store_get_flags (parent_store) & CAMEL_STORE_VTRASH) {
if (CAMEL_IS_VTRASH_FOLDER (context->folder))
context->total += deleted;
else if (!hide_deleted && deleted > 0)
@@ -749,7 +749,7 @@ emfp_dialog_run (AsyncContext *context)
/*
* If the folder is junk folder, get total number of mails.
*/
- if (parent_store->flags & CAMEL_STORE_VJUNK)
+ if (camel_store_get_flags (parent_store) & CAMEL_STORE_VJUNK)
context->total = camel_folder_summary_count (
context->folder->summary);
diff --git a/src/mail/message-list.c b/src/mail/message-list.c
index 8e88dc2..5a4822b 100644
--- a/src/mail/message-list.c
+++ b/src/mail/message-list.c
@@ -3905,10 +3905,10 @@ folder_store_supports_vjunk_folder (CamelFolder *folder)
if (CAMEL_IS_VEE_FOLDER (folder))
return TRUE;
- if (store->flags & CAMEL_STORE_VJUNK)
+ if (camel_store_get_flags (store) & CAMEL_STORE_VJUNK)
return TRUE;
- if (store->flags & CAMEL_STORE_REAL_JUNK_FOLDER)
+ if (camel_store_get_flags (store) & CAMEL_STORE_REAL_JUNK_FOLDER)
return TRUE;
return FALSE;
@@ -3959,7 +3959,7 @@ message_list_get_hide_deleted (MessageList *message_list,
g_return_val_if_fail (store != NULL, FALSE);
non_trash_folder =
- ((store->flags & CAMEL_STORE_VTRASH) == 0) ||
+ ((camel_store_get_flags (store) & CAMEL_STORE_VTRASH) == 0) ||
((folder->folder_flags & CAMEL_FOLDER_IS_TRASH) == 0);
if (non_trash_folder && CAMEL_IS_VEE_FOLDER (folder)) {
@@ -4761,10 +4761,10 @@ message_list_set_folder (MessageList *message_list,
store = camel_folder_get_parent_store (folder);
non_trash_folder =
- ((store->flags & CAMEL_STORE_VTRASH) == 0) ||
+ ((camel_store_get_flags (store) & CAMEL_STORE_VTRASH) == 0) ||
((folder->folder_flags & CAMEL_FOLDER_IS_TRASH) == 0);
non_junk_folder =
- ((store->flags & CAMEL_STORE_VJUNK) == 0) ||
+ ((camel_store_get_flags (store) & CAMEL_STORE_VJUNK) == 0) ||
((folder->folder_flags & CAMEL_FOLDER_IS_JUNK) == 0);
strikeout_col = -1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]