aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-simple.c
diff options
context:
space:
mode:
authorMike Kestner <mkestner@ximian.com>2002-11-05 23:05:25 +0800
committerMike Kestner <mkestner@src.gnome.org>2002-11-05 23:05:25 +0800
commitf8172191adf212f4829e05be6a224c13e10b898c (patch)
tree5bbc674abf3103da66193d98af573cf92ae149a0 /widgets/table/e-table-simple.c
parent6146f8e036db5c9e816232dfd31fe064427929c6 (diff)
downloadgsoc2013-evolution-f8172191adf212f4829e05be6a224c13e10b898c.tar
gsoc2013-evolution-f8172191adf212f4829e05be6a224c13e10b898c.tar.gz
gsoc2013-evolution-f8172191adf212f4829e05be6a224c13e10b898c.tar.bz2
gsoc2013-evolution-f8172191adf212f4829e05be6a224c13e10b898c.tar.lz
gsoc2013-evolution-f8172191adf212f4829e05be6a224c13e10b898c.tar.xz
gsoc2013-evolution-f8172191adf212f4829e05be6a224c13e10b898c.tar.zst
gsoc2013-evolution-f8172191adf212f4829e05be6a224c13e10b898c.zip
use GObject api for models GObjectify GObjectify GObjectify GObjectify
2002-11-05 Mike Kestner <mkestner@ximian.com> * e-table-item.c : use GObject api for models * e-table-memory-callbacks.[ch] : GObjectify * e-table-memory-store.[ch] : GObjectify * e-table-memory.[ch] : GObjectify * e-table-model.[ch] : GObjectify * e-table-one.[ch] : GObjectify * e-table-simple.[ch] : GObjectify * e-tree-memory.[ch] : GObjectify * e-tree-model.[ch] : GObjectify * e-tree-selection-model.c : use GObject api for models * e-tree-simple.[ch] : GObjectify * e-tree-sorted.[ch] : GObjectify * e-tree-table-adapter.[ch] : GObjectify * e-tree.c : use GObject api for models svn path=/trunk/; revision=18553
Diffstat (limited to 'widgets/table/e-table-simple.c')
-rw-r--r--widgets/table/e-table-simple.c32
1 files changed, 4 insertions, 28 deletions
diff --git a/widgets/table/e-table-simple.c b/widgets/table/e-table-simple.c
index c8a7d4fe16..b7cf8f66be 100644
--- a/widgets/table/e-table-simple.c
+++ b/widgets/table/e-table-simple.c
@@ -24,8 +24,7 @@
#include <config.h>
#include "e-table-simple.h"
-
-#define PARENT_TYPE e_table_model_get_type ()
+#include "gal/util/e-util.h"
static int
simple_column_count (ETableModel *etm)
@@ -166,7 +165,7 @@ simple_value_to_string (ETableModel *etm, int col, const void *value)
}
static void
-e_table_simple_class_init (GtkObjectClass *object_class)
+e_table_simple_class_init (GObjectClass *object_class)
{
ETableModelClass *model_class = (ETableModelClass *) object_class;
@@ -188,28 +187,7 @@ e_table_simple_class_init (GtkObjectClass *object_class)
model_class->value_to_string = simple_value_to_string;
}
-GtkType
-e_table_simple_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type){
- GtkTypeInfo info = {
- "ETableSimple",
- sizeof (ETableSimple),
- sizeof (ETableSimpleClass),
- (GtkClassInitFunc) e_table_simple_class_init,
- (GtkObjectInitFunc) NULL,
- NULL, /* reserved 1 */
- NULL, /* reserved 2 */
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
+E_MAKE_TYPE(e_table_simple, "ETableSimple", ETableSimple, e_table_simple_class_init, NULL, E_TABLE_MODEL_TYPE)
/**
* e_table_simple_new:
@@ -257,9 +235,7 @@ e_table_simple_new (ETableSimpleColumnCountFn col_count,
ETableSimpleValueToStringFn value_to_string,
void *data)
{
- ETableSimple *et;
-
- et = gtk_type_new (e_table_simple_get_type ());
+ ETableSimple *et = g_object_new (E_TABLE_SIMPLE_TYPE, NULL);
et->col_count = col_count;
et->row_count = row_count;