aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mark-all-read
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-23 12:04:56 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-01-23 12:04:56 +0800
commit9acd121a93cf023501b48992ebe4341d4220301c (patch)
tree2506a9361c0043d7513d124abdd964467a750b98 /plugins/mark-all-read
parent53d9c34bb570d65740de43f8a711dc6cc53d5977 (diff)
downloadgsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.tar
gsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.tar.gz
gsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.tar.bz2
gsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.tar.lz
gsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.tar.xz
gsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.tar.zst
gsoc2013-evolution-9acd121a93cf023501b48992ebe4341d4220301c.zip
Coding style and whitespace cleanups.
Diffstat (limited to 'plugins/mark-all-read')
-rw-r--r--plugins/mark-all-read/mark-all-read.c68
1 files changed, 38 insertions, 30 deletions
diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c
index baaa80c573..3923f86c2b 100644
--- a/plugins/mark-all-read/mark-all-read.c
+++ b/plugins/mark-all-read/mark-all-read.c
@@ -47,9 +47,6 @@
gboolean e_plugin_ui_init (GtkUIManager *ui_manager,
EShellView *shell_view);
-static void mar_got_folder (gchar *uri, CamelFolder *folder, gpointer data);
-static void mar_all_sub_folders (CamelStore *store, CamelFolderInfo *fi, CamelException *ex);
-
static void
button_clicked_cb (GtkButton *button,
GtkDialog *dialog)
@@ -208,13 +205,42 @@ mark_all_as_read (CamelFolder *folder)
uids = camel_folder_get_uids (folder);
camel_folder_freeze(folder);
for (i=0;i<uids->len;i++)
- camel_folder_set_message_flags(folder, uids->pdata[i], CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
+ camel_folder_set_message_flags (
+ folder, uids->pdata[i],
+ CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
camel_folder_thaw(folder);
camel_folder_free_uids (folder, uids);
}
static void
-mar_got_folder (gchar *uri, CamelFolder *folder, gpointer data)
+mar_all_sub_folders (CamelStore *store,
+ CamelFolderInfo *fi,
+ CamelException *ex)
+{
+ while (fi) {
+ CamelFolder *folder;
+
+ if (fi->child) {
+ mar_all_sub_folders (store, fi->child, ex);
+ if (camel_exception_is_set (ex))
+ return;
+ }
+
+ if (!(folder = camel_store_get_folder (store, fi->full_name, 0, ex)))
+ return;
+
+ if (!CAMEL_IS_VEE_FOLDER (folder)) {
+ mark_all_as_read (folder);
+ }
+
+ fi = fi->next;
+ }
+}
+
+static void
+mar_got_folder (gchar *uri,
+ CamelFolder *folder,
+ gpointer data)
{
CamelFolderInfo *info;
CamelStore *store;
@@ -248,30 +274,11 @@ out:
}
static void
-mar_all_sub_folders (CamelStore *store, CamelFolderInfo *fi, CamelException *ex)
-{
- while (fi) {
- CamelFolder *folder;
-
- if (fi->child) {
- mar_all_sub_folders (store, fi->child, ex);
- if (camel_exception_is_set (ex))
- return;
- }
-
- if (!(folder = camel_store_get_folder (store, fi->full_name, 0, ex)))
- return;
-
- if (!CAMEL_IS_VEE_FOLDER (folder)) {
- mark_all_as_read (folder);
- }
-
- fi = fi->next;
- }
-}
-
-static void
-has_unread_mail (GtkTreeModel *model, GtkTreeIter *parent, gboolean is_root, gboolean *has_unread, gboolean *applicable)
+has_unread_mail (GtkTreeModel *model,
+ GtkTreeIter *parent,
+ gboolean is_root,
+ gboolean *has_unread,
+ gboolean *applicable)
{
guint unread = 0;
GtkTreeIter iter, child;
@@ -346,7 +353,8 @@ static GtkActionEntry entries[] = {
};
static void
-update_actions_cb (EShellView *shell_view, gpointer user_data)
+update_actions_cb (EShellView *shell_view,
+ gpointer user_data)
{
GtkActionGroup *action_group;
EShellWindow *shell_window;