diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-10-13 06:52:32 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-10-13 06:52:32 +0000 |
commit | 2ebd418a6e4f86de03434eb357cc577a4e366f5d (patch) | |
tree | 4056c2cada932de2d85bff51a1590f3591fe5d7d /libsylph | |
parent | 755b86e1dae724503a13187cde93e8f55114b3d6 (diff) |
enabled the property of the top folder.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@641 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r-- | libsylph/folder.c | 10 | ||||
-rw-r--r-- | libsylph/folder.h | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/libsylph/folder.c b/libsylph/folder.c index 818f85b3..cb84c8ca 100644 --- a/libsylph/folder.c +++ b/libsylph/folder.c @@ -1427,9 +1427,12 @@ static gboolean folder_read_folder_func(GNode *node, gpointer data) folder = folder_new(type, name, path); g_return_val_if_fail(folder != NULL, FALSE); - folder->account = account; - if (account && (type == F_IMAP || type == F_NEWS)) + if (account && FOLDER_IS_REMOTE(folder)) { + folder->account = account; account->folder = REMOTE_FOLDER(folder); + } + if (account && FOLDER_IS_LOCAL(folder)) + ac_apply_sub = TRUE; item = FOLDER_ITEM(folder->node->data); node->data = item; item->node = node; @@ -1503,6 +1506,9 @@ static void folder_write_list_recursive(GNode *node, gpointer data) if (folder->account) fprintf(fp, " account_id=\"%d\"", folder->account->account_id); + else if (item->account) + fprintf(fp, " account_id=\"%d\"", + item->account->account_id); if (item->ac_apply_sub) fputs(" account_apply_sub=\"1\"", fp); } else { diff --git a/libsylph/folder.h b/libsylph/folder.h index 200d5238..5fc097e9 100644 --- a/libsylph/folder.h +++ b/libsylph/folder.h @@ -45,6 +45,8 @@ typedef struct _FolderItem FolderItem; #define FOLDER_IS_LOCAL(obj) (FOLDER_TYPE(obj) == F_MH || \ FOLDER_TYPE(obj) == F_MBOX || \ FOLDER_TYPE(obj) == F_MAILDIR) +#define FOLDER_IS_REMOTE(obj) (FOLDER_TYPE(obj) == F_IMAP || \ + FOLDER_TYPE(obj) == F_NEWS) #if 0 #define MBOX_FOLDER(obj) ((MboxFolder *)obj) |