aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-filter-bar.h
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-filter-bar.h')
-rw-r--r--widgets/misc/e-filter-bar.h77
1 files changed, 38 insertions, 39 deletions
diff --git a/widgets/misc/e-filter-bar.h b/widgets/misc/e-filter-bar.h
index e1d4fc7def..edc20e2fec 100644
--- a/widgets/misc/e-filter-bar.h
+++ b/widgets/misc/e-filter-bar.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef __E_FILTER_BAR_H__
-#define __E_FILTER_BAR_H__
+#ifndef E_FILTER_BAR_H
+#define E_FILTER_BAR_H
#include <gtk/gtk.h>
#include <camel/camel-vee-folder.h>
@@ -32,11 +32,6 @@
#include "filter/rule-context.h"
#include "filter/filter-rule.h"
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
/* EFilterBar - A filter rule driven search bar.
*
* The following arguments are available:
@@ -47,14 +42,29 @@ extern "C" {
* state string RW XML string representing the state.
*/
-#define E_FILTER_BAR_TYPE (e_filter_bar_get_type ())
-#define E_FILTER_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_FILTER_BAR_TYPE, EFilterBar))
-#define E_FILTER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_FILTER_BAR_TYPE, EFilterBarClass))
-#define E_IS_FILTER_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_FILTER_BAR_TYPE))
-#define E_IS_FILTER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_FILTER_BAR_TYPE))
-
-typedef struct _EFilterBar EFilterBar;
-typedef struct _EFilterBarClass EFilterBarClass;
+/* Standard GObject macros */
+#define E_TYPE_FILTER_BAR \
+ (e_filter_bar_get_type ())
+#define E_FILTER_BAR(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_FILTER_BAR, EFilterBar))
+#define E_FILTER_BAR_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_FILTER_BAR, EFilterBarClass))
+#define E_IS_FILTER_BAR(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_FILTER_BAR))
+#define E_IS_FILTER_BAR_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((obj), E_TYPE_FILTER_BAR))
+#define E_FILTER_BAR_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_FILTER_BAR, EFilterBarClass))
+
+G_BEGIN_DECLS
+
+typedef struct _EFilterBar EFilterBar;
+typedef struct _EFilterBarClass EFilterBarClass;
typedef void (*EFilterBarConfigRule)(EFilterBar *, FilterRule *rule, int id, const char *query, void *data);
@@ -82,8 +92,7 @@ struct _EFilterBar {
CamelOperation *account_search_cancel;
};
-struct _EFilterBarClass
-{
+struct _EFilterBarClass {
ESearchBarClass parent_class;
};
@@ -104,10 +113,10 @@ enum {
#define E_FILTERBAR_SAVE { N_("_Save Search..."), E_FILTERBAR_SAVE_ID, 0 }
#define E_FILTERBAR_EDIT { N_("_Edit Saved Searches..."), E_FILTERBAR_EDIT_ID, 0 }
#define E_FILTERBAR_ADVANCED { N_("_Advanced Search..."), E_FILTERBAR_ADVANCED_ID, 0 }
-#define E_FILTERBAR_ALL_ACCOUNTS { N_("All Accounts"), E_FILTERBAR_ALL_ACCOUNTS_ID, ESB_ITEMTYPE_RADIO }
-#define E_FILTERBAR_CURRENT_ACCOUNT { N_("Current Account"), E_FILTERBAR_CURRENT_ACCOUNT_ID, ESB_ITEMTYPE_RADIO }
-#define E_FILTERBAR_CURRENT_FOLDER { N_("Current Folder"), E_FILTERBAR_CURRENT_FOLDER_ID, ESB_ITEMTYPE_RADIO }
-#define E_FILTERBAR_CURRENT_MESSAGE { N_("Current Message"), E_FILTERBAR_CURRENT_MESSAGE_ID, ESB_ITEMTYPE_RADIO }
+#define E_FILTERBAR_ALL_ACCOUNTS { N_("All Accounts"), E_FILTERBAR_ALL_ACCOUNTS_ID }
+#define E_FILTERBAR_CURRENT_ACCOUNT { N_("Current Account"), E_FILTERBAR_CURRENT_ACCOUNT_ID }
+#define E_FILTERBAR_CURRENT_FOLDER { N_("Current Folder"), E_FILTERBAR_CURRENT_FOLDER_ID }
+#define E_FILTERBAR_CURRENT_MESSAGE { N_("Current Message"), E_FILTERBAR_CURRENT_MESSAGE_ID }
#define E_FILTERBAR_SEPARATOR { NULL, 0, 0 }
#ifdef JUST_FOR_TRANSLATORS
@@ -119,23 +128,13 @@ const char * strings[] = {
#endif
-GType e_filter_bar_get_type (void);
-
-EFilterBar *e_filter_bar_new (RuleContext *context,
- const char *systemrules,
- const char *userrules,
- EFilterBarConfigRule config,
- void *data);
-void
-e_filter_bar_new_construct (RuleContext *context,
- const char *systemrules,
- const char *userrules,
- EFilterBarConfigRule config,
- void *data ,EFilterBar *bar );
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+GType e_filter_bar_get_type (void);
+EFilterBar * e_filter_bar_new (RuleContext *context,
+ const gchar *systemrules,
+ const gchar *userrules,
+ EFilterBarConfigRule config,
+ gpointer data);
+G_END_DECLS
-#endif /* __E_FILTER_BAR_H__ */
+#endif /* E_FILTER_BAR_H */