aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-02-22 01:28:11 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-02-22 01:28:11 +0000
commit173536cf437d8fcb1ab34ec63d412d0bf693c721 (patch)
tree58e607aec192dcac76b0d397878acb72c6bf7da5
parentde44b9bbce799a4f4308809e53c30b52aa67b786 (diff)
use filename-safe string for IMAP cache directory.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1004 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.ja6
-rw-r--r--libsylph/folder.c8
-rw-r--r--src/prefs_common_dialog.c2
4 files changed, 18 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 8aaa05b8..45633ae3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-02-22
+
+ * libsylph/folder.c: folder_get_path(): use filename-safe string for
+ IMAP cache directory.
+ * src/prefs_common_dialog.c: fixed a warning on compile.
+
2006-02-21
* libsylph/utils.[ch]: uriencode_for_filename(): creates filename-safe
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 28f3496a..4de5ea9a 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,9 @@
+2006-02-22
+
+ * libsylph/folder.c: folder_get_path(): IMAP キャッシュディレクトリに
+ ファイル名セーフな文字列を使用するようにした。
+ * src/prefs_common_dialog.c: コンパイル時の警告を修正。
+
2006-02-21
* libsylph/utils.[ch]: uriencode_for_filename(): ファイル名セーフな
diff --git a/libsylph/folder.c b/libsylph/folder.c
index a86ca878..26474eee 100644
--- a/libsylph/folder.c
+++ b/libsylph/folder.c
@@ -875,13 +875,15 @@ gchar *folder_get_path(Folder *folder)
path = path_;
}
} else if (FOLDER_TYPE(folder) == F_IMAP) {
+ gchar *uid;
+
g_return_val_if_fail(folder->account != NULL, NULL);
+ uid = uriencode_for_filename(folder->account->userid);
path = g_strconcat(get_imap_cache_dir(),
G_DIR_SEPARATOR_S,
folder->account->recv_server,
- G_DIR_SEPARATOR_S,
- folder->account->userid,
- NULL);
+ G_DIR_SEPARATOR_S, uid, NULL);
+ g_free(uid);
} else if (FOLDER_TYPE(folder) == F_NEWS) {
g_return_val_if_fail(folder->account != NULL, NULL);
path = g_strconcat(get_news_cache_dir(),
diff --git a/src/prefs_common_dialog.c b/src/prefs_common_dialog.c
index 4ddccd06..48f3ea8a 100644
--- a/src/prefs_common_dialog.c
+++ b/src/prefs_common_dialog.c
@@ -1713,7 +1713,7 @@ static void prefs_junk_preset_activated(GtkMenuItem *menuitem, gpointer data)
{
gint i;
- i = (gint)g_object_get_data(G_OBJECT(menuitem), MENU_VAL_ID);
+ i = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(menuitem), MENU_VAL_ID));
if (i > 0) {
i--;
gtk_entry_set_text(GTK_ENTRY(junk.entry_junk_learncmd),