sync with 0.9.9 release
authorPaul Mangan <paul@claws-mail.org>
Thu, 29 Jan 2004 10:26:55 +0000 (10:26 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 29 Jan 2004 10:26:55 +0000 (10:26 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
NEWS
configure.ac
src/folder.c
src/folderview.c
src/inc.c
src/mainwindow.c
src/mainwindow.h

index 6f33d9c..1e9d727 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-01-29
+
+       * version 0.9.9
+
+2004-01-29
+
+       * src/folder.c: folder_item_fetch_all_msg()
+         src/folderview.c: folderview_download_cb(): show progress with
+         the progressbar.
+       * src/mainwindow.[ch]: added new functions for progressbar.
+
 2004-01-29
 
        * src/summaryview.c: summary_key_pressed(): GDK_Left should only
index 1d5f95f..c16b091 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-29 [paul]      0.9.8claws58
+
+       * sync with 0.9.9 release
+               see ChangeLog 2004-01-29
+
 2004-01-29 [paul]      0.9.8claws57
 
        * sync with 0.9.8cvs11
index 4f31162..4d44e7b 100644 (file)
@@ -1,3 +1,14 @@
+2004-01-29
+
+       * version 0.9.9
+
+2004-01-29
+
+       * src/folder.c: folder_item_fetch_all_msg()
+         src/folderview.c: folderview_download_cb(): ¿ÊĽ¤ò¥×¥í¥°¥ì¥¹¥Ð¡¼¤Ç
+         É½¼¨¡£
+       * src/mainwindow.[ch]: ¿·¤¿¤Ë¥×¥í¥°¥ì¥¹¥Ð¡¼ÍѤδؿô¤òÄɲá£
+
 2004-01-29
 
        * src/summaryview.c: summary_key_pressed(): ¥µ¥Þ¥ê¥Ó¥å¡¼¤Î¿åÊ¿
diff --git a/NEWS b/NEWS
index 73f4273..16a8094 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,18 @@
 Changes of Sylpheed
 
+* 0.9.9
+
+    * Word wrapping on multibyte locales has been improved.
+    * The receive menu has been improved.
+    * The combo button for toolbar has been implemented.
+    * The download feature for IMAP / News folders has been implemented.
+    * URL is now shown on the toolbar when links are clicked, and put
+      warning in case of fake URL.
+    * JIS X 0201 Kana (hankaku kana) will be converted into JIS X 0208
+      when sending.
+    * Crashes on 64-bit environments has been fixed.
+    * Other bugfixes have been made.
+
 * 0.9.8a
 
     * The bug that caused the failure of cache data read has been fixed.
index 3182690..9e9bde8 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=57
+EXTRA_VERSION=58
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index f7e1849..71f7688 100644 (file)
@@ -1883,20 +1883,35 @@ gchar *folder_item_fetch_msg(FolderItem *item, gint num)
 
 gint folder_item_fetch_all_msg(FolderItem *item)
 {
+       Folder *folder;
        GSList *mlist;
        GSList *cur;
+       gint num = 0;
        gint ret = 0;
 
        g_return_val_if_fail(item != NULL, -1);
 
        debug_print("fetching all messages in %s ...\n", item->path);
 
+       folder = item->folder;
+
+       if (folder->ui_func)
+               folder->ui_func(folder, item, folder->ui_func_data ?
+                               folder->ui_func_data : GINT_TO_POINTER(num));
+
        mlist = folder_item_get_msg_list(item);
 
        for (cur = mlist; cur != NULL; cur = cur->next) {
                MsgInfo *msginfo = (MsgInfo *)cur->data;
                gchar *msg;
 
+               num++;
+               if (folder->ui_func)
+                       folder->ui_func(folder, item,
+                                       folder->ui_func_data ?
+                                       folder->ui_func_data :
+                                       GINT_TO_POINTER(num));
+
                msg = folder_item_fetch_msg(item, msginfo->msgnum);
                if (!msg) {
                        g_warning("Can't fetch message %d. Aborting.\n",
index d5321c6..7bae72c 100644 (file)
@@ -1827,6 +1827,26 @@ static GtkCTreeNode *folderview_find_by_name(GtkCTree *ctree,
        return NULL;
 }
 
+static void folderview_download_func(Folder *folder, FolderItem *item,
+                                    gpointer data)
+{
+       GList *list;
+
+       for (list = folderview_list; list != NULL; list = list->next) {
+               FolderView *folderview = (FolderView *)list->data;
+               MainWindow *mainwin = folderview->mainwin;
+               gchar *str;
+
+               str = g_strdup_printf
+                       (_("Downloading messages in %s ..."), item->path);
+               main_window_progress_set(mainwin,
+                                        GPOINTER_TO_INT(data), item->total_msgs);
+               STATUSBAR_PUSH(mainwin, str);
+               STATUSBAR_POP(mainwin);
+               g_free(str);
+       }
+}
+
 static void folderview_download_cb(FolderView *folderview, guint action,
                                   GtkWidget *widget)
 {
@@ -1849,11 +1869,13 @@ static void folderview_download_cb(FolderView *folderview, guint action,
                        return;
        }
 #endif
-       STATUSBAR_PUSH(mainwin, _("Downloading messages..."));
        main_window_cursor_wait(mainwin);
        inc_lock();
        main_window_lock(mainwin);
+       gtk_widget_set_sensitive(folderview->ctree, FALSE);
+       main_window_progress_on(mainwin);
        GTK_EVENTS_FLUSH();
+       folder_set_ui_func(item->folder, folderview_download_func, NULL);
        if (folder_item_fetch_all_msg(item) < 0) {
                gchar *name;
 
@@ -1861,10 +1883,12 @@ static void folderview_download_cb(FolderView *folderview, guint action,
                alertpanel_error(_("Error occurred while downloading messages in `%s'."), name);
                g_free(name);
        }
+       folder_set_ui_func(item->folder, NULL, NULL);
+       main_window_progress_off(mainwin);
+       gtk_widget_set_sensitive(folderview->ctree, TRUE);
        main_window_unlock(mainwin);
        inc_unlock();
        main_window_cursor_normal(mainwin);
-       STATUSBAR_POP(mainwin);
 }
 
 static void folderview_update_tree_cb(FolderView *folderview, guint action,
index d299130..a62becc 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -410,10 +410,7 @@ static void inc_progress_dialog_clear(IncProgressDialog *inc_dialog)
        progress_dialog_set_value(inc_dialog->dialog, 0.0);
        progress_dialog_set_label(inc_dialog->dialog, "");
        if (inc_dialog->mainwin)
-               gtk_progress_set_show_text
-                       (GTK_PROGRESS(inc_dialog->mainwin->progressbar), FALSE);
-       gtk_progress_bar_update
-               (GTK_PROGRESS_BAR(inc_dialog->mainwin->progressbar), 0.0);
+               main_window_progress_off(inc_dialog->mainwin);
 }
 
 static void inc_progress_dialog_destroy(IncProgressDialog *inc_dialog)
@@ -423,11 +420,7 @@ static void inc_progress_dialog_destroy(IncProgressDialog *inc_dialog)
        inc_dialog_list = g_list_remove(inc_dialog_list, inc_dialog);
 
        if (inc_dialog->mainwin)
-               gtk_progress_set_show_text
-                       (GTK_PROGRESS(inc_dialog->mainwin->progressbar), FALSE);
-       gtk_progress_bar_update
-               (GTK_PROGRESS_BAR(inc_dialog->mainwin->progressbar), 0.0);
-
+               main_window_progress_off(inc_dialog->mainwin);
        progress_dialog_destroy(inc_dialog->dialog);
 
        g_free(inc_dialog);
index 2c81f0a..5d9cb9f 100644 (file)
@@ -1522,6 +1522,30 @@ void main_window_get_position(MainWindow *mainwin)
        }
 }
 
+void main_window_progress_on(MainWindow *mainwin)
+{
+       gtk_progress_set_show_text(GTK_PROGRESS(mainwin->progressbar), TRUE);
+       gtk_progress_set_format_string(GTK_PROGRESS(mainwin->progressbar), "");
+}
+
+void main_window_progress_off(MainWindow *mainwin)
+{
+       gtk_progress_set_show_text(GTK_PROGRESS(mainwin->progressbar), FALSE);
+       gtk_progress_bar_update(GTK_PROGRESS_BAR(mainwin->progressbar), 0.0);
+       gtk_progress_set_format_string(GTK_PROGRESS(mainwin->progressbar), "");
+}
+
+void main_window_progress_set(MainWindow *mainwin, gint cur, gint total)
+{
+       gchar buf[32];
+
+       g_snprintf(buf, sizeof(buf), "%d / %d", cur, total);
+       gtk_progress_set_format_string(GTK_PROGRESS(mainwin->progressbar), buf);
+       gtk_progress_bar_update(GTK_PROGRESS_BAR(mainwin->progressbar),
+                               (cur == 0 && total == 0) ? 0 :
+                               (gfloat)cur / (gfloat)total);
+}
+
 void main_window_empty_trash(MainWindow *mainwin, gboolean confirm)
 {
        GList *list;
index f758432..e535be4 100644 (file)
@@ -163,6 +163,12 @@ void main_window_toggle_message_view       (MainWindow *mainwin);
 void main_window_get_size              (MainWindow     *mainwin);
 void main_window_get_position          (MainWindow     *mainwin);
 
+void main_window_progress_on           (MainWindow     *mainwin);
+void main_window_progress_off          (MainWindow     *mainwin);
+void main_window_progress_set          (MainWindow     *mainwin,
+                                        gint            cur,
+                                        gint            total);
+
 void main_window_empty_trash           (MainWindow     *mainwin,
                                         gboolean        confirm);
 void main_window_add_mailbox           (MainWindow     *mainwin);