diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-01-03 12:46:23 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-01-04 02:15:01 +0800 |
commit | e77ee5d5d38ad95bce550db62bf4105f43cf88c6 (patch) | |
tree | 3b4c275b086d3f49360c551e686f62140a8ee4d4 /modules/mail | |
parent | 3cfd5d640908b6441769341c764de70006262c6e (diff) | |
download | gsoc2013-evolution-e77ee5d5d38ad95bce550db62bf4105f43cf88c6.tar gsoc2013-evolution-e77ee5d5d38ad95bce550db62bf4105f43cf88c6.tar.gz gsoc2013-evolution-e77ee5d5d38ad95bce550db62bf4105f43cf88c6.tar.bz2 gsoc2013-evolution-e77ee5d5d38ad95bce550db62bf4105f43cf88c6.tar.lz gsoc2013-evolution-e77ee5d5d38ad95bce550db62bf4105f43cf88c6.tar.xz gsoc2013-evolution-e77ee5d5d38ad95bce550db62bf4105f43cf88c6.tar.zst gsoc2013-evolution-e77ee5d5d38ad95bce550db62bf4105f43cf88c6.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'modules/mail')
-rw-r--r-- | modules/mail/e-mail-shell-view.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c index bd0b3cbe48..f216750005 100644 --- a/modules/mail/e-mail-shell-view.c +++ b/modules/mail/e-mail-shell-view.c @@ -365,7 +365,10 @@ filter: } static void -has_unread_mail (GtkTreeModel *model, GtkTreeIter *parent, gboolean is_root, gboolean *has_unread) +has_unread_mail (GtkTreeModel *model, + GtkTreeIter *parent, + gboolean is_root, + gboolean *has_unread) { guint unread = 0; GtkTreeIter iter, child; @@ -472,6 +475,7 @@ mail_shell_view_update_actions (EShellView *shell_view) uri = em_folder_tree_get_selected_uri (folder_tree); if (uri != NULL) { + GtkTreeRowReference *reference; EMFolderTreeModel *model; const gchar *folder_uri; @@ -495,16 +499,18 @@ mail_shell_view_update_actions (EShellView *shell_view) account != NULL && account->parent_uid != NULL; model = em_folder_tree_model_get_default (); - if (model) { - GtkTreeRowReference *reference = em_folder_tree_model_lookup_uri (model, uri); - if (reference != NULL) { - GtkTreePath *path = gtk_tree_row_reference_get_path (reference); - GtkTreeIter iter; - - gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path); - has_unread_mail (GTK_TREE_MODEL (model), &iter, TRUE, &folder_has_unread_rec); - gtk_tree_path_free (path); - } + reference = em_folder_tree_model_lookup_uri (model, uri); + if (reference != NULL) { + GtkTreePath *path; + GtkTreeIter iter; + + path = gtk_tree_row_reference_get_path (reference); + gtk_tree_model_get_iter ( + GTK_TREE_MODEL (model), &iter, path); + has_unread_mail ( + GTK_TREE_MODEL (model), &iter, + TRUE, &folder_has_unread_rec); + gtk_tree_path_free (path); } g_free (uri); |