2007-09-16 [colin] 3.0.0cvs2-stable
authorColin Leroy <colin@colino.net>
Sun, 16 Sep 2007 18:16:43 +0000 (18:16 +0000)
committerColin Leroy <colin@colino.net>
Sun, 16 Sep 2007 18:16:43 +0000 (18:16 +0000)
* src/folder.c
* src/imap.c
* src/inc.c
* src/mbox.c
* src/send_message.c
* src/statusbar.c
* src/statusbar.h
From 3.0.0cvs6
                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 98479eee36a8e3da447731697f0a79af302aeaf2..fe1c704637f25cd4ec2ef3a40d2965bd32581a8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2007-09-16 [colin]     3.0.0cvs2-stable
+
+       * src/folder.c
+       * src/imap.c
+       * src/inc.c
+       * src/mbox.c
+       * src/send_message.c
+       * src/statusbar.c
+       * src/statusbar.h
+               From 3.0.0cvs6
+                Maemo: distinguish various statusbar messages,
+                in order to display only the most important.
+
+
 2007-09-16 [colin]     3.0.0cvs1-stable
 
        * src/account.c
index dccc685537ff239adbc3a744815665acbb667ed5..6e2e5ab3ecbd81cc7aeecc2472a9105572390fde 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/edittags.c;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/common/tags.c;  ) > 2.10.0cvs190.patchset
 ( cvs diff -u -r 1.21.2.5 -r 1.21.2.6 po/bg.po;  cvs diff -u -r 1.1.2.13 -r 1.1.2.14 po/ca.po;  cvs diff -u -r 1.58.2.32 -r 1.58.2.33 po/de.po;  cvs diff -u -r 1.1.2.14 -r 1.1.2.15 po/fi.po;  cvs diff -u -r 1.42.2.32 -r 1.42.2.33 po/fr.po;  cvs diff -u -r 1.5.2.6 -r 1.5.2.7 po/hu.po;  cvs diff -u -r 1.34.2.22 -r 1.34.2.23 po/it.po;  cvs diff -u -r 1.10.2.13 -r 1.10.2.14 po/pl.po;  cvs diff -u -r 1.50.2.26 -r 1.50.2.27 po/pt_BR.po;  cvs diff -u -r 1.17.2.15 -r 1.17.2.16 po/ru.po;  cvs diff -u -r 1.2.2.25 -r 1.2.2.26 po/sk.po;  cvs diff -u -r 1.5.2.24 -r 1.5.2.25 po/zh_CN.po;  ) > 2.10.0cvs191.patchset
 ( cvs diff -u -r 1.61.2.67 -r 1.61.2.68 src/account.c;  ) > 3.0.0cvs1-stable.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.0cvs2-stable.patchset
index 26da9f662bab7a13b43ee016b4350c4f281ac58b..1bf351e2290ed4736847a637aa1a6041c503f3e2 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=1
+EXTRA_VERSION=2
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=-stable
 
index 5834a3463533300f6e6367e732cafd99c27375a6..6702a5f3032e1c812fab3e28e2641fcd9931b2d2 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 a0bc3cb3b312c89f548d978b00decf2a8056c60c..c87dca24325aa4e631340b188c60245b0372b53d 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 4266e2d7937e6800cb0c74c275d2a79d2d51bff2..2a43e294fae805a98e2f67279dd59a7328eea172 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 6b903223bb3ab1cbbfb1c75961cd93a361e3d860..b2e9d1de7afd8024d1b43f687d7314552df9488c 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 5c94fb18b420d0412b1c2964f7787f341c8b5f2c..3864f9af07bfaac0f51fa38bc8db1ae699f6e2a5 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 2a0f89bc6a7d8a7e9a91e949608ae0672ed7cde7..33e8f06cac2d71b3afba4996f24210e8b526061e 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 ceec3f4df2c999e39ce39ca7888c33f0d9e35574..36271475e9cc10feba5784f471ddc58fdac5d294 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);