diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-04-17 01:01:24 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-04-17 01:01:24 +0800 |
commit | 3c0ee2d3df563f09948351c9306c7bb7e8813f02 (patch) | |
tree | 38a6e307060eb8e5cfdea8df47ad1c038810889a | |
parent | 8d2d08837d5e8969db0a62547124bab9c6507459 (diff) | |
download | gsoc2013-evolution-3c0ee2d3df563f09948351c9306c7bb7e8813f02.tar gsoc2013-evolution-3c0ee2d3df563f09948351c9306c7bb7e8813f02.tar.gz gsoc2013-evolution-3c0ee2d3df563f09948351c9306c7bb7e8813f02.tar.bz2 gsoc2013-evolution-3c0ee2d3df563f09948351c9306c7bb7e8813f02.tar.lz gsoc2013-evolution-3c0ee2d3df563f09948351c9306c7bb7e8813f02.tar.xz gsoc2013-evolution-3c0ee2d3df563f09948351c9306c7bb7e8813f02.tar.zst gsoc2013-evolution-3c0ee2d3df563f09948351c9306c7bb7e8813f02.zip |
Finished an #if 0'd out port to GObject from an #if 0'd out GtkObject
2003-04-14 Jeffrey Stedfast <fejj@ximian.com>
* e-sexp.c: Finished an #if 0'd out port to GObject from an #if
0'd out GtkObject subclassing.
svn path=/trunk/; revision=20864
-rw-r--r-- | e-util/ChangeLog | 5 | ||||
-rw-r--r-- | e-util/e-sexp.c | 16 | ||||
-rw-r--r-- | e-util/e-sexp.h | 4 |
3 files changed, 14 insertions, 11 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 9458c4fdc3..7caed4607b 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,8 @@ +2003-04-14 Jeffrey Stedfast <fejj@ximian.com> + + * e-sexp.c: Finished an #if 0'd out port to GObject from an #if + 0'd out GtkObject subclassing. + 2003-04-15 Hans Petter Jansson <hpj@ximian.com> * e-sexp.c (e_sexp_add_function) diff --git a/e-util/e-sexp.c b/e-util/e-sexp.c index a9b46e440f..90c920661d 100644 --- a/e-util/e-sexp.c +++ b/e-util/e-sexp.c @@ -105,7 +105,7 @@ static struct _ESExpTerm * parse_value(ESExp *f); static void parse_dump_term(struct _ESExpTerm *t, int depth); -#ifdef E_SEXP_IS_GTK_OBJECT +#ifdef E_SEXP_IS_G_OBJECT static GObjectClass *parent_class; #endif @@ -1028,17 +1028,15 @@ parse_list(ESExp *f, int gotbrace) static void e_sexp_finalise(void *); -#ifdef E_SEXP_IS_GTK_OBJECT +#ifdef E_SEXP_IS_G_OBJECT static void -e_sexp_class_init (ESExpClass *class) +e_sexp_class_init (ESExpClass *klass) { - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; + GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = e_sexp_finalise; - parent_class = gtk_type_class (gtk_object_get_type ()); + parent_class = g_type_class_ref (g_object_get_type ()); } #endif @@ -1088,8 +1086,8 @@ e_sexp_finalise(void *o) g_scanner_scope_foreach_symbol(s->scanner, 0, free_symbol, 0); g_scanner_destroy(s->scanner); -#ifdef E_SEXP_IS_GTK_OBJECT - ((GtkObjectClass *)(parent_class))->finalize((GtkObject *)o); +#ifdef E_SEXP_IS_G_OBJECT + G_OBJECT_CLASS (parent_class)->finalize (o); #endif } diff --git a/e-util/e-sexp.h b/e-util/e-sexp.h index ee2c6079ed..5f41c97dcc 100644 --- a/e-util/e-sexp.h +++ b/e-util/e-sexp.h @@ -12,7 +12,7 @@ #include <glib-object.h> #endif -#ifdef E_SEXP_IS_GTK_OBJECT +#ifdef E_SEXP_IS_G_OBJECT #define E_TYPE_SEXP (e_sexp_get_type ()) #define E_SEXP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SEXP, ESExp)) #define E_SEXP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SEXP, ESExpClass)) @@ -121,7 +121,7 @@ struct _ESExp { }; struct _ESExpClass { -#ifdef E_SEXP_IS_GTK_OBJECT +#ifdef E_SEXP_IS_G_OBJECT GObjectClass parent_class; #else int dummy; |