/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2011 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#ifdef HAVE_CONFIG_H
# include "config.h"
+#include "claws-features.h"
#endif
#include "defs.h"
#endif
#endif
+extern SessionStats session_stats;
+
static GList *inc_dialog_list = NULL;
guint inc_lock_count = 0;
#define MSGBUFSIZE 8192
+static void inc_update_stats(gint new_msgs);
static void inc_finished (MainWindow *mainwin,
gboolean new_messages,
gboolean autocheck);
static void inc_notify_cmd (gint new_msgs,
gboolean notify);
-
+
+static void inc_update_stats(gint new_msgs)
+{
+ /* update session statistics */
+ session_stats.received += new_msgs;
+}
+
/**
* inc_finished:
* @mainwin: Main window.
new_msgs += account_new_msgs;
}
+ inc_update_stats(new_msgs);
inc_finished(mainwin, new_msgs > 0, FALSE);
main_window_unlock(mainwin);
inc_notify_cmd(new_msgs, notify);
new_msgs = inc_account_mail_real(mainwin, account);
+ inc_update_stats(new_msgs);
inc_finished(mainwin, new_msgs > 0, FALSE);
main_window_unlock(mainwin);
inc_autocheck_timer_set();
list = account_get_list();
if (!list) {
+ inc_update_stats(new_msgs);
inc_finished(mainwin, new_msgs > 0, autocheck);
main_window_unlock(mainwin);
inc_notify_cmd(new_msgs, notify);
new_msgs += inc_start(inc_dialog);
}
+ inc_update_stats(new_msgs);
inc_finished(mainwin, new_msgs > 0, autocheck);
main_window_unlock(mainwin);
inc_notify_cmd(new_msgs, notify);
static void inc_notify_cmd(gint new_msgs, gboolean notify)
{
-
#ifndef MAEMO
gchar *buf, *numpos, *ret_str;
gssize by_read = 0, by_written = 0;