aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-spin-button.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-cell-spin-button.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-cell-spin-button.c')
-rw-r--r--widgets/table/e-cell-spin-button.c73
1 files changed, 36 insertions, 37 deletions
diff --git a/widgets/table/e-cell-spin-button.c b/widgets/table/e-cell-spin-button.c
index 9c11e6c22f..9a0a9ce331 100644
--- a/widgets/table/e-cell-spin-button.c
+++ b/widgets/table/e-cell-spin-button.c
@@ -42,10 +42,10 @@
#define E_CELL_SPIN_BUTTON_ARROW_WIDTH 16
#define PARENT_TYPE e_cell_get_type ()
-static void e_cell_spin_button_class_init (GtkObjectClass *klass);
+static void e_cell_spin_button_class_init (GObjectClass *klass);
static void e_cell_spin_button_init (GtkObject *object);
-static void ecsb_destroy (GtkObject *object);
+static void ecsb_dispose (GObject *object);
/* ECell Functions */
static ECellView * ecsb_new_view (ECell *ecell,
@@ -120,12 +120,12 @@ static guint signals[LAST_SIGNAL] = { 0 };
static ECell *parent_class;
static void
-e_cell_spin_button_class_init (GtkObjectClass *klass)
+e_cell_spin_button_class_init (GObjectClass *klass)
{
ECellClass *ecc = (ECellClass *) klass;
ECellSpinButtonClass *ecsbc = (ECellSpinButtonClass *) klass;
- klass->destroy = ecsb_destroy;
+ klass->dispose = ecsb_dispose;
ecc->realize = ecsb_realize;
ecc->unrealize = ecsb_unrealize;
@@ -144,19 +144,18 @@ e_cell_spin_button_class_init (GtkObjectClass *klass)
ecsbc->step = NULL;
- parent_class = gtk_type_class (E_CELL_TYPE);
+ parent_class = g_type_class_ref (E_CELL_TYPE);
signals[STEP] =
- gtk_signal_new ("step",
- GTK_RUN_LAST,
- E_OBJECT_CLASS_TYPE (klass),
- GTK_SIGNAL_OFFSET (ECellSpinButtonClass, step),
- e_marshal_NONE__POINTER_INT_INT_INT,
- GTK_TYPE_NONE,
- 4, GTK_TYPE_POINTER, GTK_TYPE_INT,
- GTK_TYPE_INT, GTK_TYPE_INT);
-
- E_OBJECT_CLASS_ADD_SIGNALS (klass, signals, LAST_SIGNAL);
+ g_signal_new ("step",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ECellSpinButtonClass, step),
+ NULL, NULL,
+ e_marshal_NONE__POINTER_INT_INT_INT,
+ G_TYPE_NONE,
+ 4, G_TYPE_POINTER, G_TYPE_INT,
+ G_TYPE_INT, G_TYPE_INT);
}
static void
@@ -365,20 +364,20 @@ ecsb_event (ECellView *ecv,
/* Yep, which one? */
if (event->button.y <= height / 2) {
ecsb->up_pressed = TRUE;
- gtk_signal_emit (GTK_OBJECT(ecsb),
- signals[STEP],
- ecv,
- STEP_UP,
- view_col,
- row);
+ g_signal_emit (ecsb,
+ signals[STEP], 0,
+ ecv,
+ STEP_UP,
+ view_col,
+ row);
} else {
ecsb->down_pressed = TRUE;
- gtk_signal_emit (GTK_OBJECT(ecsb),
- signals[STEP],
- ecv,
- STEP_DOWN,
- view_col,
- row);
+ g_signal_emit (ecsb,
+ signals[STEP], 0,
+ ecv,
+ STEP_DOWN,
+ view_col,
+ row);
}
e_table_item_redraw_range (eti,
@@ -513,7 +512,7 @@ ecsb_show_tooltip (ECellView *ecv,
}
static void
-ecsb_destroy (GtkObject *object)
+ecsb_dispose (GObject *object)
{
ECellSpinButton *mcsp;
@@ -522,7 +521,7 @@ ecsb_destroy (GtkObject *object)
mcsp = E_CELL_SPIN_BUTTON (object);
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
ECell *
@@ -533,15 +532,15 @@ e_cell_spin_button_new (gint min,
{
ECellSpinButton *ecsb;
- ecsb = gtk_type_new (E_CELL_SPIN_BUTTON_TYPE);
+ ecsb = g_object_new (E_CELL_SPIN_BUTTON_TYPE, NULL);
if (!child_cell) {
child_cell = e_cell_number_new (NULL,
GTK_JUSTIFY_LEFT);
- gtk_signal_connect (GTK_OBJECT (ecsb), "step",
- GTK_SIGNAL_FUNC (e_cell_spin_button_step),
- NULL);
+ g_signal_connect (ecsb, "step",
+ G_CALLBACK (e_cell_spin_button_step),
+ NULL);
}
ecsb->child = child_cell;
@@ -560,13 +559,13 @@ e_cell_spin_button_new_float (gfloat min,
{
ECellSpinButton *ecsb;
- ecsb = gtk_type_new (E_CELL_SPIN_BUTTON_TYPE);
+ ecsb = g_object_new (E_CELL_SPIN_BUTTON_TYPE, NULL);
if (!child_cell) {
child_cell = e_cell_float_new (NULL, GTK_JUSTIFY_LEFT);
- gtk_signal_connect (GTK_OBJECT (ecsb), "step",
- GTK_SIGNAL_FUNC (e_cell_spin_button_step_float),
- NULL);
+ g_signal_connect (ecsb, "step",
+ G_CALLBACK (e_cell_spin_button_step_float),
+ NULL);
}
ecsb->child = child_cell;