aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-column.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-17 08:02:53 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-17 08:02:53 +0800
commit0bbe38655b71d4dd71277a1ecee246732f9fc2b1 (patch)
tree10655a0c2acb5f300986dfcfb90e5dbb3645d337 /widgets/table/e-table-column.c
parentd8e4ebebc320c72ae93c88dc43d8ae220a94331d (diff)
downloadgsoc2013-evolution-0bbe38655b71d4dd71277a1ecee246732f9fc2b1.tar.gz
gsoc2013-evolution-0bbe38655b71d4dd71277a1ecee246732f9fc2b1.tar.zst
gsoc2013-evolution-0bbe38655b71d4dd71277a1ecee246732f9fc2b1.zip
GObject port work.
2002-11-16 Chris Toshok <toshok@ximian.com> * e-cell-checkbox.[ch]: GObject port work. * e-cell-combo.[ch]: same. * e-cell-date.[ch]: same. * e-cell-float.[ch]: same. * e-cell-number.[ch]: same. * e-cell-pixbuf.[ch]: same. * e-cell-popup.[ch]: same. * e-cell-progress.[ch]: same. * e-cell-size.[ch]: same. * e-cell-spin-button.[ch]: same. * e-cell-text.[ch]: same. * e-cell-toggle.[ch]: same. * e-cell-tree.[ch]: same. * e-cell-vbox.[ch]: same. * e-cell.[ch]: same. * e-table-col.c: same. * e-table-column.c: same. * e-table-config-field.[ch]: same. * e-table-config.c: same. * e-table-config.glade: same. * e-table-field-chooser-dialog.[ch]: same. * e-table-field-chooser-item.[ch]: same. * e-table-field-chooser.[ch]: same. * e-table-group-container.[ch]: same. * e-table-group-leaf.[ch]: same. * e-table-group.[ch]: same. * e-table-header-item.[ch]: same. * e-table-header-utils.[ch]: same. * e-table-header.c: same. * e-table-item.[ch]: same. * e-table-scrolled.[ch]: same. * e-table-utils.c: same. * e-table.[ch]: same. * e-tree-memory-callbacks.h: same. * e-tree-scrolled.[ch]: same. * e-tree-sorted-variable.c: same. * e-tree.[ch]: same. * test-check.c: same. * test-cols.c: same. * test-table.c: same. svn path=/trunk/; revision=18801
Diffstat (limited to 'widgets/table/e-table-column.c')
-rw-r--r--widgets/table/e-table-column.c66
1 files changed, 25 insertions, 41 deletions
diff --git a/widgets/table/e-table-column.c b/widgets/table/e-table-column.c
index 6d8f1c3aef..514a25e74e 100644
--- a/widgets/table/e-table-column.c
+++ b/widgets/table/e-table-column.c
@@ -32,6 +32,7 @@ enum {
static guint etc_signals [LAST_SIGNAL] = { 0, };
+#define PARENT_CLASS GTK_TYPE_OBJECT
static GtkObjectClass *e_table_column_parent_class;
static void
@@ -62,48 +63,31 @@ e_table_column_class_init (GtkObjectClass *object_class)
{
G_OBJECT_CLASS (object_class)->finalize = e_table_column_finalize;
- e_table_column_parent_class = (gtk_type_class (gtk_object_get_type ()));
+ e_table_column_parent_class = g_type_class_ref (PARENT_CLASS);
etc_signals [STRUCTURE_CHANGE] =
- gtk_signal_new ("structure_change",
- GTK_RUN_LAST,
- E_OBJECT_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ETableColumn, structure_change),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ g_signal_new ("structure_change",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableColumn, structure_change),
+ NULL, NULL,
+ e_marshal_NONE__NONE,
+ G_TYPE_NONE, 0);
etc_signals [DIMENSION_CHANGE] =
- gtk_signal_new ("dimension_change",
- GTK_RUN_LAST,
- E_OBJECT_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ETableColumn, dimension_change),
- gtk_marshal_NONE__INT,
- GTK_TYPE_NONE, 1, GTK_TYPE_INT);
-
- E_OBJECT_CLASS_ADD_SIGNALS (object_class, etc_signals, LAST_SIGNAL);
+ g_signal_new ("dimension_change",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableColumn, dimension_change),
+ e_marshal_NONE__INT,
+ G_TYPE_NONE, 1, G_TYPE_INT);
}
-GtkType
-e_table_column_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type){
- GtkTypeInfo info = {
- "ETableColumn",
- sizeof (ETableColumn),
- sizeof (ETableColumnClass),
- (GtkClassInitFunc) e_table_column_class_init,
- (GtkObjectInitFunc) NULL,
- NULL, /* reserved 1 */
- NULL, /* reserved 2 */
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (gtk_object_get_type (), &info);
- }
-
- return type;
-}
+E_MAKE_TYPE (e_table_column,
+ "ETableColumn",
+ ETableColumn,
+ e_table_column_class_init,
+ NULL,
+ PARENT_TYPE);
static void
etc_do_insert (ETableColumn *etc, int pos, ETableCol *val)
@@ -129,7 +113,7 @@ e_table_column_add_column (ETableColumn *etc, ETableCol *tc, int pos)
etc_do_insert (etc, pos, tc);
etc->col_count++;
- gtk_signal_emit (GTK_OBJECT (etc), etc_signals [STRUCTURE_CHANGE]);
+ g_signal_emit (etc, etc_signals [STRUCTURE_CHANGE], 0);
}
ETableCol *
@@ -273,7 +257,7 @@ e_table_column_move (ETableColumn *etc, int source_index, int target_index)
old = etc->columns [source_index];
etc_do_remove (etc, source_index);
etc_do_insert (etc, target_index, old);
- gtk_signal_emit (GTK_OBJECT (etc), etc_signals [STRUCTURE_CHANGE]);
+ g_signal_emit (etc, etc_signals [STRUCTURE_CHANGE], 0);
}
void
@@ -285,7 +269,7 @@ e_table_column_remove (ETableColumn *etc, int idx)
g_return_if_fail (idx < etc->col_count);
etc_do_remove (etc, idx);
- gtk_signal_emit (GTK_OBJECT (etc), etc_signals [STRUCTURE_CHANGE]);
+ g_signal_emit (etc, etc_signals [STRUCTURE_CHANGE], 0);
}
void
@@ -303,5 +287,5 @@ e_table_column_set_size (ETableColumn *etc, int idx, int size)
g_return_if_fail (size > 0);
etc->columns [idx]->width = size;
- gtk_signal_emit (GTK_OBJECT (etc), etc_signals [SIZE_CHANGE], idx);
+ g_signal_emit (etc, etc_signals [SIZE_CHANGE], 0, idx);
}