diff options
Diffstat (limited to 'mail/em-filter-folder-element.c')
-rw-r--r-- | mail/em-filter-folder-element.c | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c index 8e07ef9c8c..b705bbde25 100644 --- a/mail/em-filter-folder-element.c +++ b/mail/em-filter-folder-element.c @@ -34,26 +34,27 @@ #include "em-filter-folder-element.h" #include "mail/em-folder-selection-button.h" #include "mail/em-utils.h" +#include "filter/e-filter-part.h" #include "libedataserver/e-sexp.h" #include "e-util/e-error.h" #define d(x) -static gboolean validate(FilterElement *fe, GtkWindow *error_parent); -static gint folder_eq(FilterElement *fe, FilterElement *cm); -static void xml_create(FilterElement *fe, xmlNodePtr node); -static xmlNodePtr xml_encode(FilterElement *fe); -static gint xml_decode(FilterElement *fe, xmlNodePtr node); -static GtkWidget *get_widget(FilterElement *fe); -static void build_code(FilterElement *fe, GString *out, struct _FilterPart *ff); -static void format_sexp(FilterElement *, GString *); -static void emff_copy_value(FilterElement *de, FilterElement *se); +static gboolean validate(EFilterElement *fe, GtkWindow *error_parent); +static gint folder_eq(EFilterElement *fe, EFilterElement *cm); +static void xml_create(EFilterElement *fe, xmlNodePtr node); +static xmlNodePtr xml_encode(EFilterElement *fe); +static gint xml_decode(EFilterElement *fe, xmlNodePtr node); +static GtkWidget *get_widget(EFilterElement *fe); +static void build_code(EFilterElement *fe, GString *out, EFilterPart *ff); +static void format_sexp(EFilterElement *, GString *); +static void emff_copy_value(EFilterElement *de, EFilterElement *se); static void em_filter_folder_element_class_init(EMFilterFolderElementClass *class); static void em_filter_folder_element_init(EMFilterFolderElement *ff); static void em_filter_folder_element_finalise(GObject *obj); -static FilterElementClass *parent_class = NULL; +static EFilterElementClass *parent_class = NULL; GType em_filter_folder_element_get_type(void) @@ -73,7 +74,7 @@ em_filter_folder_element_get_type(void) (GInstanceInitFunc)em_filter_folder_element_init, }; - type = g_type_register_static(FILTER_TYPE_ELEMENT, "EMFilterFolderElement", &info, 0); + type = g_type_register_static(E_TYPE_FILTER_ELEMENT, "EMFilterFolderElement", &info, 0); } return type; @@ -83,9 +84,9 @@ static void em_filter_folder_element_class_init(EMFilterFolderElementClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); - FilterElementClass *fe_class = FILTER_ELEMENT_CLASS(klass); + EFilterElementClass *fe_class = E_FILTER_ELEMENT_CLASS(klass); - parent_class = g_type_class_ref(FILTER_TYPE_ELEMENT); + parent_class = g_type_class_ref(E_TYPE_FILTER_ELEMENT); object_class->finalize = em_filter_folder_element_finalise; @@ -138,7 +139,7 @@ em_filter_folder_element_set_value(EMFilterFolderElement *ff, const gchar *uri) } static gboolean -validate(FilterElement *fe, GtkWindow *error_parent) +validate(EFilterElement *fe, GtkWindow *error_parent) { EMFilterFolderElement *ff = (EMFilterFolderElement *)fe; @@ -152,21 +153,21 @@ validate(FilterElement *fe, GtkWindow *error_parent) } static gint -folder_eq(FilterElement *fe, FilterElement *cm) +folder_eq(EFilterElement *fe, EFilterElement *cm) { - return FILTER_ELEMENT_CLASS(parent_class)->eq(fe, cm) + return E_FILTER_ELEMENT_CLASS(parent_class)->eq(fe, cm) && strcmp(((EMFilterFolderElement *)fe)->uri, ((EMFilterFolderElement *)cm)->uri)== 0; } static void -xml_create(FilterElement *fe, xmlNodePtr node) +xml_create(EFilterElement *fe, xmlNodePtr node) { /* parent implementation */ - FILTER_ELEMENT_CLASS(parent_class)->xml_create(fe, node); + E_FILTER_ELEMENT_CLASS(parent_class)->xml_create(fe, node); } static xmlNodePtr -xml_encode(FilterElement *fe) +xml_encode(EFilterElement *fe) { xmlNodePtr value, work; EMFilterFolderElement *ff = (EMFilterFolderElement *)fe; @@ -187,7 +188,7 @@ xml_encode(FilterElement *fe) } static gint -xml_decode(FilterElement *fe, xmlNodePtr node) +xml_decode(EFilterElement *fe, xmlNodePtr node) { EMFilterFolderElement *ff = (EMFilterFolderElement *)fe; xmlNodePtr n; @@ -240,7 +241,7 @@ folder_selected(EMFolderSelectionButton *button, EMFilterFolderElement *ff) } static GtkWidget * -get_widget(FilterElement *fe) +get_widget(EFilterElement *fe) { EMFilterFolderElement *ff = (EMFilterFolderElement *)fe; GtkWidget *button; @@ -266,13 +267,13 @@ get_widget(FilterElement *fe) } static void -build_code(FilterElement *fe, GString *out, struct _FilterPart *ff) +build_code(EFilterElement *fe, GString *out, EFilterPart *ff) { return; } static void -format_sexp(FilterElement *fe, GString *out) +format_sexp(EFilterElement *fe, GString *out) { EMFilterFolderElement *ff = (EMFilterFolderElement *)fe; @@ -280,7 +281,7 @@ format_sexp(FilterElement *fe, GString *out) } static void -emff_copy_value(FilterElement *de, FilterElement *se) +emff_copy_value(EFilterElement *de, EFilterElement *se) { if (EM_IS_FILTER_FOLDER_ELEMENT(se)) { ((EMFilterFolderElement *)de)->store_camel_uri = ((EMFilterFolderElement *)se)->store_camel_uri; |