[balsa/gtk3] Update last-check-time only if connected



commit 25e39db4ff17fea2b1a116ed287b427dbcfe620e
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Mar 6 11:23:22 2012 -0500

    Update last-check-time only if connected
    
    	* src/main-window.c: update last-check-time only if connected.

 ChangeLog         |    4 ++++
 src/main-window.c |    6 ++++--
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2916c12..3303ee8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2012-03-06  Peter Bloomfield
 
+	* src/main-window.c: update last-check-time only if connected.
+
+2012-03-06  Peter Bloomfield
+
 	* src/main-window.c: check local mailboxes even when network is
 	not connected.
 
diff --git a/src/main-window.c b/src/main-window.c
index 2d9c40d..5044c9a 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -2996,7 +2996,8 @@ check_new_messages_real(BalsaWindow * window, int type)
     g_slist_free(list);
 
 #if defined(HAVE_LIBNM_GLIB)
-    time(&window->last_check_time);
+    if (window->nm_state == NM_STATE_CONNECTED)
+        time(&window->last_check_time);
 #endif                          /* defined(HAVE_LIBNM_GLIB) */
 #endif
 }
@@ -3169,7 +3170,8 @@ bw_check_messages_thread(struct check_messages_thread_info *info)
         gdk_threads_enter();
         bw_set_sensitive(info->window, "GetNewMail", TRUE);
 #if defined(HAVE_LIBNM_GLIB)
-        time(&info->window->last_check_time);
+        if (info->window->nm_state == NM_STATE_CONNECTED)
+            time(&info->window->last_check_time);
 #endif                          /* defined(HAVE_LIBNM_GLIB) */
         g_object_unref(info->window);
         gdk_threads_leave();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]