#include "alertpanel.h"
#include "folder.h"
#include "scoring.h"
-#include "matcher_parser.h"
static struct Scoring {
GtkWidget *window;
ScoringProp *prop;
GSList * cur;
gchar * scoring_str;
+ gchar * tmp;
GSList * prefs_scoring;
if (cur_item == NULL)
while (gtk_clist_get_text(GTK_CLIST(scoring.cond_clist),
row, 0, &scoring_str)) {
if (strcmp(scoring_str, _("(New)")) != 0) {
- prop = matcher_parser_get_scoring(scoring_str);
+ tmp = scoring_str;
+ prop = scoringprop_parse(&tmp);
if (prop != NULL)
prefs_scoring = g_slist_append(prefs_scoring,
prop);
cond_str = gtk_entry_get_text(GTK_ENTRY(scoring.cond_entry));
if (*cond_str != '\0') {
- matchers = matcher_parser_get_cond(cond_str);
-
- if (matchers == NULL)
+ gchar * tmp;
+
+ tmp = cond_str;
+ matchers = matcherlist_parse(&tmp);
+ if (tmp == NULL)
alertpanel_error(_("Match string is not valid."));
}
gchar * score_str;
ScoringProp * prop;
gint score;
+ gchar * tmp;
cond_str = gtk_entry_get_text(GTK_ENTRY(scoring.cond_entry));
if (*cond_str == '\0') {
}
score = atoi(score_str);
- cond = matcher_parser_get_cond(cond_str);
+ tmp = cond_str;
+ cond = matcherlist_parse(&tmp);
- if (cond == NULL) {
+ if (tmp == NULL) {
alertpanel_error(_("Match string is not valid."));
return;
}
gchar * score_str;
ScoringProp * prop;
gint score;
+ gchar * tmp;
if (!clist->selection) return;
}
score = atoi(score_str);
- cond = matcher_parser_get_cond(cond_str);
+ tmp = cond_str;
+ cond = matcherlist_parse(&tmp);
- if (cond) {
+ if (tmp == NULL) {
alertpanel_error(_("Match string is not valid."));
return;
}
GdkEvent *event)
{
ScoringProp * prop;
+ gchar * tmp;
gchar * scoring_str;
row, 0, &scoring_str))
return;
- prop = matcher_parser_get_scoring(scoring_str);
- if (prop == NULL)
+ tmp = scoring_str;
+ prop = scoringprop_parse(&tmp);
+ if (tmp == NULL)
return;
prefs_scoring_select_set_dialog(prop);