diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-06 04:42:21 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-06 04:42:21 +0000 |
commit | bdb537c3d2ff230bf842678e49025180b7cdfa57 (patch) | |
tree | 8b4a364ef6631e026896d27542f9131cffb75de5 /src/summary_search.c | |
parent | 28ca8fe1e1fc59095d7cc303cae4fc559bc563bf (diff) |
added a function for minor code cleanup.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@874 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/summary_search.c')
-rw-r--r-- | src/summary_search.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/summary_search.c b/src/summary_search.c index 670a1b29..d3f80022 100644 --- a/src/summary_search.c +++ b/src/summary_search.c @@ -433,10 +433,8 @@ static FilterRule *summary_search_dialog_to_rule(const gchar *name, FilterBoolOp bool_op = FLT_OR; gboolean recursive; gboolean case_sens; - GSList *cond_list = NULL; - FilterCond *cond; + GSList *cond_list; FilterRule *rule; - GSList *cur; id = gtk_entry_get_text(GTK_ENTRY(search_window.folder_entry)); item_ = folder_find_item_from_identifier(id); @@ -452,24 +450,8 @@ static FilterRule *summary_search_dialog_to_rule(const gchar *name, case_sens = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(search_window.case_checkbtn)); - for (cur = search_window.cond_edit->cond_hbox_list; cur != NULL; - cur = cur->next) { - CondHBox *hbox = (CondHBox *)cur->data; - gchar *error_msg; - - cond = prefs_filter_edit_cond_hbox_to_cond(hbox, case_sens, - &error_msg); - if (cond) { - cond_list = g_slist_append(cond_list, cond); - } else { - if (!error_msg) - error_msg = _("Invalid condition exists."); - alertpanel_error("%s", error_msg); - filter_cond_list_free(cond_list); - return NULL; - } - } - + cond_list = prefs_filter_edit_cond_edit_to_list(search_window.cond_edit, + case_sens); if (!cond_list) return NULL; |