aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-element.c
Commit message (Collapse)AuthorAgeFilesLines
* Update FSF address in header comments (#469886). Patch from TobiasMatthew Barnes2007-09-021-2/+2
| | | | | | | | | | 2007-09-02 Matthew Barnes <mbarnes@redhat.com> * Update FSF address in header comments (#469886). Patch from Tobias Mueller. svn path=/trunk/; revision=34151
* Fix compilation warnings in filter directory (#439118).Matthew Barnes2007-06-031-1/+1
| | | | svn path=/trunk/; revision=33624
* ** Fixes bug #373116Matthew Barnes2007-04-021-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-04-01 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #373116 * calendar/gui/calendar-component.c (ensure_sources): * calendar/gui/e-cal-model.c (ecm_get_color_for_component): * calendar/gui/memos-component.c (ensure_sources): * calendar/gui/migration.c (create_calendar_contact_source), (create_calendar_sources), (create_task_sources), (create_memo_sources), (add_gw_esource): * calendar/gui/tasks-component.c (ensure_sources): * plugins/groupwise-account-setup/camel-gw-listener.c (add_esource): Use the new ESource color API. * calendar/gui/dialogs/cal-prefs-dialog.c: * calendar/gui/dialogs/cal-prefs-dialog.glade: * calendar/gui/dialogs/calendar-setup.c: * calendar/gui/dialogs/calendar-setup.glade: * filter-colour.c (get_widget): * mail/em-composer-prefs.c: * mail/em-composer-prefs.h: * mail/em-mailer-prefs.c: * mail/em-mailer-prefs.h: * mail/mail-config.glade: Migrate from GnomeColorPicker to GtkColorButton. * filter/filter-colour.h: Store color as a GdkColor instead of separate RGBA components. * filter/filter-colour.c (color_eq): Use gdk_color_equal() to compare colors. * filter/filter-colour.c (xml_encode): Encode color as a single property ("spec"). * filter/filter-colour.c (xml_decode): Read the color from a single property ("spec"). Provide a migration path for old XML files. * calendar/gui/calendar-component.c (calendar_config_get_tasks_due_today_color), (calendar_config_get_tasks_overdue_color): Return a GdkColor instead of an X color specification. * calendar/gui/calendar-component.c (calendar_config_set_tasks_due_today_color), (calendar_config_set_tasks_overdue_color): Accept a GdkColor instead of an X color specification. * calenar/gui/e-cal-model-tasks.c (ecmt_get_color_for_component): Adapt to modified color API in calendar-component.c by converting the GdkColor to an X color specification. This is an ugly hack to be fixed later. svn path=/trunk/; revision=33349
* Remove unused code Move around some code to avoid unneccesary prototypes.Kjartan Maraas2006-02-081-2/+0
| | | | | | | | | | | 2006-01-27 Kjartan Maraas <kmaraas@gnome.org> * filter-element.c: (filter_element_get_type): Remove unused code * rule-editor.c: (rule_editor_add_undo), (rule_editor_play_undo), (editor_response), (set_source): Move around some code to avoid unneccesary prototypes. svn path=/trunk/; revision=31447
* ** See #59885.Not Zed2004-06-171-74/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-06-17 Not Zed <NotZed@Ximian.com> ** See #59885. ** Moved all of the mailer specific filter stuff into mail/*. * filter-element.c (copy_value): implement for base types. * filter-element.c (filter_element_copy_value): do this as a virtual method. * filter.glade: moved the vfolder stuff to mail/ * libfilter-i18n.h: removed, moved to mailer. * filter-errors.xml: moved the vfolder/filtering errors to the mail error file. * Makefile.am (EXTRA_DIST): moved *types.xml to mail. (INCLUDES): removed a bunch of mail dependencies. * filter-*.[ch], vfolder-*.[ch]: Moved all mail related filter and vfolder stuff to mail directory. * score-*.[ch]: Removed all of it. * vfolder-context.c (vfolder_new_element): and for vfolders. * filter-context.c (filter_new_element): implement for filter element types. * rule-context.c (rc_new_element): replacement for old filter_element_new_type_name. only has the basics. * filter-part.c (filter_part_xml_create): take a rule context as an argument & and look up the element name off the context. * rule-context.c (rule_context_new_element): new virtual method to get an element for a given name. * filter-element.c (filter_element_new_type_name): removed. svn path=/trunk/; revision=26379
* Fixes for bug #39170Jeffrey Stedfast2003-03-061-3/+3
| | | | | | | | | | | | | 2003-03-06 Jeffrey Stedfast <fejj@ximian.com> Fixes for bug #39170 * filter-element.c (filter_element_xml_create): Remove return keyword. (filter_element_build_code): Same. (filter_element_format_sexp): Here too. svn path=/trunk/; revision=20189
* more build fixesJeffrey Stedfast2002-11-061-1/+1
| | | | svn path=/trunk/; revision=18577
* some build fixesJeffrey Stedfast2002-11-061-1/+1
| | | | svn path=/trunk/; revision=18575
* Ported.Jeffrey Stedfast2002-11-051-1/+1
| | | | | | | | 2002-11-04 Jeffrey Stedfast <fejj@ximian.com> * filter-part.c: Ported. svn path=/trunk/; revision=18540
* Ported to GObject.Jeffrey Stedfast2002-11-021-71/+65
| | | | | | | | | | | | | | 2002-11-01 Jeffrey Stedfast <fejj@ximian.com> * filter-element.c: Ported to GObject. * filter-input.c: Same. * filter-code.c: This too. * filter-colour.c: And this. svn path=/trunk/; revision=18492
* Use fs->type in xmlGetProp since we already free'd 'type'. Fixes bugJeffrey Stedfast2002-07-271-7/+4
| | | | | | | | | 2002-07-26 Jeffrey Stedfast <fejj@ximian.com> * filter-int.c (xml_decode): Use fs->type in xmlGetProp since we already free'd 'type'. Fixes bug #28113. svn path=/trunk/; revision=17622
* Changelog is pending some other patch approval so i'm not commiting.Not Zed2002-07-151-1/+0
| | | | | | | | | | 2002-07-15 Not Zed <NotZed@Ximian.com> * filter-score.[ch]: cvs remove. * filter-element.c: Remove reference to filter-score.h svn path=/trunk/; revision=17454
* ** fixes for #10781Not Zed2002-07-151-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-07-10 Not Zed <NotZed@Ximian.com> ** fixes for #10781 * filter-int.c (xml_encode): (xml_decode): Handle encoding/decoding with a type name, in a manner compatible with the score/label elemtns. (filter_int_new_type): New constructor to create a generic 'int' type. * filter-score.c: Removed. Now relies on using a filter-int with appropriate settings. * filter-label.[ch]: Now inherits from filter-int. * rule-context.c (rule_context_revert): New method to revert a filter context back to a user-file's definition. (revert): implementation. * filter-rule.h: Added new virtual method _eq and wrapper, and fixed all subclasses to implement it. * filter-element.h: Added new virtual method _eq and wrapper. Fixed all subclasses to implement it. svn path=/trunk/; revision=17448
* Make the sound type for (play-sound ) a "file" type rather than "string"Jeffrey Stedfast2002-07-091-0/+2
| | | | | | | | | | | | | | | | | 2002-07-08 Jeffrey Stedfast <fejj@ximian.com> * filtertypes.xml: Make the sound type for (play-sound ) a "file" type rather than "string" since users will want to use a filesel to select it most likely. Fixes bug #26921. * filter-file.c (validate): If the type is "file" check that it is a valid file, otheriwse if it is a command-line just ignore it for now. * filter-element.c (filter_element_new_type_name): A filter type of "file" should also use the filter-file object. svn path=/trunk/; revision=17385
* Added a label definition.Jeffrey Stedfast2002-05-171-0/+3
| | | | | | | | | | | | | | | | | 2002-05-16 Jeffrey Stedfast <fejj@ximian.com> * vfoldertypes.xml: Added a label definition. * filtertypes.xml: Added a label definition. * filter-label.c: New filter widget for labels. * filter-element.c (filter_element_new_type_name): Add support for the new label widget. * filter-int.c (format_sexp): Fixed a memory leak. svn path=/trunk/; revision=16936
* Add filter-file.[c,h] to the build.Jeffrey Stedfast2002-05-101-0/+3
| | | | | | | | | | | | | 2002-05-09 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Add filter-file.[c,h] to the build. * filtertypes.xml: Add a "Command" filter rule. * filter-element.c (filter_element_new_type_name): Add support for type "command" which uses the new FilterFile widget. svn path=/trunk/; revision=16739
* Remove the #ifndef SHELL part. Use an EvolutionFolderSelectorButton.Dan Winship2002-04-051-1/+1
| | | | | | | | | | | | | | | | * filter-folder.c: Remove the #ifndef SHELL part. Use an EvolutionFolderSelectorButton. Remove FilterFolder->name since it's no longer needed. * filter-context.c (filter_rename_uri): Update for removal of FilterFolder->name. * filter-element.c (filter_element_copy_value): Likewise. * vfolder-rule.c (source_add): Update for evolution_shell_client_user_select_folder API change. svn path=/trunk/; revision=16354
* Copy values across to new part.Not Zed2002-02-261-0/+59
| | | | | | | | | | | | | | | | | | 2002-02-26 Not Zed <NotZed@Ximian.com> * filter-filter.c (option_activate): Copy values across to new part. * filter-rule.c (option_activate): copy values across to new part, if they are compatible. * filter-element.c (filter_element_copy_value): New function to copy values (where they can be) from one filter element to another. * filter-part.c (filter_part_copy_values): New function to copy values of a filter part. #1359. svn path=/trunk/; revision=15841
* Fixing the license text.Ettore Perazzoli2001-10-281-11/+11
| | | | svn path=/trunk/; revision=14215
* use xmlStrdup rather than g_strdupRadek Doulik2001-08-081-1/+1
| | | | | | | | | | | 2001-08-08 Radek Doulik <rodo@ximian.com> * filter-source.c (clone): use xmlStrdup rather than g_strdup * filter-element.c (filter_element_finalise): don't mix g_free and xmlAlloc svn path=/trunk/; revision=11788
* Properly free the list of parts, and the private data.Not Zed2001-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-07 Not Zed <NotZed@Ximian.com> * filter-rule.c (filter_rule_finalise): Properly free the list of parts, and the private data. (FilterRulePrivate): Remove unused 'parts' member. * filter-option.c (free_option): For freeing options. (filter_option_finalise): Free options list. * filter-element.c (filter_element_finalise): free name. * filter-input.c (filter_input_finalise): Free type and values list. * filter-context.c (filter_context_finalise): Free the actions. * rule-context.c (rule_context_finalise): Remove the totally weird arsed *_set_list free code. (free_part_set): (free_rule_set): Use this to free stuff using g_list_foreach. (rule_context_finalise): Free the error string. (rule_context_finalise): Free the rules and parts. svn path=/trunk/; revision=11774
* Added an integer type for filtering values. used for size.Sam Creasey2001-07-031-0/+3
| | | | | | | | | | | | 2001-07-02 Sam Creasey <sammy@oh.verio.com> * filter-int.c: Added an integer type for filtering values. used for size. * Makefile.am (SOURCES): added filter-int.c, filter-int.h * filtertypes.xml: added a part entry for size based filters svn path=/trunk/; revision=10717
* Update the copyrights, replacing Helix Code with Ximian andEttore Perazzoli2001-06-231-1/+1
| | | | | | helixcode.com with ximian.com all over the place. svn path=/trunk/; revision=10440
* Make the (previously unused) get-source command actually do the rightJon Trowbridge2001-04-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | 2001-04-13 Jon Trowbridge <trow@gnu.org> * camel-filter-search.c (get_source): Make the (previously unused) get-source command actually do the right thing, properly shrouding any passed-in source and falling back to use the source attached to the mime message. 2001-04-13 Jon Trowbridge <trow@gnu.org> * filtertypes.xml: Add XML specs for source account filtering. * filter-element.c (filter_element_new_type_name): Recognize type "source", construct a FilterSource. * filter-source.c: Added. A FilterElement for the account e-mail comes from. svn path=/trunk/; revision=9304
* Fix headers. Remove unneccesary ones and replace with more finegrainedKjartan Maraas2001-03-301-2/+3
| | | | | | | | | 2001-03-30 Kjartan Maraas <kmaraas@gnome.org> * *.*: Fix headers. Remove unneccesary ones and replace with more finegrained ones where needed. svn path=/trunk/; revision=9028
* If the filter type is a "system-flag", use the optionlist type as typeJeffrey Stedfast2001-03-181-1/+1
| | | | | | | | | | | 2001-03-17 Jeffrey Stedfast <fejj@ximian.com> * filter-element.c (filter_element_new_type_name): If the filter type is a "system-flag", use the optionlist type as type system-flag has been removed. This should allow backward compatability. svn path=/trunk/; revision=8785
* Removed filter-url.[c,h] and filter-system-flag.[c,h]Jeffrey Stedfast2001-03-171-6/+0
| | | | | | | | | | | | | | | | | | | 2001-03-16 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Removed filter-url.[c,h] and filter-system-flag.[c,h] * filter-element.c (filter_element_new_type_name): Removed references to the url-type and system-flag types. * filtertypes.xml: Removed "source" type and fixed "status" to use the optionmenu. * filter-url.[c,h]: Removed. * filter-system-flag.[c,h]: Removed (just use optionmenu). svn path=/trunk/; revision=8768
* Add #include <config.h> and mark some strings for translation.Kjartan Maraas2001-02-051-0/+4
| | | | | | | | | | | 2001-02-05 Kjartan Maraas <kmaraas@gnome.org> * filter-code.c, filter-colour.c, filter-context.c, filter-element.c, filter-input.c, filter-score.c, filter-system-flag.c, filter-url.c: Add #include <config.h> and mark some strings for translation. svn path=/trunk/; revision=7967
* Added support for the system-flag type.Jeffrey Stedfast2000-12-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-01 Jeffrey Stedfast <fejj@helixcode.com> * filter-element.c (filter_element_new_type_name): Added support for the system-flag type. * Makefile.am: Added filter-system-flag.[c,h]. * filter-system-flag.[c,h]: New type for system flags. * filtertypes.xml: Oops, looks like we were still using integers as arguments to set-flag. Change over to using strings which are safer and also change the name to set-system-flag. * filter-driver.c (do_flag): Use strings instead of integers. Instead of set-flag, the callback is now set-system-flag for less confusion. Sorry Ettore, but you'll have to change your filters. * filtertypes.xml: Added system-flags stuff. * vfoldertypes.xml: And here too. * filter-message-search.c (system_flag): New ESExp callback for filtering on system flags. svn path=/trunk/; revision=6764
* Moved the regex filter rule around - we've changed the format a bit.Jeffrey Stedfast2000-11-281-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-27 Jeffrey Stedfast <fejj@helixcode.com> * filtertypes.xml: Moved the regex filter rule around - we've changed the format a bit. * filter-option.c (option_activate): Removed. (get_widget): Don't connect the activate signal. * filter-folder.c (validate): Updated. * filter-datespec.c (validate): Updated. * filter-part.c (filter_part_validate): Updated. * filter-input.c (validate): Check the filter-input type - if it's of type "regex", then check for regex validity. * filter-element.c (filter_element_validate): No longer takes a gpointer argument. (filter_element_new_type_name): Allow type "regex" and create a new filter-input with type "regex". 2000-11-24 Michael Meeks <michael@helixcode.com> * filter-message-search.c (get_full_header): impl. (header_full_regex): use it. 2000-11-23 Michael Meeks <michael@helixcode.com> * filter-message-search.c (header_full_regex): impl. svn path=/trunk/; revision=6685
* Updated to add an action to set message flags.Jeffrey Stedfast2000-11-011-0/+6
| | | | | | | | | | | | | | | | | 2000-10-31 Jeffrey Stedfast <fejj@helixcode.com> * filtertypes.xml: Updated to add an action to set message flags. * filter-driver.c (do_flag): New callback to set message info flags. * filter-element.c (filter_element_set_data): New convenience function to set the data on a FilterElement. * filter-url.c (get_widget): Set the sources list to point to the FilterElement data. svn path=/trunk/; revision=6298
* If a regex option is selected, change the FilterElement data to TRUE elseJeffrey Stedfast2000-10-311-2/+14
| | | | | | | | | | | | | | | | | | | | | | 2000-10-30 Jeffrey Stedfast <fejj@helixcode.com> * filter-option.c (option_activate): If a regex option is selected, change the FilterElement data to TRUE else set to FALSE. * filter-rule.c (more_parts): Validate the previously entered FilterPart before allowing the user to add a new FilterPart. * filter-part.c (filter_part_validate): New convenience function to validate an entire FilterPart expression. * filter-input.c (validate): Validate the entry text if it contains a regular expression. * filter-element.[c,h]: New virtual function to validate the contents of the FilterElement (useful for regex and sexp). (filter_element_validate): You get the idea... svn path=/trunk/; revision=6285
* Readded Source url stuff.Jeffrey Stedfast2000-10-261-0/+3
| | | | | | | | | | | | | | | 2000-10-26 Jeffrey Stedfast <fejj@helixcode.com> * filtertypes.xml: Readded Source url stuff. * filter-element.c (filter_element_new_type_name): Added url stuff back in. * filter-url.[c,h]: Back from the dead... * Makefile.am: Re-added filter-url.[c,h]. svn path=/trunk/; revision=6200
* Remove filter-url code.Jeffrey Stedfast2000-10-251-3/+0
| | | | | | | | | | | | | | 2000-10-24 Jeffrey Stedfast <fejj@helixcode.com> * filter-element.c (filter_element_new_type_name): Remove filter-url code. * filter-url.[c,h]: What was I smoking? There's no good reason to filter on source urls as there are other ways to get the same effect. Thanks to both Zucchi and Miguel for helping me see this :-) svn path=/trunk/; revision=6158
* Added filter-url.[c,h].Jeffrey Stedfast2000-10-211-33/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-10-20 Jeffrey Stedfast <fejj@helixcode.com> * Makefile.am: Added filter-url.[c,h]. * filter-message-search.c (get_source): New callback to get the source url of the message being filtered. (filter_message_search): Now takes a source argument. * filter-element.c (filter_element_new_type_name): Added code to handle URL types. * filter-url.[c,h]: New filter object to handle URLs (ie in the case of filtering on source url). FIXME: find a way to populate the source combo box (including mail-config.h breaks the build in the addressbook - how does including mail-tools.h not break the build???) * filtertypes.xml: Added the source filter type and added the move-to action. * filter-driver.c (do_move): New callback, a "Copy" action should just copy the message to another location while a Move should both copy the message to a new location and delete it from the source location. (do_delete): Set the deleted flag on the message info. (filter_driver_filter_message): Now returns void as we don't care if it was copied or not in the caller functions. Also check the CamelMessageInfo being passed in - if the message has been marked as deleted prior to being filtered, then return immediately as we don't want to apply filter actions to deleted messages. svn path=/trunk/; revision=6094
* Added scoring xml stuffsJeffrey Stedfast2000-09-091-14/+17
| | | | | | | | | | | | | | | | | | | | | | 2000-09-08 Jeffrey Stedfast <fejj@helixcode.com> * filtertypes.xml: Added scoring xml stuffs * Makefile.am: added filter-score.[c,h] * filter-score.[c,h]: New functions to handle the "score" filter type. * filter-element.c (filter_element_new_type_name): Added support for "score" type. * filter-driver.c (do_score): New ESExp callback for filter actions to set the score on a message. * filter-message-search.c (get_score): New ESExp callback for getting the score tag as an integer value. svn path=/trunk/; revision=5274
* Allow filtering / vfoldering based on time or datePeter Williams2000-08-161-0/+3
| | | | svn path=/trunk/; revision=4843
* ** Almost a total rewrite of every file, except for filter-driver whichNot Zed2000-07-301-0/+264
2000-07-30 Not Zed <NotZed@HelixCode.com> ** Almost a total rewrite of every file, except for filter-driver which just had minor updates. The rule format has changed. svn path=/trunk/; revision=4418