diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-03 09:41:23 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:05 +0800 |
commit | d6ef84d4112306810fe1d6873605ffb723a9e853 (patch) | |
tree | d9c952a343eca272cd35a4166869cd39a1d0847c | |
parent | c01ef21ca4cbdddd55e91a05b54070e1532e7d31 (diff) | |
download | gsoc2013-evolution-d6ef84d4112306810fe1d6873605ffb723a9e853.tar.gz gsoc2013-evolution-d6ef84d4112306810fe1d6873605ffb723a9e853.tar.zst gsoc2013-evolution-d6ef84d4112306810fe1d6873605ffb723a9e853.zip |
MessageList coding style cleanups.
-rw-r--r-- | mail/message-list.c | 24 |
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) && |