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
This commit is contained in:
Jeffrey Stedfast
2003-04-16 17:01:24 +00:00
committed by Jeffrey Stedfast
parent 8d2d08837d
commit 3c0ee2d3df
3 changed files with 14 additions and 11 deletions

View File

@ -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)

View File

@ -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
}

View File

@ -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;