aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-03 13:46:46 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-03 13:46:46 +0800
commit805e75e7d9315f8cb9f6a7213fc373a8a873a242 (patch)
treedd0063aea1ff40a14325ec4021cd3f69abe7fc20
parent9c73777f2268b5bf2622f893e2a3ba7d0f720572 (diff)
downloadgsoc2013-evolution-805e75e7d9315f8cb9f6a7213fc373a8a873a242.tar
gsoc2013-evolution-805e75e7d9315f8cb9f6a7213fc373a8a873a242.tar.gz
gsoc2013-evolution-805e75e7d9315f8cb9f6a7213fc373a8a873a242.tar.bz2
gsoc2013-evolution-805e75e7d9315f8cb9f6a7213fc373a8a873a242.tar.lz
gsoc2013-evolution-805e75e7d9315f8cb9f6a7213fc373a8a873a242.tar.xz
gsoc2013-evolution-805e75e7d9315f8cb9f6a7213fc373a8a873a242.tar.zst
gsoc2013-evolution-805e75e7d9315f8cb9f6a7213fc373a8a873a242.zip
add marshal building stuff, add e-util-marshal.c to SOURCES, and add
2002-11-02 Chris Toshok <toshok@ximian.com> * Makefile.am: add marshal building stuff, add e-util-marshal.c to SOURCES, and add e-util-marshal.list to EXTRA_DIST. * e-util-marshal.list: add marshallers for e-util. * e-list.c: convert to GObject. * e-list.h: convert to GObject. * e-iterator.c: convert to GObject. * e-iterator.h: convert to GObject. * e-list-iterator.c: convert to GObject. * e-list-iterator.h: convert to GObject. * .cvsignore: ignore e-util-marshal.[ch] svn path=/trunk/; revision=18504
-rw-r--r--e-util/.cvsignore2
-rw-r--r--e-util/ChangeLog21
-rw-r--r--e-util/Makefile.am21
-rw-r--r--e-util/e-iterator.c91
-rw-r--r--e-util/e-iterator.h20
-rw-r--r--e-util/e-list-iterator.c50
-rw-r--r--e-util/e-list-iterator.h15
-rw-r--r--e-util/e-list.c50
-rw-r--r--e-util/e-list.h20
-rw-r--r--e-util/e-util-marshal.list1
10 files changed, 167 insertions, 124 deletions
diff --git a/e-util/.cvsignore b/e-util/.cvsignore
index cb49036068..ea3b8c5ad4 100644
--- a/e-util/.cvsignore
+++ b/e-util/.cvsignore
@@ -4,3 +4,5 @@ Makefile.in
.libs
*.lo
*.la
+e-util-marshal.c
+e-util-marshal.h
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 1513ec4426..dc98eb54d5 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,24 @@
+2002-11-02 Chris Toshok <toshok@ximian.com>
+
+ * Makefile.am: add marshal building stuff, add e-util-marshal.c to
+ SOURCES, and add e-util-marshal.list to EXTRA_DIST.
+
+ * e-util-marshal.list: add marshallers for e-util.
+
+ * e-list.c: convert to GObject.
+
+ * e-list.h: convert to GObject.
+
+ * e-iterator.c: convert to GObject.
+
+ * e-iterator.h: convert to GObject.
+
+ * e-list-iterator.c: convert to GObject.
+
+ * e-list-iterator.h: convert to GObject.
+
+ * .cvsignore: ignore e-util-marshal.[ch]
+
2002-11-02 Ettore Perazzoli <ettore@ximian.com>
* ename/Makefile.am (INCLUDES): Removed -I$(includedir).
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index 19ff7b0e53..39a27e9c7d 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -59,8 +59,24 @@ libeutil_la_SOURCES = \
e-sexp.c \
e-time-utils.c \
e-url.c \
+ e-util-marshal.c \
md5-utils.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
+
+
# FIXME TODO
# e-categories-config.c
# e-categories-master-list-wombat.[ch]
@@ -99,7 +115,7 @@ libeconduit_la_SOURCES = $(pilot_compile)
libeconduit_static_la_SOURCES = $(libeconduit_la_SOURCES)
libeconduit_static_la_LDFLAGS = -all-static
-EXTRA_DIST = $(pilot_sources)
+EXTRA_DIST = $(pilot_sources) e-util-marshal.list
edb3include_HEADERS = \
e-db3-utils.h \
@@ -109,3 +125,6 @@ libedb3util_la_SOURCES = \
$(edb3include_HEADERS) \
e-db3-utils.c \
e-dbhash.c
+
+BUILT_SOURCES = $(MARSHAL_GENERATED)
+CLEANFILES = $(BUILT_SOURCES)
diff --git a/e-util/e-iterator.c b/e-util/e-iterator.c
index 9abf424356..d3575a0645 100644
--- a/e-util/e-iterator.c
+++ b/e-util/e-iterator.c
@@ -9,17 +9,15 @@
#include <config.h>
-#include <gtk/gtksignal.h>
#include "e-iterator.h"
-
-#define ECI_CLASS(object) (E_ITERATOR_CLASS(GTK_CLASS_TYPE (object)))
+#include "e-util-marshal.h"
static void e_iterator_init (EIterator *card);
static void e_iterator_class_init (EIteratorClass *klass);
-#define PARENT_TYPE (gtk_object_get_type ())
+#define PARENT_TYPE G_TYPE_OBJECT
-static GtkObjectClass *parent_class;
+static GObjectClass *parent_class;
enum {
INVALIDATE,
@@ -37,24 +35,25 @@ static guint e_iterator_signals [LAST_SIGNAL] = { 0, };
*
* Return value: The type ID of the &EIterator class.
**/
-GtkType
+GType
e_iterator_get_type (void)
{
- static GtkType type = 0;
+ static GType type = 0;
- if (!type) {
- GtkTypeInfo info = {
- "EIterator",
- sizeof (EIterator),
+ if (! type) {
+ GTypeInfo info = {
sizeof (EIteratorClass),
- (GtkClassInitFunc) e_iterator_class_init,
- (GtkObjectInitFunc) e_iterator_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
+ NULL, /* base_class_init */
+ NULL, /* base_class_finalize */
+ (GClassInitFunc) e_iterator_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (EIterator),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) e_iterator_init
};
- type = gtk_type_unique (PARENT_TYPE, &info);
+ type = g_type_register_static (PARENT_TYPE, "EIterator", &info, 0);
}
return type;
@@ -63,19 +62,20 @@ e_iterator_get_type (void)
static void
e_iterator_class_init (EIteratorClass *klass)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
- object_class = GTK_OBJECT_CLASS(klass);
+ object_class = G_OBJECT_CLASS(klass);
- parent_class = gtk_type_class (PARENT_TYPE);
+ parent_class = g_type_class_ref (PARENT_TYPE);
e_iterator_signals [INVALIDATE] =
- gtk_signal_new ("invalidate",
- GTK_RUN_LAST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (EIteratorClass, invalidate),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ g_signal_new ("invalidate",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EIteratorClass, invalidate),
+ NULL, NULL,
+ e_util_marshal_NONE__NONE, /* XXX need a new marshaller here */
+ G_TYPE_NONE, 0);
klass->invalidate = NULL;
klass->get = NULL;
@@ -103,8 +103,8 @@ e_iterator_init (EIterator *card)
const void *
e_iterator_get (EIterator *iterator)
{
- if (ECI_CLASS(iterator)->get)
- return ECI_CLASS(iterator)->get(iterator);
+ if (E_ITERATOR_GET_CLASS(iterator)->get)
+ return E_ITERATOR_GET_CLASS(iterator)->get(iterator);
else
return NULL;
}
@@ -112,22 +112,22 @@ e_iterator_get (EIterator *iterator)
void
e_iterator_reset (EIterator *iterator)
{
- if (ECI_CLASS(iterator)->reset)
- ECI_CLASS(iterator)->reset(iterator);
+ if (E_ITERATOR_GET_CLASS(iterator)->reset)
+ E_ITERATOR_GET_CLASS(iterator)->reset(iterator);
}
void
e_iterator_last (EIterator *iterator)
{
- if (ECI_CLASS(iterator)->last)
- ECI_CLASS(iterator)->last(iterator);
+ if (E_ITERATOR_GET_CLASS(iterator)->last)
+ E_ITERATOR_GET_CLASS(iterator)->last(iterator);
}
gboolean
e_iterator_next (EIterator *iterator)
{
- if (ECI_CLASS(iterator)->next)
- return ECI_CLASS(iterator)->next(iterator);
+ if (E_ITERATOR_GET_CLASS(iterator)->next)
+ return E_ITERATOR_GET_CLASS(iterator)->next(iterator);
else
return FALSE;
}
@@ -135,8 +135,8 @@ e_iterator_next (EIterator *iterator)
gboolean
e_iterator_prev (EIterator *iterator)
{
- if (ECI_CLASS(iterator)->prev)
- return ECI_CLASS(iterator)->prev(iterator);
+ if (E_ITERATOR_GET_CLASS(iterator)->prev)
+ return E_ITERATOR_GET_CLASS(iterator)->prev(iterator);
else
return FALSE;
}
@@ -144,31 +144,31 @@ e_iterator_prev (EIterator *iterator)
void
e_iterator_delete (EIterator *iterator)
{
- if (ECI_CLASS(iterator)->delete)
- ECI_CLASS(iterator)->delete(iterator);
+ if (E_ITERATOR_GET_CLASS(iterator)->delete)
+ E_ITERATOR_GET_CLASS(iterator)->delete(iterator);
}
void e_iterator_insert (EIterator *iterator,
const void *object,
gboolean before)
{
- if (ECI_CLASS(iterator)->insert)
- ECI_CLASS(iterator)->insert(iterator, object, before);
+ if (E_ITERATOR_GET_CLASS(iterator)->insert)
+ E_ITERATOR_GET_CLASS(iterator)->insert(iterator, object, before);
}
void
e_iterator_set (EIterator *iterator,
const void *object)
{
- if (ECI_CLASS(iterator)->set)
- ECI_CLASS(iterator)->set(iterator, object);
+ if (E_ITERATOR_GET_CLASS(iterator)->set)
+ E_ITERATOR_GET_CLASS(iterator)->set(iterator, object);
}
gboolean
e_iterator_is_valid (EIterator *iterator)
{
- if (ECI_CLASS(iterator)->is_valid)
- return ECI_CLASS(iterator)->is_valid(iterator);
+ if (E_ITERATOR_GET_CLASS(iterator)->is_valid)
+ return E_ITERATOR_GET_CLASS(iterator)->is_valid(iterator);
else
return FALSE;
}
@@ -179,6 +179,5 @@ e_iterator_invalidate (EIterator *iterator)
g_return_if_fail (iterator != NULL);
g_return_if_fail (E_IS_ITERATOR (iterator));
- gtk_signal_emit (GTK_OBJECT (iterator),
- e_iterator_signals [INVALIDATE]);
+ g_signal_emit (iterator, e_iterator_signals [INVALIDATE], 0);
}
diff --git a/e-util/e-iterator.h b/e-util/e-iterator.h
index a6f0899235..9dae97cc3a 100644
--- a/e-util/e-iterator.h
+++ b/e-util/e-iterator.h
@@ -12,23 +12,25 @@
#include <stdio.h>
#include <time.h>
-#include <gtk/gtkobject.h>
+#include <glib.h>
+#include <glib-object.h>
#define E_TYPE_ITERATOR (e_iterator_get_type ())
-#define E_ITERATOR(obj) (GTK_CHECK_CAST ((obj), E_TYPE_ITERATOR, EIterator))
-#define E_ITERATOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_ITERATOR, EIteratorClass))
-#define E_IS_ITERATOR(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_ITERATOR))
-#define E_IS_ITERATOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_ITERATOR))
+#define E_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_ITERATOR, EIterator))
+#define E_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_ITERATOR, EIteratorClass))
+#define E_IS_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_ITERATOR))
+#define E_IS_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_ITERATOR))
+#define E_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_ITERATOR, EIteratorClass))
typedef struct _EIterator EIterator;
typedef struct _EIteratorClass EIteratorClass;
struct _EIterator {
- GtkObject object;
+ GObject object;
};
struct _EIteratorClass {
- GtkObjectClass parent_class;
+ GObjectClass parent_class;
/* Signals */
void (*invalidate) (EIterator *iterator);
@@ -63,7 +65,7 @@ gboolean e_iterator_is_valid (EIterator *iterator);
void e_iterator_invalidate (EIterator *iterator);
-/* Standard Gtk function */
-GtkType e_iterator_get_type (void);
+/* Standard Glib function */
+GType e_iterator_get_type (void);
#endif /* ! __E_ITERATOR_H__ */
diff --git a/e-util/e-list-iterator.c b/e-util/e-list-iterator.c
index 7d3d644fc2..e801c22ef8 100644
--- a/e-util/e-list-iterator.c
+++ b/e-util/e-list-iterator.c
@@ -29,12 +29,11 @@ static gboolean e_list_iterator_next (EIterator *iterator);
static void e_list_iterator_reset (EIterator *iterator);
static void e_list_iterator_last (EIterator *iterator);
static const void *e_list_iterator_get (EIterator *iterator);
-static void e_list_iterator_destroy (GtkObject *object);
+static void e_list_iterator_dispose (GObject *object);
-#define PARENT_TYPE (e_iterator_get_type ())
+#define PARENT_TYPE E_TYPE_ITERATOR
static EIteratorClass *parent_class;
-#define PARENT_CLASS (E_ITERATOR_CLASS(parent_class))
/**
* e_list_iterator_get_type:
@@ -45,24 +44,25 @@ static EIteratorClass *parent_class;
*
* Return value: The type ID of the &EListIterator class.
**/
-GtkType
+GType
e_list_iterator_get_type (void)
{
- static GtkType type = 0;
+ static GType type = 0;
- if (!type) {
- GtkTypeInfo info = {
- "EListIterator",
- sizeof (EListIterator),
+ if (! type) {
+ GTypeInfo info = {
sizeof (EListIteratorClass),
- (GtkClassInitFunc) e_list_iterator_class_init,
- (GtkObjectInitFunc) e_list_iterator_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
+ NULL, /* base_class_init */
+ NULL, /* base_class_finalize */
+ (GClassInitFunc) e_list_iterator_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (EListIterator),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) e_list_iterator_init
};
- type = gtk_type_unique (PARENT_TYPE, &info);
+ type = g_type_register_static (PARENT_TYPE, "EListIterator", &info, 0);
}
return type;
@@ -71,15 +71,15 @@ e_list_iterator_get_type (void)
static void
e_list_iterator_class_init (EListIteratorClass *klass)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
EIteratorClass *iterator_class;
- object_class = GTK_OBJECT_CLASS(klass);
+ object_class = G_OBJECT_CLASS(klass);
iterator_class = E_ITERATOR_CLASS(klass);
- parent_class = gtk_type_class (PARENT_TYPE);
+ parent_class = g_type_class_ref (PARENT_TYPE);
- object_class->destroy = e_list_iterator_destroy;
+ object_class->dispose = e_list_iterator_dispose;
iterator_class->invalidate = e_list_iterator_invalidate;
iterator_class->get = e_list_iterator_get;
@@ -106,10 +106,10 @@ e_list_iterator_init (EListIterator *list)
EIterator *
e_list_iterator_new (EList *list)
{
- EListIterator *iterator = gtk_type_new(e_list_iterator_get_type());
+ EListIterator *iterator = g_object_new (E_TYPE_LIST_ITERATOR, NULL);
iterator->list = list;
- gtk_object_ref(GTK_OBJECT(list));
+ g_object_ref(list);
iterator->iterator = list->list;
return E_ITERATOR(iterator);
@@ -119,14 +119,14 @@ e_list_iterator_new (EList *list)
* Virtual functions:
*/
static void
-e_list_iterator_destroy (GtkObject *object)
+e_list_iterator_dispose (GObject *object)
{
EListIterator *iterator = E_LIST_ITERATOR(object);
e_list_remove_iterator(iterator->list, E_ITERATOR(iterator));
- gtk_object_unref(GTK_OBJECT(iterator->list));
+ g_object_unref(iterator->list);
- 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 const void *
diff --git a/e-util/e-list-iterator.h b/e-util/e-list-iterator.h
index 6903015002..b3a8953d80 100644
--- a/e-util/e-list-iterator.h
+++ b/e-util/e-list-iterator.h
@@ -15,16 +15,17 @@ typedef struct _EListIteratorClass EListIteratorClass;
#include <stdio.h>
#include <time.h>
-#include <gtk/gtkobject.h>
+#include <glib.h>
+#include <glib-object.h>
#include <e-util/e-iterator.h>
#include <e-util/e-list.h>
#define E_TYPE_LIST_ITERATOR (e_list_iterator_get_type ())
-#define E_LIST_ITERATOR(obj) (GTK_CHECK_CAST ((obj), E_TYPE_LIST_ITERATOR, EListIterator))
-#define E_LIST_ITERATOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_LIST_ITERATOR, EListIteratorClass))
-#define E_IS_LIST_ITERATOR(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_LIST_ITERATOR))
-#define E_IS_LIST_ITERATOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_LIST_ITERATOR))
+#define E_LIST_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_LIST_ITERATOR, EListIterator))
+#define E_LIST_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_LIST_ITERATOR, EListIteratorClass))
+#define E_IS_LIST_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_LIST_ITERATOR))
+#define E_IS_LIST_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_LIST_ITERATOR))
struct _EListIterator {
EIterator parent;
@@ -39,7 +40,7 @@ struct _EListIteratorClass {
EIterator *e_list_iterator_new (EList *list);
-/* Standard Gtk function */
-GtkType e_list_iterator_get_type (void);
+/* Standard Glib function */
+GType e_list_iterator_get_type (void);
#endif /* ! __E_LIST_ITERATOR_H__ */
diff --git a/e-util/e-list.c b/e-util/e-list.c
index ba5c0f8df0..7ef7ce2351 100644
--- a/e-util/e-list.c
+++ b/e-util/e-list.c
@@ -12,15 +12,11 @@
#include "e-list.h"
#include "e-list-iterator.h"
-#define ECL_CLASS(object) (E_LIST_CLASS(GTK_OBJECT((object))->klass))
-
static void e_list_init (EList *list);
static void e_list_class_init (EListClass *klass);
-static void e_list_destroy (GtkObject *object);
-
-#define PARENT_TYPE (gtk_object_get_type ())
+static void e_list_dispose (GObject *object);
-static GtkObjectClass *parent_class;
+static GObjectClass *parent_class;
/**
* e_list_get_type:
@@ -31,24 +27,25 @@ static GtkObjectClass *parent_class;
*
* Return value: The type ID of the &EList class.
**/
-GtkType
+GType
e_list_get_type (void)
{
- static GtkType type = 0;
+ static GType type = 0;
- if (!type) {
- GtkTypeInfo info = {
- "EList",
- sizeof (EList),
+ if (! type) {
+ GTypeInfo info = {
sizeof (EListClass),
- (GtkClassInitFunc) e_list_class_init,
- (GtkObjectInitFunc) e_list_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
+ NULL, /* base_class_init */
+ NULL, /* base_class_finalize */
+ (GClassInitFunc) e_list_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (EList),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) e_list_init
};
- type = gtk_type_unique (PARENT_TYPE, &info);
+ type = g_type_register_static (G_TYPE_OBJECT, "EList", &info, 0);
}
return type;
@@ -57,13 +54,13 @@ e_list_get_type (void)
static void
e_list_class_init (EListClass *klass)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
- object_class = GTK_OBJECT_CLASS(klass);
+ object_class = G_OBJECT_CLASS(klass);
- parent_class = gtk_type_class (PARENT_TYPE);
+ parent_class = g_type_class_ref (G_TYPE_OBJECT);
- object_class->destroy = e_list_destroy;
+ object_class->dispose = e_list_dispose;
}
/**
@@ -79,7 +76,7 @@ e_list_init (EList *list)
EList *
e_list_new (EListCopyFunc copy, EListFreeFunc free, void *closure)
{
- EList *list = gtk_type_new(e_list_get_type());
+ EList *list = g_object_new (E_TYPE_LIST, NULL);
list->copy = copy;
list->free = free;
list->closure = closure;
@@ -89,7 +86,7 @@ e_list_new (EListCopyFunc copy, EListFreeFunc free, void *closure)
EList *
e_list_duplicate (EList *old)
{
- EList *list = gtk_type_new(e_list_get_type());
+ EList *list = g_object_new (E_TYPE_LIST, NULL);
list->copy = old->copy;
list->free = old->free;
@@ -167,14 +164,13 @@ e_list_remove_iterator (EList *list, EIterator *iterator)
* Virtual functions
*/
static void
-e_list_destroy (GtkObject *object)
+e_list_dispose (GObject *object)
{
EList *list = E_LIST(object);
if (list->free)
g_list_foreach(list->list, (GFunc) list->free, list->closure);
g_list_free(list->list);
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ (* G_OBJECT_CLASS (parent_class)->dispose) (object);
}
diff --git a/e-util/e-list.h b/e-util/e-list.h
index da63576996..4c9357aebd 100644
--- a/e-util/e-list.h
+++ b/e-util/e-list.h
@@ -15,20 +15,22 @@ typedef struct _EListClass EListClass;
#include <stdio.h>
#include <time.h>
-#include <gtk/gtkobject.h>
+#include <glib.h>
+#include <glib-object.h>
#include <e-util/e-list-iterator.h>
#define E_TYPE_LIST (e_list_get_type ())
-#define E_LIST(obj) (GTK_CHECK_CAST ((obj), E_TYPE_LIST, EList))
-#define E_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_LIST, EListClass))
-#define E_IS_LIST(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_LIST))
-#define E_IS_LIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_LIST))
+#define E_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_LIST, EList))
+#define E_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_LIST, EListClass))
+#define E_IS_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_LIST))
+#define E_IS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_LIST))
+#define E_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_LIST, EListClass))
typedef void *(*EListCopyFunc) (const void *data, void *closure);
typedef void (*EListFreeFunc) (void *data, void *closure);
struct _EList {
- GtkObject object;
+ GObject object;
GList *list;
GList *iterators;
EListCopyFunc copy;
@@ -37,7 +39,7 @@ struct _EList {
};
struct _EListClass {
- GtkObjectClass parent_class;
+ GObjectClass parent_class;
};
EList *e_list_new (EListCopyFunc copy,
@@ -57,7 +59,7 @@ void e_list_remove_iterator (EList *list,
void e_list_invalidate_iterators (EList *list,
EIterator *skip);
-/* Standard Gtk function */
-GtkType e_list_get_type (void);
+/* Standard Glib function */
+GType e_list_get_type (void);
#endif /* ! __E_LIST_H__ */
diff --git a/e-util/e-util-marshal.list b/e-util/e-util-marshal.list
new file mode 100644
index 0000000000..fa33740eaa
--- /dev/null
+++ b/e-util/e-util-marshal.list
@@ -0,0 +1 @@
+NONE:NONE