aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-01-30 06:44:20 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-01-30 06:44:20 +0000
commita86fc629f6c05556bfc17c62fc3d4f9b487bb6c5 (patch)
treee09fb59e9be44ad8dea83755a0d8096e59628df1 /libsylph
parent7fc7273c9b1659347e4e6eb8c3c0a2aa408ed318 (diff)
fixed a bug that automatic account selection was disabled on IMAP4 folders.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@942 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/account.c15
-rw-r--r--libsylph/account.h3
2 files changed, 15 insertions, 3 deletions
diff --git a/libsylph/account.c b/libsylph/account.c
index 514825dd..6b0dd17f 100644
--- a/libsylph/account.c
+++ b/libsylph/account.c
@@ -167,6 +167,19 @@ PrefsAccount *account_find_from_item(FolderItem *item)
g_return_val_if_fail(item != NULL, NULL);
+ ac = account_find_from_item_property(item);
+ if (!ac)
+ ac = item->folder->account;
+
+ return ac;
+}
+
+PrefsAccount *account_find_from_item_property(FolderItem *item)
+{
+ PrefsAccount *ac;
+
+ g_return_val_if_fail(item != NULL, NULL);
+
ac = item->account;
if (!ac) {
FolderItem *cur_item = item->parent;
@@ -178,8 +191,6 @@ PrefsAccount *account_find_from_item(FolderItem *item)
cur_item = cur_item->parent;
}
}
- if (!ac)
- ac = item->folder->account;
return ac;
}
diff --git a/libsylph/account.h b/libsylph/account.h
index 395f07a7..3a6af365 100644
--- a/libsylph/account.h
+++ b/libsylph/account.h
@@ -1,6 +1,6 @@
/*
* LibSylph -- E-Mail client library
- * Copyright (C) 1999-2005 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2006 Hiroyuki Yamamoto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -40,6 +40,7 @@ PrefsAccount *account_find_from_smtp_server (const gchar *address,
PrefsAccount *account_find_from_address (const gchar *address);
PrefsAccount *account_find_from_id (gint id);
PrefsAccount *account_find_from_item (FolderItem *item);
+PrefsAccount *account_find_from_item_property (FolderItem *item);
PrefsAccount *account_find_from_message_file (const gchar *file);
PrefsAccount *account_find_from_msginfo (MsgInfo *msginfo);