aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-config.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2001-02-06 05:16:13 +0800
committerChris Lahey <clahey@src.gnome.org>2001-02-06 05:16:13 +0800
commit707cce7733ad5bd9fda46ed3b48259df4e2d73f0 (patch)
tree07aa6939683351d1633da650fb1f9b4580842641 /widgets/table/e-table-config.c
parentf5ab7142647eaee7b701bc49bc8ce1ba0f3455fb (diff)
downloadgsoc2013-evolution-707cce7733ad5bd9fda46ed3b48259df4e2d73f0.tar
gsoc2013-evolution-707cce7733ad5bd9fda46ed3b48259df4e2d73f0.tar.gz
gsoc2013-evolution-707cce7733ad5bd9fda46ed3b48259df4e2d73f0.tar.bz2
gsoc2013-evolution-707cce7733ad5bd9fda46ed3b48259df4e2d73f0.tar.lz
gsoc2013-evolution-707cce7733ad5bd9fda46ed3b48259df4e2d73f0.tar.xz
gsoc2013-evolution-707cce7733ad5bd9fda46ed3b48259df4e2d73f0.tar.zst
gsoc2013-evolution-707cce7733ad5bd9fda46ed3b48259df4e2d73f0.zip
Added a "changed" signal.
2001-02-05 Christopher James Lahey <clahey@helixcode.com> * e-table-config.c, e-table-config.h (dialog_apply): Added a "changed" signal. * e-table-sort-info.c, e-table-sort-info.h (e_table_sort_info_duplicate): Added this function. * e-table.c (e_table_set_state_object): Duplicate the state's sort_info object here. svn path=/trunk/; revision=7985
Diffstat (limited to 'widgets/table/e-table-config.c')
-rw-r--r--widgets/table/e-table-config.c53
1 files changed, 50 insertions, 3 deletions
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index accef6f174..f25e77245d 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -26,6 +26,13 @@
static GtkObjectClass *config_parent_class;
+enum {
+ CHANGED,
+ LAST_SIGNAL
+};
+
+static guint e_table_config_signals [LAST_SIGNAL] = { 0, };
+
static void
config_destroy (GtkObject *object)
{
@@ -42,11 +49,36 @@ config_destroy (GtkObject *object)
}
static void
-config_class_init (GtkObjectClass *klass)
+e_table_config_changed (ETableConfig *config, ETableState *state)
{
- config_parent_class = gtk_type_class (PARENT_TYPE);
+ g_return_if_fail (config != NULL);
+ g_return_if_fail (E_IS_TABLE_CONFIG (config));
+
+ gtk_signal_emit(GTK_OBJECT(config),
+ e_table_config_signals [CHANGED],
+ state);
+}
+
+static void
+config_class_init (GtkObjectClass *object_class)
+{
+ ETableConfigClass *klass = E_TABLE_CONFIG_CLASS(object_class);
+
+ config_parent_class = gtk_type_class (PARENT_TYPE);
- klass->destroy = config_destroy;
+ klass->changed = NULL;
+
+ object_class->destroy = config_destroy;
+
+ e_table_config_signals [CHANGED] =
+ gtk_signal_new ("changed",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (ETableConfigClass, changed),
+ gtk_marshal_NONE__OBJECT,
+ GTK_TYPE_NONE, 1, E_TABLE_STATE_TYPE);
+
+ gtk_object_class_add_signals (object_class, e_table_config_signals, LAST_SIGNAL);
}
static ETableColumnSpecification *
@@ -351,6 +383,15 @@ dialog_destroyed (GtkObject *dialog, ETableConfig *config)
gtk_object_destroy (GTK_OBJECT (config));
}
+static void
+dialog_apply (GnomePropertyBox *pbox, gint page_num, ETableConfig *config)
+{
+ if (page_num != -1)
+ return;
+
+ e_table_config_changed (config, config->state);
+}
+
/*
* Invoked by the Glade auto-connect code
*/
@@ -361,6 +402,7 @@ e_table_proxy_gtk_combo_text_new (void)
return gtk_combo_text_new (TRUE);
}
+#if 0
static GtkWidget *
configure_dialog (GladeXML *gui, const char *widget_name, ETableConfig *config)
{
@@ -370,6 +412,7 @@ configure_dialog (GladeXML *gui, const char *widget_name, ETableConfig *config)
return w;
}
+#endif
static void
connect_button (ETableConfig *config, GladeXML *gui, const char *widget_name, void *cback)
@@ -633,6 +676,10 @@ setup_gui (ETableConfig *config)
gtk_signal_connect (
GTK_OBJECT (config->dialog_toplevel), "destroy",
GTK_SIGNAL_FUNC (dialog_destroyed), config);
+
+ gtk_signal_connect (
+ GTK_OBJECT (config->dialog_toplevel), "apply",
+ GTK_SIGNAL_FUNC (dialog_apply), config);
gtk_object_unref (GTK_OBJECT (gui));
}