From e41312f0b71cbd0affe760597130410c8b996e58 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 3 Jan 2001 17:29:40 +0000 Subject: If the headers have changed, then continue with the prompt else just 2001-01-03 Jeffrey Stedfast * e-msg-composer.c (do_exit): If the headers have changed, then continue with the prompt else just destroy the window. * e-msg-composer-hdrs.c (init): Initialize has_changed to FALSE. (entry_changed): New callback to set the value of has_changed. (add_header): Attach the "changed" signal. svn path=/trunk/; revision=7234 --- composer/e-msg-composer-hdrs.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'composer/e-msg-composer-hdrs.c') diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c index 8ea0ea5d4e..edd8ff6803 100644 --- a/composer/e-msg-composer-hdrs.c +++ b/composer/e-msg-composer-hdrs.c @@ -215,6 +215,13 @@ create_addressbook_entry (EMsgComposerHdrs *hdrs, return control_widget; } +static void +entry_changed (GtkWidget *entry, EMsgComposerHdrs *hdrs) +{ + /* Set the has_changed var to TRUE */ + hdrs->has_changed = TRUE; +} + static GtkWidget * add_header (EMsgComposerHdrs *hdrs, const gchar *name, @@ -275,6 +282,9 @@ add_header (EMsgComposerHdrs *hdrs, 2, 2); gtk_tooltips_set_tip (hdrs->priv->tooltips, entry, tip, tip_private); + + gtk_signal_connect (GTK_OBJECT (entry), "changed", + GTK_SIGNAL_FUNC (entry_changed), hdrs); } priv->num_hdrs++; @@ -386,8 +396,10 @@ init (EMsgComposerHdrs *hdrs) priv->tooltips = gtk_tooltips_new (); priv->num_hdrs = 0; - + hdrs->priv = priv; + + hdrs->has_changed = FALSE; } -- cgit