aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-12-13 06:47:36 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-12-13 06:47:36 +0000
commit9e5d1627ea3320624f3266528130371a0a3aff5a (patch)
tree9a303ea4cb7d2fa7bebe68d117fe3ffad63de595
parent24d1220da3bb3f6f246ea7afa0c29782709ccbd3 (diff)
fixed subscribed dialog.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@824 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.ja7
-rw-r--r--src/subscribedialog.c32
3 files changed, 34 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index df245914..564ee36e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-13
+
+ * src/subscribedialog.c: fixed a bug that invisible subscribed groups
+ was removed after refresh. Assume wildcards for keywords without
+ them. Display status when receiving of newsgroups list started.
+
2005-12-09
* src/foldersel.c: also select top folder on FOLDER_SEL_ALL.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 00ca7594..c542af19 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,10 @@
+2005-12-13
+
+ * src/subscribedialog.c: 更新した後非表示の購読グループが削除されて
+ いたバグを修正。ワイルドカードのないキーワードでワイルドカードを
+ 仮定するようにした。ニュースグループリストの取得を開始した時に
+ 状態を表示。
+
2005-12-09
* src/foldersel.c: FOLDER_SEL_ALL でトップフォルダも選択するように
diff --git a/src/subscribedialog.c b/src/subscribedialog.c
index 5002960b..c59443fb 100644
--- a/src/subscribedialog.c
+++ b/src/subscribedialog.c
@@ -456,6 +456,7 @@ static gboolean subscribe_create_branch(NewsGroupInfo *ginfo,
static void subscribe_dialog_set_list(const gchar *pattern, gboolean refresh)
{
+ gchar *pattern_;
GSList *cur;
GPatternSpec *pspec;
@@ -463,11 +464,20 @@ static void subscribe_dialog_set_list(const gchar *pattern, gboolean refresh)
locked = TRUE;
if (!pattern || *pattern == '\0')
- pattern = "*";
+ pattern_ = g_strdup("*");
+ else if (strchr(pattern, '*') == NULL)
+ pattern_ = g_strconcat("*", pattern, "*", NULL);
+ else
+ pattern_ = g_strdup(pattern);
if (refresh) {
ack = TRUE;
subscribe_clear();
+ if (pattern)
+ gtk_entry_set_text(GTK_ENTRY(entry), pattern);
+ gtk_label_set_text(GTK_LABEL(status_label),
+ _("Getting newsgroup list..."));
+ GTK_EVENTS_FLUSH();
recv_set_ui_func(subscribe_recv_func, NULL);
group_list = news_get_group_list(news_folder);
group_list = g_slist_reverse(group_list);
@@ -475,38 +485,38 @@ static void subscribe_dialog_set_list(const gchar *pattern, gboolean refresh)
statusbar_pop_all();
if (group_list == NULL && ack == TRUE) {
alertpanel_error(_("Can't retrieve newsgroup list."));
+ g_free(pattern_);
locked = FALSE;
return;
}
} else {
gtk_tree_store_clear(tree_store);
}
- gtk_entry_set_text(GTK_ENTRY(entry), pattern);
subscribe_hash_init();
- pspec = g_pattern_spec_new(pattern);
+ pspec = g_pattern_spec_new(pattern_);
for (cur = group_list; cur != NULL ; cur = cur->next) {
NewsGroupInfo *ginfo = (NewsGroupInfo *)cur->data;
GtkTreeIter iter;
+ if (g_slist_find_custom(subscribe_list, ginfo->name,
+ (GCompareFunc)g_ascii_strcasecmp)
+ != NULL)
+ ginfo->subscribed = TRUE;
+
if (g_pattern_match_string(pspec, ginfo->name)) {
- subscribe_create_branch(ginfo, pattern, &iter);
- if (g_slist_find_custom
- (subscribe_list, ginfo->name,
- (GCompareFunc)g_ascii_strcasecmp)
- != NULL) {
- ginfo->subscribed = TRUE;
+ subscribe_create_branch(ginfo, pattern_, &iter);
+ if (ginfo->subscribed)
gtk_tree_store_set(tree_store, &iter,
SUBSCRIBE_TOGGLE, TRUE, -1);
- }
}
}
g_pattern_spec_free(pspec);
-
subscribe_hash_free();
+ g_free(pattern_);
gtk_label_set_text(GTK_LABEL(status_label), _("Done."));