From 7cc506979eb65b179263f868dec88cba36528fa7 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sat, 7 Jul 2001 02:53:21 +0000 Subject: Added a "state" argument to allow you to get the state out of the config 2001-07-06 Christopher James Lahey * e-table-config.c (config_get_arg): Added a "state" argument to allow you to get the state out of the config object. svn path=/trunk/; revision=10875 --- widgets/table/e-table-config.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'widgets') diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c index 58f11a1e3a..c33290b227 100644 --- a/widgets/table/e-table-config.c +++ b/widgets/table/e-table-config.c @@ -3,7 +3,7 @@ * E-table-config.c: The ETable config dialog. * * Authors: - * Chris Lahey (clahey@ximian.com) + * Chris Lahey * Miguel de Icaza (miguel@ximian.com) * * FIXME: @@ -40,6 +40,11 @@ enum { LAST_SIGNAL }; +enum { + ARG_0, + ARG_STATE, +}; + static guint e_table_config_signals [LAST_SIGNAL] = { 0, }; static void @@ -57,6 +62,21 @@ config_destroy (GtkObject *object) GTK_OBJECT_CLASS (config_parent_class)->destroy (object); } +static void +config_get_arg (GtkObject *o, GtkArg *arg, guint arg_id) +{ + ETableConfig *config = E_TABLE_CONFIG (o); + + switch (arg_id){ + case ARG_STATE: + GTK_VALUE_OBJECT (*arg) = (GtkObject *) config->state; + break; + + default: + break; + } +} + static void e_table_config_changed (ETableConfig *config, ETableState *state) { @@ -78,6 +98,7 @@ config_class_init (GtkObjectClass *object_class) klass->changed = NULL; + object_class->get_arg = config_get_arg; object_class->destroy = config_destroy; e_table_config_signals [CHANGED] = @@ -89,6 +110,9 @@ config_class_init (GtkObjectClass *object_class) GTK_TYPE_NONE, 0); gtk_object_class_add_signals (object_class, e_table_config_signals, LAST_SIGNAL); + + gtk_object_add_arg_type ("ETableConfig::state", E_TABLE_STATE_TYPE, + GTK_ARG_READABLE, ARG_STATE); } static ETableColumnSpecification * -- cgit