Package: sylpheed-claws-maildir-plugin
Version: 0.7-2
Severity: wishlist
Tags: patch

I'd like to have a special .inbox directory under the maildir mailbox
directory. Mutt doesn't like the current layout, and it seems
conceptionally better to me to have the maildir directory layed out like
a tree, where only the leaf nodes contain data.

I've written a patch that does this in a backwards-compatible way. To
get the new layout you have to manually create a .inbox file in your
maildir mailbox directory. If that directory exists maildir-plugin will
use it as inbox, otherwise the current directory (maildir mailbox root)
is used.

If you wish I can also provide a script to automatically convert between
the two styles.

Cheers,
Greek0


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8r01112004
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages sylpheed-claws-maildir-plugin depends on:
ii  libc6                    2.3.2.ds1-20    GNU C Library: Shared libraries an
ii  libdb4.2                 4.2.52-17       Berkeley v4.2 Database Libraries [
ii  libglib1.2               1.2.10-9        The GLib library of C routines
ii  libgtk1.2                1.2.10-17       The GIMP Toolkit set of widgets fo
ii  libx11-6                 4.3.0.dfsg.1-10 X Window System protocol client li
ii  libxext6                 4.3.0.dfsg.1-10 X Window System miscellaneous exte
ii  libxi6                   4.3.0.dfsg.1-10 X Window System Input extension li
ii  sylpheed-claws           1.0.1-1         Bleeding edge version of the Sylph
ii  xlibs                    4.3.0.dfsg.1-10 X Keyboard Extension (XKB) configu

-- no debconf information
diff -Nur sylpheed-claws-maildir-plugin-0.7.old/src/maildir.c 
sylpheed-claws-maildir-plugin-0.7/src/maildir.c
--- sylpheed-claws-maildir-plugin-0.7.old/src/maildir.c 2004-09-27 
16:51:42.000000000 +0200
+++ sylpheed-claws-maildir-plugin-0.7/src/maildir.c     2005-02-19 
16:08:48.000000000 +0100
@@ -201,16 +201,31 @@
                 if (item->path && strcmp(item->path, "INBOX"))
                         path = g_strconcat(folder_path, G_DIR_SEPARATOR_S,
                                            item->path, NULL);
-                else
-                        path = g_strdup(folder_path);
+                    else {
+                        path = g_strconcat(folder_path, G_DIR_SEPARATOR_S,
+                                           ".inbox", NULL);
+                        if (access(path, F_OK) != 0) {
+                                g_free(path);
+                                path = g_strdup(folder_path);
+                        }
+                    }
         } else {
                 if (item->path && strcmp(item->path, "INBOX"))
                         path = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
                                            folder_path, G_DIR_SEPARATOR_S,
                                            item->path, NULL);
-                else
+                    else {
                         path = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S,
-                                           folder_path, NULL);
+                                           folder_path, G_DIR_SEPARATOR_S,
+                                           ".inbox", NULL);
+                        if (access(path, F_OK) != 0) {
+                                g_free(path);
+                                path = g_strconcat(get_home_dir(), 
+                                                   G_DIR_SEPARATOR_S,
+                                                   folder_path, NULL);
+                        }
+
+                    }
         }
        g_free(folder_path);
 

Reply via email to