aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/misc/.cvsignore4
-rw-r--r--widgets/misc/ChangeLog10
-rw-r--r--widgets/misc/Makefile.am21
-rw-r--r--widgets/misc/e-search-bar.c258
-rw-r--r--widgets/misc/e-search-bar.h19
-rw-r--r--widgets/misc/e-util-marshal.list2
6 files changed, 182 insertions, 132 deletions
diff --git a/widgets/misc/.cvsignore b/widgets/misc/.cvsignore
index ca70cdb688..9bf3ddbecc 100644
--- a/widgets/misc/.cvsignore
+++ b/widgets/misc/.cvsignore
@@ -5,8 +5,10 @@ Makefile
Makefile.in
*.lo
*.la
+e-util-marshal.c
+e-util-marshal.h
test-title-bar
test-calendar
test-dateedit
test-dropdown-button
-test-multi-config-dialog \ No newline at end of file
+test-multi-config-dialog
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 21dfeaaaaf..7a1fee2729 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,13 @@
+2002-11-06 Chris Toshok <toshok@ximian.com>
+
+ * .cvsignore: ignore the generated marshal source.
+
+ * Makefile.am: add marshal stuff.
+
+ * e-util-marshal.list: marshaller list.
+
+ * e-search-bar.[ch]: gobjectify this.
+
2002-11-04 Ettore Perazzoli <ettore@ximian.com>
* e-combo-button.c (impl_expose_event): Use
diff --git a/widgets/misc/Makefile.am b/widgets/misc/Makefile.am
index 7e02313f13..9ea28e8f38 100644
--- a/widgets/misc/Makefile.am
+++ b/widgets/misc/Makefile.am
@@ -49,7 +49,22 @@ libemiscwidgets_a_SOURCES = \
e-multi-config-dialog.c \
e-search-bar.c \
e-title-bar.c \
- e-url-entry.c
+ e-url-entry.c \
+ e-util-marshal.c
+
+# GLib marshalling cruft
+
+e-util-marshal.h: e-util-marshal.list
+ ( @GLIB_GENMARSHAL@ --prefix=e_util_marshal e-util-marshal.list --header > e-util-marshal.tmp \
+ && mv e-util-marshal.tmp e-util-marshal.h ) \
+ || ( rm -f e-util-marshal.tmp && exit 1 )
+
+e-util-marshal.c: e-util-marshal.h
+ ( @GLIB_GENMARSHAL@ --prefix=e_util_marshal e-util-marshal.list --body > e-util-marshal.tmp \
+ && mv e-util-marshal.tmp e-util-marshal.c ) \
+ || ( rm -f e-util-marshal.tmp && exit 1 )
+
+MARSHAL_GENERATED = e-util-marshal.c e-util-marshal.h
libemiscwidgets_a_LIBADD = $(top_builddir)/e-util/libeutil.la
@@ -114,3 +129,7 @@ test_title_bar_LDADD = \
$(GNOME_FULL_LIBS)
+BUILT_SOURCES = $(MARSHAL_GENERATED)
+CLEANFILES = $(BUILT_SOURCES)
+
+EXTRA_DIST = e-book-marshal.list
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c
index a1cc110243..afbfd72eb2 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -44,6 +44,7 @@
#include <string.h>
#include "e-search-bar.h"
+#include "e-util-marshal.h"
enum {
@@ -60,10 +61,10 @@ static GtkHBoxClass *parent_class = NULL;
/* The arguments we take */
enum {
- ARG_0,
- ARG_ITEM_ID,
- ARG_SUBITEM_ID,
- ARG_TEXT,
+ PROP_0,
+ PROP_ITEM_ID,
+ PROP_SUBITEM_ID,
+ PROP_TEXT,
};
@@ -150,19 +151,18 @@ free_menu_items (ESearchBar *esb)
static void
emit_query_changed (ESearchBar *esb)
{
- gtk_signal_emit (GTK_OBJECT (esb),
- esb_signals [QUERY_CHANGED]);
+ g_signal_emit (esb, esb_signals [QUERY_CHANGED], 0);
}
static void
emit_search_activated (ESearchBar *esb)
{
if (esb->pending_activate) {
- gtk_idle_remove (esb->pending_activate);
+ g_source_remove (esb->pending_activate);
esb->pending_activate = 0;
}
- gtk_signal_emit (GTK_OBJECT (esb), esb_signals [SEARCH_ACTIVATED]);
+ g_signal_emit (esb, esb_signals [SEARCH_ACTIVATED], 0);
set_find_now_sensitive (esb, FALSE);
}
@@ -170,9 +170,9 @@ emit_search_activated (ESearchBar *esb)
static void
emit_menu_activated (ESearchBar *esb, int item)
{
- gtk_signal_emit (GTK_OBJECT (esb),
- esb_signals [MENU_ACTIVATED],
- item);
+ g_signal_emit (esb,
+ esb_signals [MENU_ACTIVATED], 0,
+ item);
}
@@ -258,8 +258,8 @@ subitem_activated_cb (GtkWidget *widget, ESearchBar *esb)
{
gint id, subid;
- id = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), "EsbItemId"));
- subid = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), "EsbSubitemId"));
+ id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "EsbItemId"));
+ subid = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "EsbSubitemId"));
esb->item_id = id;
esb->subitem_id = subid;
@@ -311,11 +311,11 @@ activate_by_subitems (ESearchBar *esb, gint item_id, ESearchBarSubitem *subitems
if (esb->entry == NULL) {
esb->entry = gtk_entry_new();
gtk_widget_set_usize (esb->entry, 4, -1);
- gtk_object_ref (GTK_OBJECT (esb->entry));
- gtk_signal_connect (GTK_OBJECT (esb->entry), "changed",
- GTK_SIGNAL_FUNC (entry_changed_cb), esb);
- gtk_signal_connect (GTK_OBJECT (esb->entry), "activate",
- GTK_SIGNAL_FUNC (entry_activated_cb), esb);
+ g_object_ref (esb->entry);
+ g_signal_connect (esb->entry, "changed",
+ G_CALLBACK (entry_changed_cb), esb);
+ g_signal_connect (esb->entry, "activate",
+ G_CALLBACK (entry_activated_cb), esb);
gtk_container_add (GTK_CONTAINER (esb->entry_box), esb->entry);
gtk_widget_show(esb->entry);
@@ -349,7 +349,7 @@ activate_by_subitems (ESearchBar *esb, gint item_id, ESearchBarSubitem *subitems
if (esb->suboption == NULL) {
esb->suboption = gtk_option_menu_new ();
- gtk_object_ref (GTK_OBJECT (esb->suboption));
+ g_object_ref (esb->suboption);
gtk_container_add (GTK_CONTAINER (esb->entry_box), esb->suboption);
gtk_widget_show (esb->suboption);
@@ -384,15 +384,15 @@ activate_by_subitems (ESearchBar *esb, gint item_id, ESearchBarSubitem *subitems
gtk_widget_set_sensitive (menu_item, FALSE);
}
- gtk_object_set_data (GTK_OBJECT (menu_item), "EsbItemId",
- GINT_TO_POINTER (item_id));
- gtk_object_set_data (GTK_OBJECT (menu_item), "EsbSubitemId",
- GINT_TO_POINTER (subitems[i].id));
+ g_object_set_data (G_OBJECT (menu_item), "EsbItemId",
+ GINT_TO_POINTER (item_id));
+ g_object_set_data (G_OBJECT (menu_item), "EsbSubitemId",
+ GINT_TO_POINTER (subitems[i].id));
- gtk_signal_connect (GTK_OBJECT (menu_item),
- "activate",
- GTK_SIGNAL_FUNC (subitem_activated_cb),
- esb);
+ g_signal_connect (menu_item,
+ "activate",
+ G_CALLBACK (subitem_activated_cb),
+ esb);
gtk_widget_show (menu_item);
gtk_menu_append (GTK_MENU (menu), menu_item);
@@ -412,9 +412,9 @@ option_activated_cb (GtkWidget *widget,
{
int id;
- id = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), "EsbChoiceId"));
+ id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "EsbChoiceId"));
- activate_by_subitems (esb, id, gtk_object_get_data (GTK_OBJECT (widget), "EsbChoiceSubitems"));
+ activate_by_subitems (esb, id, g_object_get_data (G_OBJECT (widget), "EsbChoiceSubitems"));
esb->item_id = id;
emit_query_changed (esb);
@@ -597,7 +597,7 @@ option_item_destroy_cb (GtkObject *object, gpointer data)
g_assert (subitems != NULL);
free_subitems (subitems);
- gtk_object_set_data (object, "EsbChoiceSubitems", NULL);
+ g_object_set_data (G_OBJECT (object), "EsbChoiceSubitems", NULL);
}
static void
@@ -638,21 +638,21 @@ set_option (ESearchBar *esb, ESearchBarItem *items)
gtk_menu_append (GTK_MENU (menu), item);
- gtk_object_set_data (GTK_OBJECT (item), "EsbChoiceId", GINT_TO_POINTER(items[i].id));
+ g_object_set_data (G_OBJECT (item), "EsbChoiceId", GINT_TO_POINTER(items[i].id));
if (items[i].subitems != NULL) {
subitems = copy_subitems (items[i].subitems);
- gtk_object_set_data (GTK_OBJECT (item), "EsbChoiceSubitems", subitems);
- gtk_signal_connect (GTK_OBJECT (item), "destroy",
- GTK_SIGNAL_FUNC (option_item_destroy_cb), subitems);
+ g_object_set_data (G_OBJECT (item), "EsbChoiceSubitems", subitems);
+ g_signal_connect (item, "destroy",
+ G_CALLBACK (option_item_destroy_cb), subitems);
}
if (i == 0)
activate_by_subitems (esb, items[i].id, subitems);
- gtk_signal_connect (GTK_OBJECT (item), "activate",
- GTK_SIGNAL_FUNC (option_activated_cb),
- esb);
+ g_signal_connect (item, "activate",
+ G_CALLBACK (option_activated_cb),
+ esb);
}
gtk_widget_show_all (menu);
@@ -666,7 +666,7 @@ set_option (ESearchBar *esb, ESearchBarItem *items)
static GtkWidget *
add_button (ESearchBar *esb,
const char *text,
- GtkSignalFunc callback)
+ GCallback callback)
{
GtkWidget *label;
GtkWidget *holder;
@@ -686,7 +686,7 @@ add_button (ESearchBar *esb,
holder = put_in_spacer_widget (button);
gtk_widget_show (holder);
- gtk_signal_connect (GTK_OBJECT (button), "clicked", callback, esb);
+ g_signal_connect (G_OBJECT (button), "clicked", callback, esb);
gtk_box_pack_end (GTK_BOX (esb), holder, FALSE, FALSE, 1);
@@ -702,7 +702,7 @@ find_id (GtkWidget *menu, int idin, const char *type, GtkWidget **widget)
if (widget)
*widget = NULL;
while (l) {
- id = GPOINTER_TO_INT (gtk_object_get_data (l->data, type));
+ id = GPOINTER_TO_INT (g_object_get_data (l->data, type));
if (id == idin) {
row = i;
if (widget)
@@ -719,54 +719,55 @@ find_id (GtkWidget *menu, int idin, const char *type, GtkWidget **widget)
/* GtkObject methods. */
static void
-impl_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+impl_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
{
ESearchBar *esb = E_SEARCH_BAR (object);
- switch (arg_id) {
- case ARG_ITEM_ID:
- GTK_VALUE_ENUM (*arg) = e_search_bar_get_item_id (esb);
+ switch (prop_id) {
+ case PROP_ITEM_ID:
+ g_value_set_int (value, e_search_bar_get_item_id (esb));
break;
- case ARG_SUBITEM_ID:
- GTK_VALUE_ENUM (*arg) = e_search_bar_get_subitem_id (esb);
+ case PROP_SUBITEM_ID:
+ g_value_set_int (value, e_search_bar_get_subitem_id (esb));
break;
- case ARG_TEXT:
- GTK_VALUE_STRING (*arg) = e_search_bar_get_text (esb);
+ case PROP_TEXT:
+ g_value_set_string (value, e_search_bar_get_text (esb));
break;
default:
- arg->type = GTK_TYPE_INVALID;
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
-impl_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
+impl_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
ESearchBar *esb = E_SEARCH_BAR(object);
- switch (arg_id) {
- case ARG_ITEM_ID:
- e_search_bar_set_item_id (esb, GTK_VALUE_ENUM (*arg));
+ switch (prop_id) {
+ case PROP_ITEM_ID:
+ e_search_bar_set_item_id (esb, g_value_get_int (value));
break;
- case ARG_SUBITEM_ID:
- e_search_bar_set_subitem_id (esb, GTK_VALUE_ENUM (*arg));
+ case PROP_SUBITEM_ID:
+ e_search_bar_set_subitem_id (esb, g_value_get_int (value));
break;
- case ARG_TEXT:
- e_search_bar_set_text (esb, GTK_VALUE_STRING (*arg));
+ case PROP_TEXT:
+ e_search_bar_set_text (esb, g_value_get_string (value));
break;
default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
-impl_destroy (GtkObject *object)
+impl_dispose (GObject *object)
{
ESearchBar *esb = E_SEARCH_BAR (object);
@@ -781,68 +782,85 @@ impl_destroy (GtkObject *object)
esb->ui_component = NULL;
}
if (esb->entry)
- gtk_object_unref (GTK_OBJECT (esb->entry));
+ g_object_unref (esb->entry);
if (esb->suboption)
- gtk_object_unref (GTK_OBJECT (esb->suboption));
+ g_object_unref (esb->suboption);
if (esb->pending_activate) {
- gtk_idle_remove (esb->pending_activate);
+ g_source_remove (esb->pending_activate);
esb->pending_activate = 0;
}
free_menu_items (esb);
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
class_init (ESearchBarClass *klass)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
- object_class = GTK_OBJECT_CLASS (klass);
+ object_class = G_OBJECT_CLASS (klass);
- parent_class = gtk_type_class (gtk_hbox_get_type ());
+ parent_class = g_type_class_ref (gtk_hbox_get_type ());
- object_class->set_arg = impl_set_arg;
- object_class->get_arg = impl_get_arg;
- object_class->destroy = impl_destroy;
+ object_class->set_property = impl_set_property;
+ object_class->get_property = impl_get_property;
+ object_class->dispose = impl_dispose;
klass->set_menu = set_menu;
klass->set_option = set_option;
-
- gtk_object_add_arg_type ("ESearchBar::item_id", GTK_TYPE_ENUM,
- GTK_ARG_READWRITE, ARG_ITEM_ID);
- gtk_object_add_arg_type ("ESearchBar::subitem_id", GTK_TYPE_ENUM,
- GTK_ARG_READWRITE, ARG_SUBITEM_ID);
- gtk_object_add_arg_type ("ESearchBar::text", GTK_TYPE_STRING,
- GTK_ARG_READWRITE, ARG_TEXT);
+
+ g_object_class_install_property (object_class, PROP_ITEM_ID,
+ g_param_spec_int ("item_id",
+ _("Item ID"),
+ /*_( */"XXX blurb" /*)*/,
+ 0, 0, 0,
+ G_PARAM_READWRITE | G_PARAM_LAX_VALIDATION));
+
+ g_object_class_install_property (object_class, PROP_SUBITEM_ID,
+ g_param_spec_int ("subitem_id",
+ _("Subitem ID"),
+ /*_( */"XXX blurb" /*)*/,
+ 0, 0, 0,
+ G_PARAM_READWRITE | G_PARAM_LAX_VALIDATION));
+
+ g_object_class_install_property (object_class, PROP_TEXT,
+ g_param_spec_string ("text",
+ _("Text"),
+ /*_( */"XXX blurb" /*)*/,
+ NULL,
+ G_PARAM_READWRITE));
esb_signals [QUERY_CHANGED] =
- gtk_signal_new ("query_changed",
- GTK_RUN_LAST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ESearchBarClass, query_changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ g_signal_new ("query_changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ESearchBarClass, query_changed),
+ NULL, NULL,
+ e_util_marshal_NONE__NONE,
+ G_TYPE_NONE, 0);
esb_signals [MENU_ACTIVATED] =
- gtk_signal_new ("menu_activated",
- GTK_RUN_LAST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ESearchBarClass, menu_activated),
- gtk_marshal_NONE__INT,
- GTK_TYPE_NONE, 1, GTK_TYPE_INT);
+ g_signal_new ("menu_activated",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ESearchBarClass, menu_activated),
+ NULL, NULL,
+ e_util_marshal_NONE__INT,
+ G_TYPE_NONE, 1, G_TYPE_INT);
esb_signals [SEARCH_ACTIVATED] =
- gtk_signal_new ("search_activated",
- GTK_RUN_LAST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ESearchBarClass, search_activated),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ g_signal_new ("search_activated",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ESearchBarClass, search_activated),
+ NULL, NULL,
+ e_util_marshal_NONE__NONE,
+ G_TYPE_NONE, 0);
}
static void
@@ -891,9 +909,9 @@ e_search_bar_construct (ESearchBar *search_bar,
gtk_box_set_spacing (GTK_BOX (search_bar), 1);
search_bar->clear_button = add_button (search_bar, _("Clear"),
- GTK_SIGNAL_FUNC (clear_button_clicked_cb));
+ G_CALLBACK (clear_button_clicked_cb));
search_bar->activate_button = add_button (search_bar, _("Find Now"),
- GTK_SIGNAL_FUNC (activate_button_clicked_cb));
+ G_CALLBACK (activate_button_clicked_cb));
e_search_bar_set_menu (search_bar, menu_items);
@@ -914,7 +932,7 @@ e_search_bar_construct (ESearchBar *search_bar,
if (search_bar->subitem_id >= 0) {
gtk_widget_set_sensitive (search_bar->activate_button, FALSE);
- search_bar->pending_activate = gtk_idle_add (idle_activate_hack, search_bar);
+ search_bar->pending_activate = g_idle_add (idle_activate_hack, search_bar);
}
}
@@ -969,19 +987,22 @@ e_search_bar_set_suboption (ESearchBar *search_bar, int option_id, ESearchBarSub
g_return_if_fail (row != -1);
g_assert (item != NULL);
- old_subitems = gtk_object_get_data (GTK_OBJECT (item), "EsbChoiceSubitems");
+ old_subitems = g_object_get_data (G_OBJECT (item), "EsbChoiceSubitems");
if (old_subitems) {
/* This was connected in set_option() */
- gtk_signal_disconnect_by_data (GTK_OBJECT (item), old_subitems);
+ g_signal_handlers_disconnect_matched (item,
+ G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL,
+ old_subitems);
free_subitems (old_subitems);
- gtk_object_set_data (GTK_OBJECT (item), "EsbChoiceSubitems", NULL);
+ g_object_set_data (G_OBJECT (item), "EsbChoiceSubitems", NULL);
}
if (subitems) {
new_subitems = copy_subitems (subitems);
- gtk_object_set_data (GTK_OBJECT (item), "EsbChoiceSubitems", new_subitems);
- gtk_signal_connect (GTK_OBJECT (item), "destroy",
- GTK_SIGNAL_FUNC (option_item_destroy_cb), new_subitems);
+ g_object_set_data (G_OBJECT (item), "EsbChoiceSubitems", new_subitems);
+ g_signal_connect (item, "destroy",
+ G_CALLBACK (option_item_destroy_cb), new_subitems);
} else
new_subitems = NULL;
@@ -1040,26 +1061,27 @@ e_search_bar_set_menu_sensitive (ESearchBar *search_bar, int id, gboolean state)
g_free (path);
}
-GtkType
+GType
e_search_bar_get_type (void)
{
- static GtkType type = 0;
-
+ static GType type = 0;
+
if (!type) {
- static const GtkTypeInfo info = {
- "ESearchBar",
- sizeof (ESearchBar),
+ static const GTypeInfo info = {
sizeof (ESearchBarClass),
- (GtkClassInitFunc) class_init,
- (GtkObjectInitFunc) init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (ESearchBar),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) init,
};
-
- type = gtk_type_unique (gtk_hbox_get_type (), &info);
+
+ type = g_type_register_static (gtk_hbox_get_type (), "ESearchBar", &info, 0);
}
-
+
return type;
}
@@ -1159,7 +1181,7 @@ e_search_bar_set_ids (ESearchBar *search_bar, int item_id, int subitem_id)
g_return_if_fail (item_row != -1);
g_assert (item_widget != NULL);
- subitems = gtk_object_get_data (GTK_OBJECT (item_widget), "EsbChoiceSubitems");
+ subitems = g_object_get_data (G_OBJECT (item_widget), "EsbChoiceSubitems");
g_return_if_fail (subitems != NULL);
search_bar->item_id = item_id;
diff --git a/widgets/misc/e-search-bar.h b/widgets/misc/e-search-bar.h
index 7ca10c3890..b0333ad58b 100644
--- a/widgets/misc/e-search-bar.h
+++ b/widgets/misc/e-search-bar.h
@@ -24,10 +24,7 @@
#include <bonobo/bonobo-ui-component.h>
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
+G_BEGIN_DECLS
/* ESearchBar - A card displaying information about a contact.
*
@@ -41,10 +38,10 @@ extern "C" {
*/
#define E_SEARCH_BAR_TYPE (e_search_bar_get_type ())
-#define E_SEARCH_BAR(obj) (GTK_CHECK_CAST ((obj), E_SEARCH_BAR_TYPE, ESearchBar))
-#define E_SEARCH_BAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SEARCH_BAR_TYPE, ESearchBarClass))
-#define E_IS_SEARCH_BAR(obj) (GTK_CHECK_TYPE ((obj), E_SEARCH_BAR_TYPE))
-#define E_IS_SEARCH_BAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SEARCH_BAR_TYPE))
+#define E_SEARCH_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_SEARCH_BAR_TYPE, ESearchBar))
+#define E_SEARCH_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_SEARCH_BAR_TYPE, ESearchBarClass))
+#define E_IS_SEARCH_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_SEARCH_BAR_TYPE))
+#define E_IS_SEARCH_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_SEARCH_BAR_TYPE))
typedef struct {
char *text;
@@ -107,7 +104,7 @@ enum {
};
-GtkType e_search_bar_get_type (void);
+GType e_search_bar_get_type (void);
void e_search_bar_construct (ESearchBar *search_bar,
ESearchBarItem *menu_items,
ESearchBarItem *option_items);
@@ -148,9 +145,7 @@ void e_search_bar_set_text (ESearchBar *search_bar,
const char *text);
char *e_search_bar_get_text (ESearchBar *search_bar);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
#endif /* __E_SEARCH_BAR_H__ */
diff --git a/widgets/misc/e-util-marshal.list b/widgets/misc/e-util-marshal.list
new file mode 100644
index 0000000000..f5d8f046b7
--- /dev/null
+++ b/widgets/misc/e-util-marshal.list
@@ -0,0 +1,2 @@
+NONE:NONE
+NONE:INT