From 9d3fd8c92531b33d5974b790c092c06f914a6282 Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Tue, 23 Jan 2001 23:42:54 +0000 Subject: Lots of stuff like memory leaks and things I forgot ages ago... Enjoy. svn path=/trunk/; revision=7763 --- executive-summary/component/e-summary-callbacks.c | 28 ++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'executive-summary/component/e-summary-callbacks.c') diff --git a/executive-summary/component/e-summary-callbacks.c b/executive-summary/component/e-summary-callbacks.c index 383fe47bc0..4d9929fc7e 100644 --- a/executive-summary/component/e-summary-callbacks.c +++ b/executive-summary/component/e-summary-callbacks.c @@ -216,6 +216,23 @@ html_page_changed_cb (GtkEntry *entry, gnome_property_box_changed (data->box); } +static void +column_spinner_changed_cb (GtkEntry *entry, + PropertyData *data) +{ + ESummaryPrefs *prefs; + char *value; + + prefs = data->esummary->tmp_prefs; + + gnome_property_box_changed (data->box); + value = gtk_entry_get_text (entry); + if (value == NULL || *value == '\0') + return; + + prefs->columns = atoi (value); +} + static void apply_prefs_cb (GnomePropertyBox *property_box, int page, @@ -238,7 +255,8 @@ configure_summary (GtkWidget *widget, static GtkWidget *prefs = NULL; PropertyData *data; GtkWidget *html_page; - GtkWidget *vbox, *html; + GtkWidget *vbox, *html, *spinner; + char *tmp; if (prefs != NULL) { g_assert (GTK_WIDGET_REALIZED (prefs)); @@ -279,6 +297,14 @@ configure_summary (GtkWidget *widget, "changed", GTK_SIGNAL_FUNC (html_page_changed_cb), data); + spinner = glade_xml_get_widget (data->xml, "columnspinner"); + + tmp = g_strdup_printf ("%d", esummary->prefs->columns); + gtk_entry_set_text (GTK_ENTRY (spinner), tmp); + g_free (tmp); + gtk_signal_connect (GTK_OBJECT (spinner), "changed", + GTK_SIGNAL_FUNC (column_spinner_changed_cb), data); + gtk_signal_connect (GTK_OBJECT (prefs), "apply", GTK_SIGNAL_FUNC (apply_prefs_cb), esummary); -- cgit