2005-06-19 [colin] 1.9.11cvs82
authorColin Leroy <colin@colino.net>
Sun, 19 Jun 2005 08:24:13 +0000 (08:24 +0000)
committerColin Leroy <colin@colino.net>
Sun, 19 Jun 2005 08:24:13 +0000 (08:24 +0000)
* src/imap_gtk.c
Remember that the user doesn't want to override
offline mode, for 3 seconds. It avoid presenting
him with N popups in a really short time.

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/imap_gtk.c

index b59f765..67a80ce 100644 (file)
@@ -1,3 +1,10 @@
+2005-06-19 [colin]     1.9.11cvs82
+
+       * src/imap_gtk.c
+               Remember that the user doesn't want to override
+               offline mode, for 3 seconds. It avoid presenting
+               him with N popups in a really short time.
+
 2005-06-17 [colin]     1.9.11cvs81
 
        * src/imap.c
index 08d5210..48a5f9a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.132 -r 1.382.2.133 src/compose.c;  ) > 1.9.11cvs79.patchset
 ( cvs diff -u -r 1.395.2.82 -r 1.395.2.83 src/summaryview.c;  cvs diff -u -r 1.179.2.33 -r 1.179.2.34 src/imap.c;  cvs diff -u -r 1.65.2.33 -r 1.65.2.34 src/codeconv.c;  cvs diff -u -r 1.79.2.11 -r 1.79.2.12 src/mh.c;  ) > 1.9.11cvs80.patchset
 ( cvs diff -u -r 1.179.2.34 -r 1.179.2.35 src/imap.c;  ) > 1.9.11cvs81.patchset
+( cvs diff -u -r 1.1.2.10 -r 1.1.2.11 src/imap_gtk.c;  ) > 1.9.11cvs82.patchset
index 45fc20f..7b5c055 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=81
+EXTRA_VERSION=82
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 02aa4f1..4b4e93f 100644 (file)
@@ -400,17 +400,25 @@ static void download_cb(FolderView *folderview, guint action,
 
 gboolean imap_gtk_should_override(void)
 {
-       static time_t overridden = 0;
+       static time_t overridden_yes = 0;
+       static time_t overridden_no  = 0;
+       gboolean answer = TRUE;
+
        if (prefs_common.work_offline) {
-               if (time(NULL) - overridden < 600)
+               if (time(NULL) - overridden_yes < 600)
                         return TRUE;
-               else if (alertpanel(_("Offline warning"), 
+               else if (time(NULL) - overridden_no < 3)
+                        return FALSE;
+               
+               answer = (alertpanel(_("Offline warning"), 
                               _("You're working offline. Override during 10 minutes?"),
-                              _("Yes"), _("No"), NULL) != G_ALERTDEFAULT)
-                       return FALSE;
-
-               overridden = time(NULL);
+                              _("Yes"), _("No"), NULL) == G_ALERTDEFAULT);
+               
+               if (answer == TRUE)
+                       overridden_yes = time(NULL);
+               else
+                       overridden_no  = time(NULL);
        }
-       return TRUE;
+       return answer;
        
 }