From 8af430a73e527f8507b973561b8d424cee37b63f Mon Sep 17 00:00:00 2001 From: hiro Date: Mon, 20 Nov 2006 01:42:35 +0000 Subject: merged from libsylph branch. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1325 ee746299-78ed-0310-b773-934348b2243d --- libsylph/account.c | 5 +++++ libsylph/account.h | 2 ++ libsylph/filter.h | 2 +- libsylph/mbox.c | 7 +++++-- libsylph/prefs_common.c | 5 +++++ libsylph/prefs_common.h | 2 ++ libsylph/procmime.c | 2 ++ libsylph/procmime.h | 2 ++ 8 files changed, 24 insertions(+), 3 deletions(-) (limited to 'libsylph') diff --git a/libsylph/account.c b/libsylph/account.c index 6b0dd17f..e2fd8b38 100644 --- a/libsylph/account.c +++ b/libsylph/account.c @@ -103,6 +103,11 @@ void account_write_config_all(void) prefs_account_write_config_all(account_list); } +PrefsAccount *account_get_current_account(void) +{ + return cur_account; +} + PrefsAccount *account_find_from_smtp_server(const gchar *address, const gchar *smtp_server) { diff --git a/libsylph/account.h b/libsylph/account.h index 3a6af365..d6f01a9e 100644 --- a/libsylph/account.h +++ b/libsylph/account.h @@ -35,6 +35,8 @@ extern PrefsAccount *cur_account; void account_read_config_all (void); void account_write_config_all (void); +PrefsAccount *account_get_current_account (void); + PrefsAccount *account_find_from_smtp_server (const gchar *address, const gchar *smtp_server); PrefsAccount *account_find_from_address (const gchar *address); diff --git a/libsylph/filter.h b/libsylph/filter.h index b528415b..df6255a4 100644 --- a/libsylph/filter.h +++ b/libsylph/filter.h @@ -192,7 +192,7 @@ FilterCond *filter_cond_new (FilterCondType type, FilterMatchType match_type, FilterMatchFlag match_flag, const gchar *header, - const gchar *body); + const gchar *value); FilterAction *filter_action_new (FilterActionType type, const gchar *str); FilterInfo *filter_info_new (void); diff --git a/libsylph/mbox.c b/libsylph/mbox.c index 83d65897..3ecf61c5 100644 --- a/libsylph/mbox.c +++ b/libsylph/mbox.c @@ -409,6 +409,7 @@ gint export_to_mbox(FolderItem *src, const gchar *mbox) FILE *msg_fp; FILE *mbox_fp; gchar buf[BUFFSIZE]; + PrefsAccount *cur_ac; g_return_val_if_fail(src != NULL, -1); g_return_val_if_fail(src->folder != NULL, -1); @@ -422,6 +423,8 @@ gint export_to_mbox(FolderItem *src, const gchar *mbox) return -1; } + cur_ac = account_get_current_account(); + mlist = folder_item_get_msg_list(src, TRUE); for (cur = mlist; cur != NULL; cur = cur->next) { @@ -435,8 +438,8 @@ gint export_to_mbox(FolderItem *src, const gchar *mbox) strncpy2(buf, msginfo->from ? msginfo->from : - cur_account && cur_account->address ? - cur_account->address : "unknown", + cur_ac && cur_ac->address ? + cur_ac->address : "unknown", sizeof(buf)); extract_address(buf); diff --git a/libsylph/prefs_common.c b/libsylph/prefs_common.c index 350acb23..99b1e867 100644 --- a/libsylph/prefs_common.c +++ b/libsylph/prefs_common.c @@ -391,6 +391,11 @@ static PrefParam param[] = { }; +PrefsCommon *prefs_common_get(void) +{ + return &prefs_common; +} + PrefParam *prefs_common_get_params(void) { return param; diff --git a/libsylph/prefs_common.h b/libsylph/prefs_common.h index 71f8572b..6ba2d311 100644 --- a/libsylph/prefs_common.h +++ b/libsylph/prefs_common.h @@ -281,6 +281,8 @@ struct _PrefsCommon extern PrefsCommon prefs_common; +PrefsCommon *prefs_common_get (void); + PrefParam *prefs_common_get_params (void); void prefs_common_read_config (void); diff --git a/libsylph/procmime.c b/libsylph/procmime.c index f9dba9d1..775c30a8 100644 --- a/libsylph/procmime.c +++ b/libsylph/procmime.c @@ -100,6 +100,7 @@ MimeInfo *procmime_mimeinfo_insert(MimeInfo *parent, MimeInfo *mimeinfo) return mimeinfo; } +#if 0 void procmime_mimeinfo_replace(MimeInfo *old, MimeInfo *new) { MimeInfo *parent = old->parent; @@ -125,6 +126,7 @@ void procmime_mimeinfo_replace(MimeInfo *old, MimeInfo *new) child = new; } } +#endif MimeInfo *procmime_mimeinfo_next(MimeInfo *mimeinfo) { diff --git a/libsylph/procmime.h b/libsylph/procmime.h index a4bbd312..735cef68 100644 --- a/libsylph/procmime.h +++ b/libsylph/procmime.h @@ -134,8 +134,10 @@ void procmime_mimeinfo_free_all (MimeInfo *mimeinfo); MimeInfo *procmime_mimeinfo_insert (MimeInfo *parent, MimeInfo *mimeinfo); +#if 0 void procmime_mimeinfo_replace (MimeInfo *old, MimeInfo *new); +#endif MimeInfo *procmime_mimeinfo_next (MimeInfo *mimeinfo); -- cgit v1.2.3