aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorMike Kestner <mkestner@ximian.com>2002-11-02 05:47:34 +0800
committerMike Kestner <mkestner@src.gnome.org>2002-11-02 05:47:34 +0800
commita611e132e9ddb796d37c63479acb7b5d300c69e8 (patch)
tree72f8c5a712cbac2758131d8ad4f7ae3642b82308 /widgets/table
parent9e8d97048803fc6bfbff2d2eb8bacd0d3ec54a77 (diff)
downloadgsoc2013-evolution-a611e132e9ddb796d37c63479acb7b5d300c69e8.tar
gsoc2013-evolution-a611e132e9ddb796d37c63479acb7b5d300c69e8.tar.gz
gsoc2013-evolution-a611e132e9ddb796d37c63479acb7b5d300c69e8.tar.bz2
gsoc2013-evolution-a611e132e9ddb796d37c63479acb7b5d300c69e8.tar.lz
gsoc2013-evolution-a611e132e9ddb796d37c63479acb7b5d300c69e8.tar.xz
gsoc2013-evolution-a611e132e9ddb796d37c63479acb7b5d300c69e8.tar.zst
gsoc2013-evolution-a611e132e9ddb796d37c63479acb7b5d300c69e8.zip
gobjectify ETableExtras is now a GObject (e_tree_class_init): remove
2002-11-01 Mike Kestner <mkestner@ximian.com> * e-table-extras : gobjectify * e-tree.c (et_real_construct): ETableExtras is now a GObject (e_tree_class_init): remove duplicated signals svn path=/trunk/; revision=18490
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-table-extras.c18
-rw-r--r--widgets/table/e-table-extras.h17
-rw-r--r--widgets/table/e-tree.c18
3 files changed, 18 insertions, 35 deletions
diff --git a/widgets/table/e-table-extras.c b/widgets/table/e-table-extras.c
index b3c0efa27c..4429db98a3 100644
--- a/widgets/table/e-table-extras.c
+++ b/widgets/table/e-table-extras.c
@@ -35,9 +35,7 @@
#include "e-table-extras.h"
#include <string.h>
-#define PARENT_TYPE (gtk_object_get_type())
-
-static GtkObjectClass *ete_parent_class;
+static GObjectClass *ete_parent_class;
static void
cell_hash_free(gchar *key,
@@ -60,7 +58,7 @@ pixbuf_hash_free(gchar *key,
}
static void
-ete_destroy (GtkObject *object)
+ete_finalize (GObject *object)
{
ETableExtras *ete = E_TABLE_EXTRAS (object);
@@ -89,15 +87,15 @@ ete_destroy (GtkObject *object)
ete->searches = NULL;
ete->pixbufs = NULL;
- GTK_OBJECT_CLASS (ete_parent_class)->destroy (object);
+ ete_parent_class->finalize (object);
}
static void
-ete_class_init (GtkObjectClass *klass)
+ete_class_init (GObjectClass *klass)
{
- ete_parent_class = gtk_type_class (PARENT_TYPE);
+ ete_parent_class = g_type_class_peek_parent (klass);
- klass->destroy = ete_destroy;
+ klass->finalize = ete_finalize;
}
static gint
@@ -180,12 +178,12 @@ ete_init (ETableExtras *extras)
e_table_extras_add_cell(extras, "tree-string", e_cell_tree_new (NULL, NULL, TRUE, e_cell_text_new (NULL, GTK_JUSTIFY_LEFT)));
}
-E_MAKE_TYPE(e_table_extras, "ETableExtras", ETableExtras, ete_class_init, ete_init, PARENT_TYPE)
+E_MAKE_TYPE(e_table_extras, "ETableExtras", ETableExtras, ete_class_init, ete_init, G_TYPE_OBJECT)
ETableExtras *
e_table_extras_new (void)
{
- ETableExtras *ete = gtk_type_new (E_TABLE_EXTRAS_TYPE);
+ ETableExtras *ete = g_object_new (E_TABLE_EXTRAS_TYPE, NULL);
return (ETableExtras *) ete;
}
diff --git a/widgets/table/e-table-extras.h b/widgets/table/e-table-extras.h
index 01da79a53d..bd478e0bd8 100644
--- a/widgets/table/e-table-extras.h
+++ b/widgets/table/e-table-extras.h
@@ -24,20 +24,21 @@
#ifndef _E_TABLE_EXTRAS_H_
#define _E_TABLE_EXTRAS_H_
-#include <gtk/gtkobject.h>
+#include <glib-object.h>
#include <gal/e-table/e-cell.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
G_BEGIN_DECLS
#define E_TABLE_EXTRAS_TYPE (e_table_extras_get_type ())
-#define E_TABLE_EXTRAS(o) (GTK_CHECK_CAST ((o), E_TABLE_EXTRAS_TYPE, ETableExtras))
-#define E_TABLE_EXTRAS_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_TABLE_EXTRAS_TYPE, ETableExtrasClass))
-#define E_IS_TABLE_EXTRAS(o) (GTK_CHECK_TYPE ((o), E_TABLE_EXTRAS_TYPE))
-#define E_IS_TABLE_EXTRAS_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_TABLE_EXTRAS_TYPE))
+#define E_TABLE_EXTRAS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TABLE_EXTRAS_TYPE, ETableExtras))
+#define E_TABLE_EXTRAS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TABLE_EXTRAS_TYPE, ETableExtrasClass))
+#define E_IS_TABLE_EXTRAS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TABLE_EXTRAS_TYPE))
+#define E_IS_TABLE_EXTRAS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TABLE_EXTRAS_TYPE))
+#define E_TABLE_EXTRAS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), E_TABLE_EXTRAS_TYPE, ETableExtrasClass))
typedef struct {
- GtkObject base;
+ GObject base;
GHashTable *cells;
GHashTable *compares;
@@ -46,10 +47,10 @@ typedef struct {
} ETableExtras;
typedef struct {
- GtkObjectClass parent_class;
+ GObjectClass parent_class;
} ETableExtrasClass;
-GtkType e_table_extras_get_type (void);
+GType e_table_extras_get_type (void);
ETableExtras *e_table_extras_new (void);
void e_table_extras_add_cell (ETableExtras *extras,
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 1dd7b8a4ad..c4cb8173ce 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -1442,7 +1442,7 @@ et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
gtk_widget_pop_colormap ();
- gtk_object_unref(GTK_OBJECT(ete));
+ g_object_unref(G_OBJECT(ete));
return e_tree;
}
@@ -3150,22 +3150,6 @@ e_tree_class_init (ETreeClass *class)
gtk_marshal_INT__POINTER,
GTK_TYPE_INT, 1, GDK_TYPE_EVENT);
- et_signals [STATE_CHANGE] =
- gtk_signal_new ("state_change",
- GTK_RUN_LAST,
- E_OBJECT_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ETreeClass, state_change),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- et_signals [WHITE_SPACE_EVENT] =
- gtk_signal_new ("white_space_event",
- GTK_RUN_LAST,
- E_OBJECT_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ETreeClass, white_space_event),
- gtk_marshal_INT__POINTER,
- GTK_TYPE_INT, 1, GDK_TYPE_EVENT);
-
et_signals[TREE_DRAG_BEGIN] =
gtk_signal_new ("tree_drag_begin",
GTK_RUN_LAST,