sync with sylpheed 0.7.4cvs8
authorPaul Mangan <paul@claws-mail.org>
Tue, 19 Mar 2002 08:37:53 +0000 (08:37 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 19 Mar 2002 08:37:53 +0000 (08:37 +0000)
13 files changed:
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/defs.h
src/folder.c
src/folder.h
src/foldersel.c
src/folderview.c
src/main.c
src/mainwindow.c
src/mh.c
src/summaryview.c

index 93214bb..c879100 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2002-03-19
+
+       * src/mainwindow.c: modified some menu items.
+
+2002-03-19
+
+       * src/defs.h: changed OUTBOX_DIR from "outbox" to "sent"
+         (current "outbox" will be kept until rescan).
+       * src/folder.c: folder_set_missing_folders(): create the missing
+         folders.
+       * src/foldersel.c
+         src/folderview.c: changed 'Outbox' to 'Sent'.
+       * src/main.c: call folder_set_missing_folders().
+       * src/mh.c: mh_scan_tree(): create missing folders.
+       * src/summaryview.c: summary_set_menu_sensitive(): fixed a bug that
+         didn't set the menu sensitivity correctly.
+
 2002-03-18
 
        * src/folderview.c
index 3ce05b2..ffc44e9 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-19 [paul]      0.7.4claws23
+
+       * sync with sylpheed 0.7.4cvs8
+               see ChangeLog entries 2002-03-19
+
 2002-03-18 [paul]      0.7.4claws22
 
        * sync with sylpheed 0.7.4cvs6
index fcf34d1..4aa07a0 100644 (file)
@@ -1,3 +1,20 @@
+2002-03-19
+
+       * src/mainwindow.c: ¤¤¤¯¤Ä¤«¤Î¥á¥Ë¥å¡¼¹àÌܤò½¤Àµ¡£
+
+2002-03-19
+
+       * src/defs.h: OUTBOX_DIR ¤ò "outbox" ¤«¤é "sent" ¤ËÊѹ¹
+         (¸½ºß¤Î "outbox" ¤ÏºÆ¥¹¥­¥ã¥ó¤Þ¤ÇÊÝ»ý¤µ¤ì¤Þ¤¹)¡£
+       * src/folder.c: folder_set_missing_folders(): Â­¤ê¤Ê¤¤¥Õ¥©¥ë¥À¤ò
+         À¸À®¡£
+       * src/foldersel.c
+         src/folderview.c: 'Outbox' ¤ò 'Sent' ¤ËÊѹ¹¡£
+       * src/main.c: folder_set_missing_folders() ¤ò¸Æ¤Ö¤è¤¦¤Ë¤·¤¿¡£
+       * src/mh.c: mh_scan_tree(): Â­¤ê¤Ê¤¤¥Õ¥©¥ë¥À¤òÀ¸À®¡£
+       * src/summaryview.c: summary_set_menu_sensitive(): ¥á¥Ë¥å¡¼¤Î
+         ¥»¥ó¥·¥Æ¥£¥Ó¥Æ¥£¤òÀµ¤·¤¯¥»¥Ã¥È¤·¤Ê¤¤¥Ð¥°¤ò½¤Àµ¡£
+
 2002-03-18
 
        * src/folderview.c
index a500931..4f716f9 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws22
+EXTRA_VERSION=claws23
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 573fa91..1ee48fa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@
 #endif
 
 #define INBOX_DIR              "inbox"
-#define OUTBOX_DIR             "outbox"
+#define OUTBOX_DIR             "sent"
 #define QUEUE_DIR              "queue"
 #define DRAFT_DIR              "draft"
 #define TRASH_DIR              "trash"
index 912ff90..b7dddb2 100644 (file)
@@ -520,6 +520,50 @@ FolderItem *folder_get_default_trash(void)
        return folder->trash;
 }
 
+#define CREATE_FOLDER_IF_NOT_EXIST(member, dir, type)  \
+{                                                      \
+       if (!folder->member) {                          \
+               item = folder_item_new(dir, dir);       \
+               item->stype = type;                     \
+               folder_item_append(rootitem, item);     \
+               folder->member = item;                  \
+       }                                               \
+}
+
+void folder_set_missing_folders(void)
+{
+       Folder *folder;
+       FolderItem *rootitem;
+       FolderItem *item;
+       GList *list;
+
+       for (list = folder_list; list != NULL; list = list->next) {
+               folder = list->data;
+               if (folder->type != F_MH) continue;
+               rootitem = FOLDER_ITEM(folder->node->data);
+               g_return_if_fail(rootitem != NULL);
+
+               if (folder->inbox && folder->outbox && folder->draft &&
+                   folder->queue && folder->trash)
+                       continue;
+
+               if (folder->create_tree(folder) < 0) {
+                       g_warning("%s: can't create the folder tree.\n",
+                                 LOCAL_FOLDER(folder)->rootpath);
+                       continue;
+               }
+
+               CREATE_FOLDER_IF_NOT_EXIST(inbox,  INBOX_DIR,  F_INBOX);
+               CREATE_FOLDER_IF_NOT_EXIST(outbox, OUTBOX_DIR, F_INBOX);
+               CREATE_FOLDER_IF_NOT_EXIST(draft,  DRAFT_DIR,  F_INBOX);
+               CREATE_FOLDER_IF_NOT_EXIST(queue,  QUEUE_DIR,  F_INBOX);
+               CREATE_FOLDER_IF_NOT_EXIST(trash,  TRASH_DIR,  F_INBOX);
+       }
+
+}
+
+#undef CREATE_FOLDER_IF_NOT_EXIST
+
 gchar *folder_item_get_path(FolderItem *item)
 {
        gchar *folder_path;
index 649b10d..f7897cb 100644 (file)
@@ -265,6 +265,7 @@ FolderItem *folder_get_default_draft        (void);
 FolderItem *folder_get_default_queue   (void);
 FolderItem *folder_get_default_trash   (void);
 FolderItem *folder_get_default_processing (void);
+void folder_set_missing_folders                (void);
 
 gchar *folder_item_get_path            (FolderItem     *item);
 void   folder_item_scan                        (FolderItem     *item);
index b27f312..de7eedf 100644 (file)
@@ -218,7 +218,7 @@ static gboolean foldersel_gnode_func(GtkCTree *ctree, guint depth,
                name = _("Inbox");
                break;
        case F_OUTBOX:
-               name = _("Outbox");
+               name = _("Sent");
                break;
        case F_QUEUE:
                name = _("Queue");
index 0c75bc2..754e923 100644 (file)
@@ -1002,7 +1002,7 @@ static void folderview_update_node(FolderView *folderview, GtkCTreeNode *node)
                        openxpm = outboxopenxpm;
                        openmask = outboxopenxpmmask;
                }
-               name = g_strdup(_("Outbox"));
+               name = g_strdup(_("Sent"));
                break;
        case F_QUEUE:
                if (item->hide_read_msgs) {
index ff36dbf..32d3780 100644 (file)
@@ -294,6 +294,7 @@ int main(int argc, char *argv[])
        }
 
        account_set_missing_folder();
+       folder_set_missing_folders();
        folderview_set(folderview);
 
        /* prefs_scoring_read_config(); */
index 13ce95b..53aaf15 100644 (file)
@@ -627,7 +627,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_View/_Go to/Other _folder..."),  "G", goto_folder_cb, 0, NULL},
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_View/Open in new _window"),      "<control><alt>N", open_msg_cb, 0, NULL},
-       {N_("/_View/_View source"),             "<control>U", view_source_cb, 0, NULL},
+       {N_("/_View/Mess_age source"),          "<control>U", view_source_cb, 0, NULL},
        {N_("/_View/Show all _header"),         "<control>H", show_all_header_cb, 0, "<ToggleItem>"},
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_View/_Update"),                  "<control><alt>U", update_summary_cb,  0, NULL},
@@ -1572,7 +1572,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                {"/View/Go to/Next labeled message", M_MSG_EXIST},
                {"/View/Open in new window"        , M_SINGLE_TARGET_EXIST},
                {"/View/Show all header"           , M_SINGLE_TARGET_EXIST},
-               {"/View/View source"               , M_SINGLE_TARGET_EXIST},
+               {"/View/Message source"            , M_SINGLE_TARGET_EXIST},
 
                {"/Message/Get new mail"          , M_HAVE_ACCOUNT|M_UNLOCKED},
                {"/Message/Get from all accounts" , M_HAVE_ACCOUNT|M_UNLOCKED},
index 81184b3..5803033 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -788,6 +788,7 @@ void mh_scan_tree(Folder *folder)
        }
        g_free(rootpath);
 
+       mh_create_tree(folder);
        mh_scan_tree_recursive(item, pptable);
        
        folder_persist_prefs_free(pptable);
index b355a68..ff17523 100644 (file)
@@ -1048,9 +1048,11 @@ static void summary_set_menu_sensitive(SummaryView *summaryview)
                return;
        }
 
-       if (summaryview->folder_item->folder->type != F_NEWS) {
+       if (summaryview->folder_item->folder->type != F_NEWS)
                menu_set_sensitive(ifactory, "/Move...", TRUE);
-       }
+       else
+               menu_set_sensitive(ifactory, "/Move...", FALSE);
+
        menu_set_sensitive(ifactory, "/Delete", TRUE);
        menu_set_sensitive(ifactory, "/Select thread", TRUE);
        menu_set_sensitive(ifactory, "/Select all", TRUE);
@@ -1086,6 +1088,8 @@ static void summary_set_menu_sensitive(SummaryView *summaryview)
            summaryview->folder_item->stype == F_DRAFT  ||
            summaryview->folder_item->stype == F_QUEUE)
                menu_set_sensitive(ifactory, "/Re-edit", sens);
+       else
+               menu_set_sensitive(ifactory, "/Re-edit", FALSE);
 
        menu_set_sensitive(ifactory, "/Save as...", sens);
        menu_set_sensitive(ifactory, "/Print...",   TRUE);