aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-03 12:46:23 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-01-04 02:15:01 +0800
commite77ee5d5d38ad95bce550db62bf4105f43cf88c6 (patch)
tree3b4c275b086d3f49360c551e686f62140a8ee4d4 /modules/mail
parent3cfd5d640908b6441769341c764de70006262c6e (diff)
downloadgsoc2013-evolution-e77ee5d5d38ad95bce550db62bf4105f43cf88c6.tar.gz
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.c28
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);