aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-03 09:41:23 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-05-03 09:41:23 +0800
commit1e95563462edb8e4db64889811cfa2abb7107c58 (patch)
tree0d2b905fd95a66052af7401b44279364890f1e39 /mail
parent96f2945894ede215b920f7ea69f6e6074e4beaf0 (diff)
downloadgsoc2013-evolution-1e95563462edb8e4db64889811cfa2abb7107c58.tar
gsoc2013-evolution-1e95563462edb8e4db64889811cfa2abb7107c58.tar.gz
gsoc2013-evolution-1e95563462edb8e4db64889811cfa2abb7107c58.tar.bz2
gsoc2013-evolution-1e95563462edb8e4db64889811cfa2abb7107c58.tar.lz
gsoc2013-evolution-1e95563462edb8e4db64889811cfa2abb7107c58.tar.xz
gsoc2013-evolution-1e95563462edb8e4db64889811cfa2abb7107c58.tar.zst
gsoc2013-evolution-1e95563462edb8e4db64889811cfa2abb7107c58.zip
MessageList coding style cleanups.
Diffstat (limited to 'mail')
-rw-r--r--mail/message-list.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index 72c962e937..214740b99c 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -3776,7 +3776,6 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const g
ETreeModel *etm = message_list->model;
gboolean hide_deleted;
GConfClient *client;
- CamelStore *folder_store;
g_return_if_fail (IS_MESSAGE_LIST (message_list));
@@ -3830,20 +3829,23 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const g
g_signal_emit (message_list, message_list_signals[MESSAGE_SELECTED], 0, NULL);
}
- if (folder) {
- gint strikeout_col = -1;
+ if (CAMEL_IS_FOLDER (folder)) {
+ CamelStore *store;
+ gboolean non_trash_folder;
+ gint strikeout_col;
ECell *cell;
- g_object_ref (folder);
- message_list->folder = folder;
+ message_list->folder = g_object_ref (folder);
message_list->just_set_folder = TRUE;
- /* hide deleted messages also when the store has a real trash */
- folder_store = camel_folder_get_parent_store (folder);
+ store = camel_folder_get_parent_store (folder);
+
+ non_trash_folder =
+ ((store->flags & CAMEL_STORE_VTRASH) == 0) ||
+ ((folder->folder_flags & CAMEL_FOLDER_IS_TRASH) == 0);
/* Setup the strikeout effect for non-trash folders */
- if (!(folder->folder_flags & CAMEL_FOLDER_IS_TRASH) || !(folder_store->flags & CAMEL_STORE_VTRASH))
- strikeout_col = COL_DELETED;
+ strikeout_col = non_trash_folder ? COL_DELETED : -1;
cell = e_table_extras_get_cell (message_list->extras, "render_date");
g_object_set (cell, "strikeout_column", strikeout_col, NULL);
@@ -3872,9 +3874,7 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const g
g_object_unref (client);
message_list->hidedeleted =
- hide_deleted &&
- (!(folder->folder_flags & CAMEL_FOLDER_IS_TRASH) ||
- !(folder_store->flags & CAMEL_STORE_VTRASH));
+ hide_deleted && non_trash_folder;
message_list->hidejunk =
folder_store_supports_vjunk_folder (message_list->folder) &&
!(folder->folder_flags & CAMEL_FOLDER_IS_JUNK) &&