aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-rule.h
diff options
context:
space:
mode:
authorNot Zed <NotZed@HelixCode.com>2000-10-12 21:53:50 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-10-12 21:53:50 +0800
commitc308f5eeef858ef813205af508e8ef94a8208d62 (patch)
treef2bad01816b88533321c63e809c0d609549b8f74 /filter/filter-rule.h
parent80237e0c26dd375b0269dc2099d49fc3cd50a4f2 (diff)
downloadgsoc2013-evolution-c308f5eeef858ef813205af508e8ef94a8208d62.tar
gsoc2013-evolution-c308f5eeef858ef813205af508e8ef94a8208d62.tar.gz
gsoc2013-evolution-c308f5eeef858ef813205af508e8ef94a8208d62.tar.bz2
gsoc2013-evolution-c308f5eeef858ef813205af508e8ef94a8208d62.tar.lz
gsoc2013-evolution-c308f5eeef858ef813205af508e8ef94a8208d62.tar.xz
gsoc2013-evolution-c308f5eeef858ef813205af508e8ef94a8208d62.tar.zst
gsoc2013-evolution-c308f5eeef858ef813205af508e8ef94a8208d62.zip
Report the percentage of file complete for the filter.
2000-10-11 Not Zed <NotZed@HelixCode.com> * filter-driver.c (filter_driver_filter_mbox): Report the percentage of file complete for the filter. 2000-10-10 Not Zed <NotZed@HelixCode.com> * filter-driver.c (filter_driver_run): Why on earth does this code ref all these objects for? This is not right at all. (filter_driver_run): Changed source type to a string. (filter_driver_run): REmove the very weird exception copying stuff - just ref it instead. (do_score): (do_colour): (do_stop): (do_copy): (mark_forward): (do_delete): Removed bogus 'terminated' testing. This is NOT NEEDED HERE. It is tested after every rule/action, and termination only makes sense at that point. (filter_driver_filter_message): new funciton (renamed), filter only a message. (filter_driver_filter_mbox): Filter a whole mbox. (filter_driver_run): If we aren't given an info, create a simple one based on the message headers. (filter_driver_filter_message): Renamed from filter_driver_run(). (filter_driver_set_status_func): Set the status callback function. (filter_driver_set_default_folder): Set the default folder for filtering. (report_status): Internal function to report the status of a given event. (do_copy): Removed a pointless cache lookup - duh, we do it in open_folder anyway (infact, we do it in camel too!!). (filter_driver_filter_message): Removed pointless re-refing of arguments. Why would anyone think this could be any use at all? (filter_driver_filter_folder): New function to filter a whole folder. * filter-editor.c (rule_add): api fixes. (rule_edit): (rule_up): (rule_down): (set_sensitive): This didn't take into account the source, now it does. (select_source): Fix for api changes. Changed the rather generic 'number' argument to be 'source', and a string. (filter_editor_construct): Changed the 'number' to 'source', and set the string appropriately. Added a warning for one case where the glade file is out of sync. * score-editor.c (score_editor_construct): (rule_edit): (rule_delete): (rule_up): (rule_down): (set_sensitive): api fixes. * vfolder-editor.c (set_sensitive): Api fixes. (vfolder_editor_construct): (rule_edit): (vfolder_editor_construct): * rule-context.h (RCNextRuleFunc): Added a source argument. * rule-context.c (rule_context_next_rule): Added source argument. (rule_context_find_rule): Added source argument. (rule_context_get_rank_rule): Added source argument. (rule_context_get_rank_rule_with_source): Removed. (save): Fixed for changes to RCNextRuleFunc prototype. * filter-rule.h: Changed the source to be a string, removed the filter_source_t type. * filter-rule.c (filter_rule_set_source): New function to set the source of a rule. What idiot ran this code through indent? (filter_rule_find_list): Added a source argument. (filter_rule_next_list): Added a source argument. (get_widget): Fixed the wording. You dont remove search parts, you can only remove the last one. Why you even need to mention they are search 'criteria' is beyond me. Whoever added the scrolled window needs to be shot, its the single most awful GUI feature ever invented (ranks with the close button next to maximise). (xml_encode): Save source as a string (if present). (xml_decode): Likewise for loading & fixed a small memleak. (filter_rule_finalise): Free source. svn path=/trunk/; revision=5884
Diffstat (limited to 'filter/filter-rule.h')
-rw-r--r--filter/filter-rule.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/filter/filter-rule.h b/filter/filter-rule.h
index e1d5655050..8c6f9cf42b 100644
--- a/filter/filter-rule.h
+++ b/filter/filter-rule.h
@@ -39,21 +39,20 @@ enum _filter_grouping_t {
FILTER_GROUP_ANY /* any rule must match */
};
-enum _filter_source_t {
- FILTER_SOURCE_INCOMING, /* performed on incoming email */
- FILTER_SOURCE_DEMAND, /* performed on the selected folder
- * when the user asks for it */
- FILTER_SOURCE_OUTGOING /* performed on outgoing mail */
-};
+
+#define FILTER_SOURCE_INCOMING "incoming" /* performed on incoming email */
+#define FILTER_SOURCE_DEMAND "demand" /* performed on the selected folder
+ * when the user asks for it */
+#define FILTER_SOURCE_OUTGOING "outgoing"/* performed on outgoing mail */
struct _FilterRule {
GtkObject parent;
struct _FilterRulePrivate *priv;
char *name;
+ char *source;
enum _filter_grouping_t grouping;
- enum _filter_source_t source;
GList *parts;
};
@@ -76,6 +75,7 @@ FilterRule *filter_rule_new (void);
/* methods */
void filter_rule_set_name (FilterRule *fr, const char *name);
+void filter_rule_set_source (FilterRule *fr, const char *source);
xmlNodePtr filter_rule_xml_encode (FilterRule *fr);
int filter_rule_xml_decode (FilterRule *fr, xmlNodePtr node, struct _RuleContext *f);
@@ -92,8 +92,8 @@ void filter_rule_build_action(FilterRule *fr, GString *out);
*/
/* static functions */
-FilterRule *filter_rule_next_list (GList *l, FilterRule *last);
-FilterRule *filter_rule_find_list (GList *l, const char *name);
+FilterRule *filter_rule_next_list (GList *l, FilterRule *last, const char *source);
+FilterRule *filter_rule_find_list (GList *l, const char *name, const char *source);
#endif /* ! _FILTER_RULE_H */