diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.ja | 6 | ||||
-rw-r--r-- | libsylph/account.c | 15 | ||||
-rw-r--r-- | libsylph/account.h | 3 | ||||
-rw-r--r-- | src/compose.c | 7 |
5 files changed, 32 insertions, 5 deletions
@@ -1,5 +1,11 @@ 2006-01-30 + * libsylph/account.[ch] + src/compose.c: compose_reply(): fixed a bug that automatic account + selection was disabled on IMAP4 folders. + +2006-01-30 + * libsylph/socket.[ch]: code cleanup. 2006-01-28 diff --git a/ChangeLog.ja b/ChangeLog.ja index eb7c0915..bebf3766 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,11 @@ 2006-01-30 + * libsylph/account.[ch] + src/compose.c: compose_reply(): 自動アカウント選択が IMAP4 フォルダ + で無効になっていたバグを修正。 + +2006-01-30 + * libsylph/socket.[ch]: コードの整理。 2006-01-28 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); diff --git a/src/compose.c b/src/compose.c index d7ca382e..78926322 100644 --- a/src/compose.c +++ b/src/compose.c @@ -761,14 +761,17 @@ void compose_reply(MsgInfo *msginfo, FolderItem *item, ComposeMode mode, if (COMPOSE_QUOTE_MODE(mode) == COMPOSE_WITH_QUOTE) quote = TRUE; - account = account_find_from_item(msginfo->folder); + account = account_find_from_item_property(msginfo->folder); if (!account && msginfo->to && prefs_common.reply_account_autosel) { gchar *to; Xstrdup_a(to, msginfo->to, return); extract_address(to); account = account_find_from_address(to); } - if (!account) account = cur_account; + if (!account && msginfo->folder->folder) + account = msginfo->folder->folder->account; + if (!account) + account = cur_account; g_return_if_fail(account != NULL); MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_FORWARDED); |