diff options
author | Chris Toshok <toshok@ximian.com> | 2002-11-17 08:02:53 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2002-11-17 08:02:53 +0800 |
commit | 0bbe38655b71d4dd71277a1ecee246732f9fc2b1 (patch) | |
tree | 10655a0c2acb5f300986dfcfb90e5dbb3645d337 /widgets/table/e-table-col.c | |
parent | d8e4ebebc320c72ae93c88dc43d8ae220a94331d (diff) | |
download | gsoc2013-evolution-0bbe38655b71d4dd71277a1ecee246732f9fc2b1.tar gsoc2013-evolution-0bbe38655b71d4dd71277a1ecee246732f9fc2b1.tar.gz gsoc2013-evolution-0bbe38655b71d4dd71277a1ecee246732f9fc2b1.tar.bz2 gsoc2013-evolution-0bbe38655b71d4dd71277a1ecee246732f9fc2b1.tar.lz gsoc2013-evolution-0bbe38655b71d4dd71277a1ecee246732f9fc2b1.tar.xz 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-col.c')
-rw-r--r-- | widgets/table/e-table-col.c | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/widgets/table/e-table-col.c b/widgets/table/e-table-col.c index 823fb620be..9acc0ba4fd 100644 --- a/widgets/table/e-table-col.c +++ b/widgets/table/e-table-col.c @@ -24,12 +24,17 @@ #include <config.h> #include "e-table-col.h" #include "gal/util/e-util.h" +#include "gal/util/e-i18n.h" static GObjectClass *parent_class; +enum { + PROP_0, + PROP_COMPARE_COL, +}; static void -etc_finalize (GObject *object) +etc_dispose (GObject *object) { ETableCol *etc = E_TABLE_COL (object); @@ -45,7 +50,36 @@ etc_finalize (GObject *object) g_free (etc->text); etc->text = NULL; - parent_class->finalize (object); + parent_class->dispose (object); +} + +static void +etc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) +{ + ETableCol *etc = E_TABLE_COL (object); + + switch (prop_id) { + case PROP_COMPARE_COL: + etc->compare_col = g_value_get_int (value); + break; + default: + break; + } +} + +static void +etc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) +{ + ETableCol *etc = E_TABLE_COL (object); + + switch (prop_id) { + case PROP_COMPARE_COL: + g_value_set_int (value, etc->compare_col); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } } static void @@ -53,7 +87,16 @@ e_table_col_class_init (GObjectClass *object_class) { parent_class = g_type_class_peek_parent (object_class); - object_class->finalize = etc_finalize; + object_class->dispose = etc_dispose; + object_class->set_property = etc_set_property; + object_class->get_property = etc_get_property; + + g_object_class_install_property (object_class, PROP_COMPARE_COL, + g_param_spec_int ("compare_col", + _( "Width" ), + "Width", + 0, G_MAXINT, 0, + G_PARAM_READWRITE)); } static void |