diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-02-23 09:33:49 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-02-23 09:33:49 +0000 |
commit | 35101e45b4f2bdfd078e60da6a057ce15e07021d (patch) | |
tree | 36a4c5b3d4fba1ac304901a520614258b0cbbdb6 | |
parent | 173536cf437d8fcb1ab34ec63d412d0bf693c721 (diff) |
ignore non-ascii newsgroup names (fixes crash on Win32).
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1005 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | src/subscribedialog.c | 7 |
3 files changed, 15 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2006-02-23 + + * src/subscribedialog.c: ignore non-ascii newsgroup names (fixes crash + on Win32). + 2006-02-22 * libsylph/folder.c: folder_get_path(): use filename-safe string for diff --git a/ChangeLog.ja b/ChangeLog.ja index 4de5ea9a..988650d8 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,8 @@ +2006-02-23 + + * src/subscribedialog.c: 非 ascii のニュースグループ名を無視するように + した(Win32 でのクラッシュを修正)。 + 2006-02-22 * libsylph/folder.c: folder_get_path(): IMAP キャッシュディレクトリに diff --git a/src/subscribedialog.c b/src/subscribedialog.c index 92e49b17..232cd3aa 100644 --- a/src/subscribedialog.c +++ b/src/subscribedialog.c @@ -408,7 +408,7 @@ static gboolean subscribe_create_branch(NewsGroupInfo *ginfo, { GtkTreeIter iter_; GtkTreeIter parent; - gchar *name = (gchar *)ginfo->name; + const gchar *name = ginfo->name; gchar *parent_name; gint count; const gchar *count_str; @@ -442,7 +442,7 @@ static gboolean subscribe_create_branch(NewsGroupInfo *ginfo, } gtk_tree_store_set(tree_store, &iter_, - SUBSCRIBE_NAME, ginfo->name, + SUBSCRIBE_NAME, name, SUBSCRIBE_NUM, count_str, SUBSCRIBE_TYPE, type_str, SUBSCRIBE_INFO, ginfo, @@ -503,6 +503,9 @@ static void subscribe_dialog_set_list(const gchar *pattern, gboolean refresh) NewsGroupInfo *ginfo = (NewsGroupInfo *)cur->data; GtkTreeIter iter; + if (!ginfo->name || !is_ascii_str(ginfo->name)) + continue; + if (g_slist_find_custom(subscribe_list, ginfo->name, (GCompareFunc)g_ascii_strcasecmp) != NULL) |