From 09a5b6b00a5ace026bf019e3a6eba905e4312d2d Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 16 Jul 2002 02:36:20 +0000 Subject: cvs remove. 2002-07-15 Not Zed * filter-score.[ch]: cvs remove. * filter-element.c: Remove reference to filter-score.h * vfoldertypes.xml: Fix label vfolder rule as below, also add score and size rules from filtertypes.xml. * filtertypes.xml (score): Use (cast-int (user-tag "score")) to get the value directly, rather than (get-score). (label): Use (user-tag "label") to get the value directly, rather than (get-label). The label is now a string too. * filter-label.c (filter_label_get_type): Make filter-label inherit from filter-option. Which makes more sense doesn't it ... surely. (validate): Removed, optionlists are self-validating. (xml_create): Initialise the list of options from our configuration database. If it isn't working, ignore it and set it up anyway. (filter_label_init): Override the xml type. (filter_label_count): (filter_label_label): (filter_label_index): Some helper functions for external interfaces. All of the mail config/etc should use this. * filter-option.c (free_option): (xml_create): (clone): Made the "value" type in glib memory rather than xml memory space. (filter_option_add): Utility function to add a new option to the list. (clone): Use above function to simplify code. (xml_create): Same here. (xml_encode): Allow subclasses to override the type. svn path=/trunk/; revision=17472 --- filter/filter-label.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'filter/filter-label.h') diff --git a/filter/filter-label.h b/filter/filter-label.h index 0e78b6d3c1..a348e88efb 100644 --- a/filter/filter-label.h +++ b/filter/filter-label.h @@ -29,7 +29,7 @@ extern "C" { #pragma } #endif /* __cplusplus */ -#include "filter-int.h" +#include "filter-option.h" #define FILTER_LABEL(obj) GTK_CHECK_CAST (obj, filter_label_get_type (), FilterLabel) #define FILTER_LABEL_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_label_get_type (), FilterLabelClass) @@ -39,11 +39,11 @@ typedef struct _FilterLabel FilterLabel; typedef struct _FilterLabelClass FilterLabelClass; struct _FilterLabel { - FilterInt parent; + FilterOption parent; }; struct _FilterLabelClass { - FilterIntClass parent_class; + FilterOptionClass parent_class; /* virtual methods */ @@ -54,6 +54,11 @@ GtkType filter_label_get_type (void); FilterLabel *filter_label_new (void); +/* Sigh, this is a mess, but its cleaner than the original mess */ +int filter_label_count(void); +const char *filter_label_label(int i); +int filter_label_index(const char *label); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit v1.2.3