Updated Hungarian translation
[evolution.git] / e-util / e-rule-editor.h
blob1bfca4973b67e858c8b77c69585a93a4c884fb34
1 /*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU Lesser General Public License as published by
4 * the Free Software Foundation.
6 * This program is distributed in the hope that it will be useful, but
7 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
8 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
9 * for more details.
11 * You should have received a copy of the GNU Lesser General Public License
12 * along with this program; if not, see <http://www.gnu.org/licenses/>.
15 * Authors:
16 * Not Zed <notzed@lostzed.mmc.com.au>
17 * Jeffrey Stedfast <fejj@ximian.com>
19 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
23 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
24 #error "Only <e-util/e-util.h> should be included directly."
25 #endif
27 #ifndef E_RULE_EDITOR_H
28 #define E_RULE_EDITOR_H
30 #include <gtk/gtk.h>
32 #include <e-util/e-rule-context.h>
33 #include <e-util/e-filter-rule.h>
35 /* Standard GObject macros */
36 #define E_TYPE_RULE_EDITOR \
37 (e_rule_editor_get_type ())
38 #define E_RULE_EDITOR(obj) \
39 (G_TYPE_CHECK_INSTANCE_CAST \
40 ((obj), E_TYPE_RULE_EDITOR, ERuleEditor))
41 #define E_RULE_EDITOR_CLASS(cls) \
42 (G_TYPE_CHECK_CLASS_CAST \
43 ((cls), E_TYPE_RULE_EDITOR, ERuleEditorClass))
44 #define E_IS_RULE_EDITOR(obj) \
45 (G_TYPE_CHECK_INSTANCE_TYPE \
46 ((obj), E_TYPE_RULE_EDITOR))
47 #define E_IS_RULE_EDITOR_CLASS(cls) \
48 (G_TYPE_CHECK_CLASS_TYPE \
49 ((cls), E_TYPE_RULE_EDITOR))
50 #define E_RULE_EDITOR_GET_CLASS(obj) \
51 (G_TYPE_INSTANCE_GET_CLASS \
52 ((obj), E_TYPE_RULE_EDITOR, ERuleEditorClass))
54 G_BEGIN_DECLS
56 typedef struct _ERuleEditor ERuleEditor;
57 typedef struct _ERuleEditorClass ERuleEditorClass;
58 typedef struct _ERuleEditorPrivate ERuleEditorPrivate;
60 struct _ERuleEditor {
61 GtkDialog parent;
63 GtkListStore *model;
64 GtkTreeView *list;
66 ERuleContext *context;
67 EFilterRule *current;
68 EFilterRule *edit; /* for editing/adding rules, so we only do 1 at a time */
70 GtkWidget *dialog;
72 gchar *source;
74 ERuleEditorPrivate *priv;
77 struct _ERuleEditorClass {
78 GtkDialogClass parent_class;
80 void (*set_sensitive) (ERuleEditor *editor);
81 void (*set_source) (ERuleEditor *editor,
82 const gchar *source);
84 EFilterRule * (*create_rule) (ERuleEditor *editor);
87 GType e_rule_editor_get_type (void) G_GNUC_CONST;
88 ERuleEditor * e_rule_editor_new (ERuleContext *context,
89 const gchar *source,
90 const gchar *label);
91 void e_rule_editor_construct (ERuleEditor *editor,
92 ERuleContext *context,
93 GtkBuilder *builder,
94 const gchar *source,
95 const gchar *label);
96 void e_rule_editor_set_source (ERuleEditor *editor,
97 const gchar *source);
98 void e_rule_editor_set_sensitive (ERuleEditor *editor);
99 EFilterRule * e_rule_editor_create_rule (ERuleEditor *editor);
101 G_END_DECLS
103 #endif /* E_RULE_EDITOR_H */