2005-12-04 [paul] 1.9.100cvs60
[claws.git] / src / inc.c
index c45c052a859deda492f944f3da740dbb3ef57bb5..9907b42bcce87a879bfa8394c6447a6b92846716 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -759,7 +759,7 @@ static IncState inc_pop3_session_do(IncSession *session)
                          "Do you want to continue connecting to this "
                          "server? The communication would not be "
                          "secure."),
-                         _("Continue connecting"), 
+                         _("Con_tinue connecting"), 
                          GTK_STOCK_CANCEL, NULL,
                          FALSE, NULL, ALERT_WARNING,
                          G_ALERTALTERNATE) != G_ALERTDEFAULT)
@@ -1244,8 +1244,8 @@ static gint inc_spool_account(PrefsAccount *account)
        gchar *mbox;
        gint result;
 
-       if (account->inbox) {
-               inbox = folder_find_item_from_path(account->inbox);
+       if (account->local_inbox) {
+               inbox = folder_find_item_from_identifier(account->local_inbox);
                if (!inbox)
                        inbox = folder_get_default_inbox();
        } else
@@ -1428,29 +1428,39 @@ gboolean inc_offline_should_override(void)
 {
        static time_t overridden_yes = 0;
        static time_t overridden_no  = 0;
-       int length = 600;
-       gboolean answer = TRUE;
+       int length = 10; /* minutes */
+       gint answer = G_ALERTDEFAULT;
        
        if (prefs_common.autochk_newmail)
-               length = prefs_common.autochk_itv;
+               length = prefs_common.autochk_itv; /* minutes */
 
        if (prefs_common.work_offline) {
-               gchar *tmp = g_strdup_printf(
-                               _("You're working offline. Override during %d minutes?"),
-                               length);
-               if (time(NULL) - overridden_yes < length * 10)
+               gchar *tmp = NULL;
+               
+               if (time(NULL) - overridden_yes < length * 60) /* seconds */
                         return TRUE;
-               else if (time(NULL) - overridden_no < length * 10)
+               else if (time(NULL) - overridden_no < length * 60) /* seconds */
                         return FALSE;
-               
-               answer = (alertpanel(_("Offline warning"), 
+
+               tmp = g_strdup_printf(
+                               _("You're working offline. Override for %d minutes?"),
+                               length);
+
+               answer = alertpanel(_("Offline warning"), 
                               tmp,
-                              GTK_STOCK_YES, GTK_STOCK_NO, NULL) == G_ALERTDEFAULT);
+                              GTK_STOCK_YES, GTK_STOCK_NO, _("On_ly once"));
                g_free(tmp);
-               if (answer == TRUE)
+               if (answer == G_ALERTDEFAULT) {
                        overridden_yes = time(NULL);
-               else
+                       return TRUE;
+               } else if (answer == G_ALERTALTERNATE) {
                        overridden_no  = time(NULL);
+                       return FALSE;
+               } else {
+                       overridden_yes = (time_t)0;
+                       overridden_no  = (time_t)0;
+                       return TRUE;
+               }
        }
-       return answer;
+       return TRUE;
 }