2007-09-05 [colin] 3.0.0cvs6
authorPaul Mangan <paul@claws-mail.org>
Sun, 16 Sep 2007 06:30:16 +0000 (06:30 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sun, 16 Sep 2007 06:30:16 +0000 (06:30 +0000)
* src/folder.c
* src/imap.c
* src/inc.c
* src/mbox.c
* src/send_message.c
* src/statusbar.c
* src/statusbar.h
Maemo: distinguish various statusbar messages,
in order to display only the most important.

ChangeLog
PATCHSETS
configure.ac
src/folder.c
src/imap.c
src/inc.c
src/mbox.c
src/send_message.c
src/statusbar.c
src/statusbar.h

index 542449d..edf3387 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2007-09-05 [colin]     3.0.0cvs6
+
+       * src/folder.c
+       * src/imap.c
+       * src/inc.c
+       * src/mbox.c
+       * src/send_message.c
+       * src/statusbar.c
+       * src/statusbar.h
+               Maemo: distinguish various statusbar messages,
+               in order to display only the most important.
+
 2007-09-04 [wwp]       3.0.0cvs5
 
        * src/account.c
index 4aefde7..7014b50 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.406 -r 1.382.2.407 src/compose.c;  ) > 3.0.0cvs3.patchset
 ( cvs diff -u -r 1.395.2.324 -r 1.395.2.325 src/summaryview.c;  ) > 3.0.0cvs4.patchset
 ( cvs diff -u -r 1.61.2.67 -r 1.61.2.68 src/account.c;  ) > 3.0.0cvs5.patchset
+( cvs diff -u -r 1.213.2.158 -r 1.213.2.159 src/folder.c;  cvs diff -u -r 1.179.2.186 -r 1.179.2.187 src/imap.c;  cvs diff -u -r 1.149.2.80 -r 1.149.2.81 src/inc.c;  cvs diff -u -r 1.28.2.37 -r 1.28.2.38 src/mbox.c;  cvs diff -u -r 1.17.2.43 -r 1.17.2.44 src/send_message.c;  cvs diff -u -r 1.5.2.19 -r 1.5.2.20 src/statusbar.c;  cvs diff -u -r 1.3.2.8 -r 1.3.2.9 src/statusbar.h;  ) > 3.0.0cvs6.patchset
index 673529b..fd0595c 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=5
+EXTRA_VERSION=6
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 5834a34..6702a5f 100644 (file)
@@ -2711,7 +2711,7 @@ gint folder_item_fetch_all_msg(FolderItem *item)
                return -1;
 
        debug_print("fetching all messages in %s ...\n", item->path ? item->path : "(null)");
-       statusbar_print_all(_("Fetching all messages in %s ...\n"), item->path ? item->path : "(null)");
+       statuswindow_print_all(_("Fetching all messages in %s ...\n"), item->path ? item->path : "(null)");
 
        folder = item->folder;
 
@@ -2748,7 +2748,7 @@ gint folder_item_fetch_all_msg(FolderItem *item)
        }
        
        statusbar_progress_all(0,0,0);
-       statusbar_pop_all();
+       statuswindow_pop_all();
        procmsg_msg_list_free(mlist);
 
        return ret;
@@ -4211,13 +4211,13 @@ void folder_item_synchronise(FolderItem *item)
        if (!item)
                return;
        if (item->prefs->offlinesync && item->folder->klass->synchronise) {
-               statusbar_print_all(_("Synchronising %s for offline use...\n"), item->path ? item->path : "(null)");
+               statuswindow_print_all(_("Synchronising %s for offline use...\n"), item->path ? item->path : "(null)");
                item->folder->klass->synchronise(item, 
                        item->prefs->offlinesync_days);
                if (item->prefs->offlinesync_days > 0 &&
                    item->prefs->remove_old_bodies)
                        folder_item_clean_local_files(item, item->prefs->offlinesync_days);
-               statusbar_pop_all();
+               statuswindow_pop_all();
        }
 }
 
index a0bc3cb..c87dca2 100644 (file)
@@ -845,7 +845,7 @@ static IMAPSession *imap_session_new(Folder * folder,
 #endif
 
        imap_init(folder);
-       statusbar_print_all(_("Connecting to IMAP4 server: %s..."), folder->account->recv_server);
+       statuswindow_print_all(_("Connecting to IMAP4 server: %s..."), folder->account->recv_server);
        if (account->set_tunnelcmd) {
                r = imap_threaded_connect_cmd(folder,
                                              account->tunnelcmd,
@@ -868,7 +868,7 @@ static IMAPSession *imap_session_new(Folder * folder,
                }
        }
        
-       statusbar_pop_all();
+       statuswindow_pop_all();
        if (r == MAILIMAP_NO_ERROR_AUTHENTICATED) {
                authenticated = TRUE;
        }
@@ -955,7 +955,7 @@ try_again:
        } else if (account->imap_auth_type == IMAP_AUTH_ANON) {
                pass = "";
        }
-       statusbar_print_all(_("Connecting to IMAP4 server %s...\n"),
+       statuswindow_print_all(_("Connecting to IMAP4 server %s...\n"),
                                account->recv_server);
        if (imap_auth(session, account->userid, pass, account->imap_auth_type) != IMAP_SUCCESS) {
                statusbar_pop_all();
@@ -975,7 +975,7 @@ try_again:
                return;
        } 
 
-       statusbar_pop_all();
+       statuswindow_pop_all();
        session->authenticated = TRUE;
        return;
 }
index 4266e2d..2a43e29 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -801,7 +801,7 @@ static IncState inc_pop3_session_do(IncSession *session)
 #endif
 
        buf = g_strdup_printf(_("Connecting to POP3 server: %s..."), server);
-       statusbar_print_all("%s", buf);
+       statuswindow_print_all("%s", buf);
        log_message(LOG_PROTOCOL, "%s\n", buf);
 
        progress_dialog_set_label(inc_dialog->dialog, buf);
@@ -825,7 +825,7 @@ static IncState inc_pop3_session_do(IncSession *session)
                            server, port);
                }
                session->inc_state = INC_CONNECT_ERROR;
-               statusbar_pop_all();
+               statuswindow_pop_all();
                return INC_CONNECT_ERROR;
        }
 
@@ -873,7 +873,7 @@ static IncState inc_pop3_session_do(IncSession *session)
        }
 
        session_disconnect(SESSION(pop3_session));
-       statusbar_pop_all();
+       statuswindow_pop_all();
 
        return session->inc_state;
 }
index 6b90322..b2e9d1d 100644 (file)
@@ -549,7 +549,7 @@ gint export_list_to_mbox(GSList *mlist, const gchar *mbox)
        flockfile(mbox_fp);
 #endif
 
-       statusbar_print_all(_("Exporting to mbox..."));
+       statuswindow_print_all(_("Exporting to mbox..."));
        for (cur = mlist; cur != NULL; cur = cur->next) {
                int len;
                gchar buft[BUFFSIZE];
@@ -610,7 +610,7 @@ gint export_list_to_mbox(GSList *mlist, const gchar *mbox)
                        GTK_EVENTS_FLUSH();
        }
        statusbar_progress_all(0,0,0);
-       statusbar_pop_all();
+       statuswindow_pop_all();
 
 #ifdef HAVE_FGETS_UNLOCKED
        funlockfile(mbox_fp);
index 5c94fb1..3864f9a 100644 (file)
@@ -435,7 +435,7 @@ gint send_message_smtp_full(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp, g
                ac_prefs->session = SMTP_SESSION(session);
 
 
-       statusbar_pop_all();
+       statuswindow_pop_all();
        statusbar_verbosity_set(FALSE);
        return ret;
 }
@@ -461,12 +461,12 @@ static gint send_recv_message(Session *session, const gchar *msg, gpointer data)
        case SMTP_HELO:
                g_snprintf(buf, sizeof(buf), _("Sending HELO..."));
                state_str = _("Authenticating");
-               statusbar_print_all(_("Sending message..."));
+               statuswindow_print_all(_("Sending message..."));
                break;
        case SMTP_EHLO:
                g_snprintf(buf, sizeof(buf), _("Sending EHLO..."));
                state_str = _("Authenticating");
-               statusbar_print_all(_("Sending message..."));
+               statuswindow_print_all(_("Sending message..."));
                break;
        case SMTP_AUTH:
                g_snprintf(buf, sizeof(buf), _("Authenticating..."));
index 2a0f89b..33e8f06 100644 (file)
@@ -111,9 +111,7 @@ void statusbar_print(GtkStatusbar *statusbar, const gchar *format, ...)
 #ifdef MAEMO
 static GSList *banner_texts = NULL;
 static GtkWidget *banner = NULL;
-#endif
-
-void statusbar_print_all(const gchar *format, ...)
+void statuswindow_print_all(const gchar *format, ...)
 {
        va_list args;
        gchar buf[BUFFSIZE];
@@ -125,7 +123,6 @@ void statusbar_print_all(const gchar *format, ...)
 
        for (cur = statusbar_list; cur != NULL; cur = cur->next)
                statusbar_puts(GTK_STATUSBAR(cur->data), buf);
-#ifdef MAEMO
        if (mainwindow_get_mainwindow()) {
                if (banner != NULL) {
                        gchar *last_text = (gchar *)banner_texts->data;
@@ -145,10 +142,9 @@ void statusbar_print_all(const gchar *format, ...)
                        banner_texts = g_slist_prepend(banner_texts, g_strdup(buf));
                }
        }
-#endif
 }
 
-void statusbar_pop_all(void)
+void statuswindow_pop_all(void)
 {
        GList *cur;
        gint cid;
@@ -158,7 +154,6 @@ void statusbar_pop_all(void)
                                                   "Standard Output");
                gtk_statusbar_pop(GTK_STATUSBAR(cur->data), cid);
        }
-#ifdef MAEMO
        if (banner && banner_texts) {
                gchar *old_text = (gchar *)banner_texts->data;
                gchar *prev_text = NULL;
@@ -173,7 +168,33 @@ void statusbar_pop_all(void)
                        banner = NULL;
                }
        }
+}
 #endif
+
+void statusbar_print_all(const gchar *format, ...)
+{
+       va_list args;
+       gchar buf[BUFFSIZE];
+       GList *cur;
+
+       va_start(args, format);
+       g_vsnprintf(buf, sizeof(buf), format, args);
+       va_end(args);
+
+       for (cur = statusbar_list; cur != NULL; cur = cur->next)
+               statusbar_puts(GTK_STATUSBAR(cur->data), buf);
+}
+
+void statusbar_pop_all(void)
+{
+       GList *cur;
+       gint cid;
+
+       for (cur = statusbar_list; cur != NULL; cur = cur->next) {
+               cid = gtk_statusbar_get_context_id(GTK_STATUSBAR(cur->data),
+                                                  "Standard Output");
+               gtk_statusbar_pop(GTK_STATUSBAR(cur->data), cid);
+       }
 }
 
 static gboolean statusbar_puts_all_hook (gpointer source, gpointer data)
index ceec3f4..3627147 100644 (file)
@@ -34,6 +34,16 @@ void statusbar_print         (GtkStatusbar   *statusbar,
 void statusbar_print_all       (const gchar    *format, ...)
                                 G_GNUC_PRINTF(1, 2);
 void statusbar_pop_all         (void);
+
+#ifdef MAEMO
+void statuswindow_print_all    (const gchar    *format, ...)
+                                G_GNUC_PRINTF(1, 2);
+void statuswindow_pop_all      (void);
+#else
+#define statuswindow_print_all statusbar_print_all
+#define statuswindow_pop_all   statusbar_pop_all
+#endif
+
 void statusbar_verbosity_set   (gboolean        verbose);
 
 void statusbar_progress_all    (gint done, gint total, gint step);