sync with 0.8.1cvs24
authorPaul Mangan <paul@claws-mail.org>
Fri, 16 Aug 2002 09:34:01 +0000 (09:34 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 16 Aug 2002 09:34:01 +0000 (09:34 +0000)
12 files changed:
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/account.c
src/folder.c
src/folderview.c
src/folderview.h
src/inc.c
src/mainwindow.c
src/mh.c
src/summaryview.c

index e8550521175eb2db8ff7a3e55b4a65a6c27d8ef1..5e8d8f0deb1020071203c9f203c66677510391b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2002-08-16
+
+       * src/mh.c: mh_scan_tree_recursive(): disabled Maildir folder
+         checking to prevent confusion.
+
+2002-08-16
+
+       * src/folder.[ch]: folder_item_get_msg_list(): added a wrapper for
+         method Folder::get_msg_list().
+       * src/account.c: account_edit_prefs(), account_delete(): use
+         folderview_set_all() instead of folderview_rescan_all().
+       * src/folderview.[ch]:
+         folderview_check_new_all(): new. Updates all folders.
+         folderview_rescan_tree(): confirm before executing.
+         folderview_rescan_all(): commented out since it's not used anymore.
+         folderview_update_item_foreach(): added a flag for summary update.
+       * src/inc.c: inc_finished(): update summary only when
+         prefs_common.scan_all_after_inc is set.
+         inc_drop_message(): set mtime of target folder to 0 to force
+         the updating of summary.
+         inc_start(), get_spool(): update also summary when updating
+         folder view.
+       * src/mainwindow.c: changed 'File - Rescan folder tree' to
+         'File - Check for new messages in all folders'.
+
 2002-08-09
 
        * src/compose.c: compose_write_to_file(): clearsign message body
index 754cacfe36e032d9b946e552f9009029163f9b02..86cfc687cb9f5d2de3c0ddac53231a719e3fb4f7 100644 (file)
@@ -1,3 +1,11 @@
+2002-08-16 [paul]      0.8.1claws66
+
+       * sync with 0.8.1cvs24
+               see ChangeLog 2002-08-16
+
+       * po/it.po
+               updated by Alessandro Maestri
+
 2002-08-15 [paul]      0.8.1claws65
 
        * po/sr.po
index 8806068f0fc2a3dd076729ed5bd82674ed7ed799..61441e2fccbba1dfdf9774d7535269439eb1ad49 100644 (file)
@@ -1,3 +1,28 @@
+2002-08-16
+
+       * src/mh.c: mh_scan_tree_recursive(): º®Íð¤òÈò¤±¤ë¤¿¤á¤Ë Maildir
+         ¥Õ¥©¥ë¥À¥Á¥§¥Ã¥¯¤ò̵¸ú¤Ë¤·¤¿¡£
+
+2002-08-16
+
+       * src/folder.[ch]: folder_item_get_msg_list(): ¥á¥½¥Ã¥É
+         Folder::get_msg_list() ¤Ø¤Î¥é¥Ã¥Ñ¡¼¤òÄɲá£
+       * src/account.c: account_edit_prefs(), account_delete():
+         folderview_rescan_all() ¤ÎÂå¤ï¤ê¤Ë folderview_set_all() ¤ò»ÈÍÑ¡£
+       * src/folderview.[ch]:
+         folderview_check_new_all(): ¿·µ¬¡£Á´¥Õ¥©¥ë¥À¤ò¹¹¿·¤¹¤ë¡£
+         folderview_rescan_tree(): ¼Â¹ÔÁ°¤Ë³Îǧ¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+         folderview_rescan_all(): ¤â¤¦»È¤ï¤ì¤Ê¤¤¤¿¤á¥³¥á¥ó¥È¥¢¥¦¥È¡£
+         folderview_update_item_foreach(): ¥µ¥Þ¥ê¤Î¹¹¿·¤Î¥Õ¥é¥°¤òÄɲá£
+       * src/inc.c: inc_finished(): prefs_common.scan_all_after_inc ¤¬
+         ¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Î¤ß¥µ¥Þ¥ê¤ò¹¹¿·¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+         inc_drop_message(): ¥µ¥Þ¥ê¤Î¹¹¿·¤ò¶¯À©¤¹¤ë¤¿¤á¤ËÂоݥե©¥ë¥À¤Î
+         mtime ¤ò 0 ¤Ë¥»¥Ã¥È¡£
+         inc_start(), get_spool(): ¥Õ¥©¥ë¥À¥Ó¥å¡¼¤ò¹¹¿·¤¹¤ë¤È¤­¤Ë¥µ¥Þ¥ê¤â
+         ¹¹¿·¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+       * src/mainwindow.c: ¡Ö¥Õ¥¡¥¤¥ë - ¥Õ¥©¥ë¥À¥Ä¥ê¡¼¤òºÆ¥¹¥­¥ã¥ó¡×¤ò
+         ¡Ö¥Õ¥¡¥¤¥ë - Á´¥Õ¥©¥ë¥À¤Î¿·Ãå¥á¥Ã¥»¡¼¥¸¤ò¥Á¥§¥Ã¥¯¡×¤ËÊѹ¹¡£
+
 2002-08-09
 
        * src/compose.c: compose_write_to_file(): »ØÄꤷ¤¿¾ì¹ç¥á¥Ã¥»¡¼¥¸ËÜʸ
index ffdab5e627ca23d6589acfe9aa1dd98bb3405cc4..7766a0b68e783d8e5ea1076e3314e4175f2631e0 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws65
+EXTRA_VERSION=claws66
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 751def2d27c59ad785ab61605651f325b6dc7c34..cc145a6412603c8bea6b010947e13968a734dea7 100644 (file)
@@ -645,7 +645,7 @@ static void account_edit_prefs(void)
            ac_prefs->folder && strcmp2(ac_name, ac_prefs->account_name) != 0) {
                folder_set_name(FOLDER(ac_prefs->folder),
                                ac_prefs->account_name);
-               folderview_rescan_all();
+               folderview_set_all();
        }
 
        account_clist_set();
@@ -690,7 +690,7 @@ static void account_delete(void)
        ac_prefs = gtk_clist_get_row_data(clist, row);
        if (ac_prefs->folder) {
                folder_destroy(FOLDER(ac_prefs->folder));
-               folderview_rescan_all();
+               folderview_set_all();
        }
        account_destroy(ac_prefs);
        account_clist_set();
index 2401fd12257e6ed128698546c07bf87312c0d220..ff1e22c6d55a7c62ee601d5a6256b67776c6bd7a 100644 (file)
@@ -2350,7 +2350,7 @@ void folder_item_apply_processing(FolderItem *item)
        }
        
        /* folder_item_scan_foreach(summaryview->folder_table); */
-       folderview_update_item_foreach(folder_table);
+       folderview_update_item_foreach(folder_table, FALSE);
 
        g_slist_free(mlist);
        
index 4af11bd9ea17235e065b33453c5feb2a7c1014b1..352122f85412c66e02f280de11ff26bdb6452551 100644 (file)
@@ -786,11 +786,19 @@ static GtkWidget *label_window_create(const gchar *str)
 void folderview_rescan_tree(Folder *folder)
 {
        GtkWidget *window;
+       AlertValue avalue;
 
        g_return_if_fail(folder != NULL);
 
        if (!folder->scan_tree) return;
 
+       avalue = alertpanel
+               (_("Rescan folder tree"),
+                _("All previous settings for each folders will be lost.\n"
+                  "Continue?"),
+                _("Yes"), _("No"), NULL);
+       if (avalue != G_ALERTDEFAULT) return;
+
        inc_lock();
        window = label_window_create(_("Rescanning folder tree..."));
 
@@ -807,6 +815,7 @@ void folderview_rescan_tree(Folder *folder)
        inc_unlock();
 }
 
+#if 0
 void folderview_rescan_all(void)
 {
        GList *list;
@@ -838,6 +847,7 @@ void folderview_rescan_all(void)
        gtk_widget_destroy(window);
        inc_unlock();
 }
+#endif
 
 void folderview_check_new(Folder *folder)
 {
@@ -879,13 +889,18 @@ void folderview_check_new(Folder *folder)
        folder_write_list();
 }
 
-void folderview_check_new_all()
+void folderview_check_new_all(void)
 {
        GList *list;
        GtkWidget *window;
+       FolderView *folderview;
+
+       folderview = (FolderView *)folderview_list->data;
 
        inc_lock();
-       window = label_window_create(_("Checking all folders for new messages..."));
+       main_window_lock(folderview->mainwin);
+       window = label_window_create
+               (_("Checking for new messages in all folders..."));
 
        list = folder_get_list();
        for (; list != NULL; list = list->next) {
@@ -898,6 +913,7 @@ void folderview_check_new_all()
        folderview_set_all();
 
        gtk_widget_destroy(window);
+       main_window_unlock(folderview->mainwin);
        inc_unlock();
 }
 
@@ -1234,12 +1250,13 @@ void folderview_update_item(FolderItem *item, gboolean update_summary)
 static void folderview_update_item_foreach_func(gpointer key, gpointer val,
                                                gpointer data)
 {
-       folderview_update_item((FolderItem *)key, FALSE);
+       folderview_update_item((FolderItem *)key, (gboolean)data);
 }
 
-void folderview_update_item_foreach(GHashTable *table)
+void folderview_update_item_foreach(GHashTable *table, gboolean update_summary)
 {
-       g_hash_table_foreach(table, folderview_update_item_foreach_func, NULL);
+       g_hash_table_foreach(table, folderview_update_item_foreach_func,
+                            (gpointer)update_summary);
 }
 
 static gboolean folderview_gnode_func(GtkCTree *ctree, guint depth,
index e2a1ae19ae2d1fa789e5ba0321c6ab2c2796f6ef..b534507ad65ad863a6d9aea5c13738dc83b593ae 100644 (file)
@@ -70,11 +70,12 @@ void folderview_update_msg_num              (FolderView     *folderview,
 void folderview_rescan_tree            (Folder         *folder);
 void folderview_rescan_all             (void);
 void folderview_check_new              (Folder         *folder);
-void folderview_check_new_all          ();
+void folderview_check_new_all          (void);
 
 void folderview_update_item            (FolderItem     *item,
                                         gboolean        update_summary);
-void folderview_update_item_foreach    (GHashTable     *table);
+void folderview_update_item_foreach    (GHashTable     *table,
+                                        gboolean        update_summary);
 
 void folderview_new_folder             (FolderView     *folderview);
 void folderview_rename_folder          (FolderView     *folderview);
index 782def0999362eac57c46459e76bb3de2625e48b..a39cb7d69e47c8c9344185a4d809d59408f90d53 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -152,11 +152,10 @@ static void inc_finished(MainWindow *mainwin, gboolean new_messages)
                        folderview_unselect(mainwin->folderview);
                        folderview_select(mainwin->folderview, item);
                }       
-       } else {
+       } else if (prefs_common.scan_all_after_inc) {
                item = mainwin->summaryview->folder_item;
                if (FOLDER_SUMMARY_MISMATCH(item, mainwin->summaryview)) {
-                       folderview_unselect(mainwin->folderview);
-                       folderview_select(mainwin->folderview, item);
+                       folderview_update_item(item, TRUE);
                }       
        }
 }
@@ -609,7 +608,7 @@ static gint inc_start(IncProgressDialog *inc_dialog)
                new_msgs += pop3_state->cur_total_num;
 
                folderview_update_item_foreach
-                       (pop3_state->folder_table);
+                       (pop3_state->folder_table, TRUE);
 
                if (pop3_state->error_val == PS_AUTHFAIL &&
                    pop3_state->ac_prefs->tmp_pass) {
@@ -1036,6 +1035,10 @@ gint inc_drop_message(const gchar *file, Pop3State *state)
        val = GPOINTER_TO_INT(g_hash_table_lookup
                              (state->folder_table, dropfolder));
        if (val == 0) {
+               folder_item_scan(dropfolder);
+               /* force updating */
+               if (FOLDER_IS_LOCAL(dropfolder->folder))
+                       dropfolder->mtime = 0;
                g_hash_table_insert(state->folder_table, dropfolder,
                                    GINT_TO_POINTER(1));
        }
@@ -1187,11 +1190,11 @@ static gint get_spool(FolderItem *dest, const gchar *mbox)
                if (!prefs_common.scan_all_after_inc) {
                g_hash_table_insert(folder_table, dest,
                                    GINT_TO_POINTER(1));
-                       folderview_update_item_foreach(folder_table);
+                       folderview_update_item_foreach(folder_table, TRUE);
                }
                g_hash_table_destroy(folder_table);
        } else if (!prefs_common.scan_all_after_inc) {
-               folderview_update_item(dest, FALSE);
+               folderview_update_item(dest, TRUE);
        }
 
        return msgs;
index 45b2e6a557d75a0fcd432965e82c195450e435f5..f27fe0d2a3d926782b54e46363a079182399baff 100644 (file)
@@ -400,7 +400,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_File"),                          NULL, NULL, 0, "<Branch>"},
        {N_("/_File/_Add mailbox..."),          NULL, add_mailbox_cb, 0, NULL},
        {N_("/_File/_Add mbox mailbox..."),     NULL, add_mbox_cb, 0, NULL},
-       {N_("/_File/_Check for new mails in all folders"),
+       {N_("/_File/_Check for new messages in all folders"),
                                                NULL, update_folderview_cb, 0, NULL},
        {N_("/_File/_Folder"),                  NULL, NULL, 0, "<Branch>"},
        {N_("/_File/_Folder/Create _new folder..."),
@@ -1466,18 +1466,19 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                gchar *const entry;
                SensitiveCond cond;
        } entry[] = {
-               {"/File/Add mailbox..."        , M_UNLOCKED},
-                {"/File/Add mbox mailbox..."   , M_UNLOCKED},
-               {"/File/Check for new mails in all folders", M_UNLOCKED},
-               {"/File/Folder"                , M_UNLOCKED},
-               {"/File/Import mbox file..."   , M_UNLOCKED},
-               {"/File/Export to mbox file...", M_UNLOCKED},
-               {"/File/Empty trash"           , M_UNLOCKED},
-               {"/File/Work offline"          , M_UNLOCKED},
+               {"/File/Add mailbox..."                       , M_UNLOCKED},
+                {"/File/Add mbox mailbox..."                         , M_UNLOCKED},
+               {"/File/Check for new messages in all folders", M_UNLOCKED},
+               {"/File/Folder"                               , M_UNLOCKED},
+               {"/File/Import mbox file..."                  , M_UNLOCKED},
+               {"/File/Export to mbox file..."               , M_UNLOCKED},
+               {"/File/Empty trash"                          , M_UNLOCKED},
+               {"/File/Work offline"                         , M_UNLOCKED},
+
                {"/File/Save as...", M_SINGLE_TARGET_EXIST|M_UNLOCKED},
                {"/File/Print..."  , M_TARGET_EXIST|M_UNLOCKED},
-               /* {"/File/Close", M_UNLOCKED}, */
-               {"/File/Exit" , M_UNLOCKED},
+               /* {"/File/Close"  , M_UNLOCKED}, */
+               {"/File/Exit"      , M_UNLOCKED},
 
                {"/Edit/Select thread"             , M_SINGLE_TARGET_EXIST},
                {"/View/Sort"                      , M_EXEC},
index 5e3304161b9c5fc61a874d28b8a144e09c07c092..83f80c878d79f7fe60e0668d2665ea6e2645c879 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -1156,6 +1156,7 @@ static MsgInfo *mh_parse_msg(const gchar *file, FolderItem *item)
        return msginfo;
 }
 
+#if 0
 static gboolean mh_is_maildir_one(const gchar *path, const gchar *dir)
 {
        gchar *entry;
@@ -1179,6 +1180,7 @@ static gboolean mh_is_maildir(const gchar *path)
               mh_is_maildir_one(path, "cur") &&
               mh_is_maildir_one(path, "tmp");
 }
+#endif
 
 static void mh_scan_tree_recursive(FolderItem *item)
 {
@@ -1222,10 +1224,12 @@ static void mh_scan_tree_recursive(FolderItem *item)
                if (S_ISDIR(s.st_mode)) {
                        FolderItem *new_item;
 
+#if 0
                        if (mh_is_maildir(entry)) {
                                g_free(entry);
                                continue;
                        }
+#endif
 
                        new_item = folder_item_new(item->folder, d->d_name, entry);
                        folder_item_append(item, new_item);
index 430f1d59ab119c084c8a058e95ca4803b73c3085..d2c8d989bb3fd1056124567c31e8d42c7bbcd17f 100644 (file)
@@ -3240,7 +3240,7 @@ static void summary_execute_move(SummaryView *summaryview)
        if (summaryview->mlist) {
                procmsg_move_messages(summaryview->mlist);
 
-               folderview_update_item_foreach(summaryview->folder_table);
+               folderview_update_item_foreach(summaryview->folder_table, FALSE);
 
                for (cur = summaryview->mlist; cur != NULL; cur = cur->next)
                        procmsg_msginfo_free((MsgInfo *)cur->data);
@@ -3295,7 +3295,7 @@ static void summary_execute_copy(SummaryView *summaryview)
                procmsg_copy_messages(summaryview->mlist);
 
                /* folder_item_scan_foreach(summaryview->folder_table); */
-               folderview_update_item_foreach(summaryview->folder_table);
+               folderview_update_item_foreach(summaryview->folder_table, FALSE);
 
                g_slist_free(summaryview->mlist);
                summaryview->mlist = NULL;
@@ -3655,7 +3655,7 @@ void summary_filter(SummaryView *summaryview)
                gtk_clist_thaw(GTK_CLIST(summaryview->ctree));
 
                /* folder_item_scan_foreach(summaryview->folder_table); */
-               folderview_update_item_foreach(summaryview->folder_table);
+               folderview_update_item_foreach(summaryview->folder_table, FALSE);
 
                g_hash_table_destroy(summaryview->folder_table);
                summaryview->folder_table = NULL;