aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-02-07 06:38:49 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-02-07 06:38:49 +0000
commitaeaa6a865751f617c0b5f201016857f61e115252 (patch)
tree7c1619e001eb5f4eb81f152a854aa7dba7e3d478 /src
parent57d3cf597bc3161b682906beac134d80f6f9b8d7 (diff)
fixed saved search.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1532 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/prefs_filter.c10
-rw-r--r--src/prefs_filter.h4
-rw-r--r--src/prefs_filter_edit.c19
-rw-r--r--src/query_search.c6
4 files changed, 20 insertions, 19 deletions
diff --git a/src/prefs_filter.c b/src/prefs_filter.c
index 893fc024..05d00483 100644
--- a/src/prefs_filter.c
+++ b/src/prefs_filter.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2005 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -86,8 +86,6 @@ static void prefs_filter_set_list_row (GtkTreeIter *iter,
FilterRule *rule,
gboolean move_view);
-static void prefs_filter_write_user_header_list (void);
-
static void prefs_filter_set_list (void);
/* callback functions */
@@ -431,7 +429,8 @@ static void prefs_filter_set_list_row(GtkTreeIter *iter, FilterRule *rule,
\
if (!g_hash_table_lookup(table, header->name)) { \
g_hash_table_insert(table, header->name, header); \
- list = g_slist_append(list, header); \
+ list = procheader_add_header_list \
+ (list, header->name, header->body); \
} \
}
@@ -564,7 +563,7 @@ void prefs_filter_set_header_list(MsgInfo *msginfo)
prefs_filter_set_msg_header_list(msginfo);
}
-static void prefs_filter_write_user_header_list(void)
+void prefs_filter_write_user_header_list(void)
{
gchar *path;
PrefFile *pfile;
@@ -822,7 +821,6 @@ static gboolean prefs_filter_key_pressed(GtkWidget *widget, GdkEventKey *event,
static void prefs_filter_close(void)
{
prefs_filter_set_msg_header_list(NULL);
- prefs_filter_write_user_header_list();
prefs_filter_set_list();
filter_write_config();
gtk_widget_hide(rule_list_window.window);
diff --git a/src/prefs_filter.h b/src/prefs_filter.h
index 08efb43c..72b311ad 100644
--- a/src/prefs_filter.h
+++ b/src/prefs_filter.h
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2005 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -40,4 +40,6 @@ void prefs_filter_set_header_list (MsgInfo *msginfo);
void prefs_filter_set_user_header_list (GSList *list);
void prefs_filter_set_msg_header_list (MsgInfo *msginfo);
+void prefs_filter_write_user_header_list (void);
+
#endif /* __PREFS_FILTER_H__ */
diff --git a/src/prefs_filter_edit.c b/src/prefs_filter_edit.c
index 5a057c12..89da8e9d 100644
--- a/src/prefs_filter_edit.c
+++ b/src/prefs_filter_edit.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -345,7 +345,7 @@ void prefs_filter_edit_clear_cond_edit(FilterCondEdit *cond_edit)
prefs_filter_edit_remove_cond_hbox(cond_edit, hbox);
}
- g_slist_free(cond_edit->hdr_list);
+ procheader_header_list_destroy(cond_edit->hdr_list);
cond_edit->hdr_list = NULL;
procheader_header_list_destroy(cond_edit->rule_hdr_list);
cond_edit->rule_hdr_list = NULL;
@@ -407,7 +407,7 @@ void prefs_filter_edit_set_header_list(FilterCondEdit *cond_edit,
GSList *cur;
FilterCond *cond;
- g_slist_free(cond_edit->hdr_list);
+ procheader_header_list_destroy(cond_edit->hdr_list);
cond_edit->hdr_list = NULL;
procheader_header_list_destroy(cond_edit->rule_hdr_list);
cond_edit->rule_hdr_list = NULL;
@@ -429,21 +429,21 @@ void prefs_filter_edit_set_header_list(FilterCondEdit *cond_edit,
}
cond_edit->rule_hdr_list = rule_hdr_list;
- cond_edit->hdr_list = procheader_merge_header_list(list, rule_hdr_list);
+ cond_edit->hdr_list = procheader_merge_header_list_dup(list,
+ rule_hdr_list);
}
static void prefs_filter_edit_update_header_list(FilterCondEdit *cond_edit)
{
GSList *list;
- g_slist_free(cond_edit->hdr_list);
+ procheader_header_list_destroy(cond_edit->hdr_list);
cond_edit->hdr_list = NULL;
list = prefs_filter_get_header_list();
- cond_edit->hdr_list = list;
-
- cond_edit->hdr_list =
- procheader_merge_header_list(list, cond_edit->rule_hdr_list);
+ cond_edit->hdr_list = procheader_merge_header_list_dup
+ (list, cond_edit->rule_hdr_list);
+ procheader_header_list_destroy(list);
}
CondHBox *prefs_filter_edit_cond_hbox_create(FilterCondEdit *cond_edit)
@@ -1633,6 +1633,7 @@ static void prefs_filter_edit_edit_header_list(FilterCondEdit *cond_edit)
CondHBox *hbox = (CondHBox *)cur->data;
prefs_filter_edit_set_cond_header_menu(cond_edit, hbox);
}
+ prefs_filter_write_user_header_list();
}
gtk_widget_destroy(edit_header_list_dialog.window);
diff --git a/src/query_search.c b/src/query_search.c
index 8114c32d..75198d6a 100644
--- a/src/query_search.c
+++ b/src/query_search.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -149,9 +149,9 @@ static gboolean row_selected (GtkTreeSelection *selection,
gboolean cur_selected,
gpointer data);
-static void query_search_clear (GtkButton *button,
+static void query_search_clear (GtkButton *button,
gpointer data);
-static void query_select_folder (GtkButton *button,
+static void query_select_folder (GtkButton *button,
gpointer data);
static void query_search_clicked (GtkButton *button,
gpointer data);