aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2001-01-04 01:29:40 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-04 01:29:40 +0800
commite41312f0b71cbd0affe760597130410c8b996e58 (patch)
tree87f11b9cf2a2bd8fece62f8ec06f09a6cd022b79 /composer/e-msg-composer.c
parentfaae476f9945cb6d9b31ee3f88e12e65b202312a (diff)
downloadgsoc2013-evolution-e41312f0b71cbd0affe760597130410c8b996e58.tar
gsoc2013-evolution-e41312f0b71cbd0affe760597130410c8b996e58.tar.gz
gsoc2013-evolution-e41312f0b71cbd0affe760597130410c8b996e58.tar.bz2
gsoc2013-evolution-e41312f0b71cbd0affe760597130410c8b996e58.tar.lz
gsoc2013-evolution-e41312f0b71cbd0affe760597130410c8b996e58.tar.xz
gsoc2013-evolution-e41312f0b71cbd0affe760597130410c8b996e58.tar.zst
gsoc2013-evolution-e41312f0b71cbd0affe760597130410c8b996e58.zip
If the headers have changed, then continue with the prompt else just
2001-01-03 Jeffrey Stedfast <fejj@helixcode.com> * 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
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r--composer/e-msg-composer.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index a494fce920..e53b3a8c64 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -737,20 +737,24 @@ do_exit (EMsgComposer *composer)
GtkWidget *label;
gint button;
- dialog = gnome_dialog_new (_("Evolution"),
- GNOME_STOCK_BUTTON_YES, /* Save */
- GNOME_STOCK_BUTTON_NO, /* Don't save */
- GNOME_STOCK_BUTTON_CANCEL, /* Cancel */
- NULL);
-
- label = gtk_label_new (_("This message has not been sent.\n\nDo you wish to save your changes?"));
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
- gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (composer));
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
- button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- exit_dialog_cb (button, composer);
+ if (E_MSG_COMPOSER_HDRS (composer->hdrs)->has_changed) {
+ dialog = gnome_dialog_new (_("Evolution"),
+ GNOME_STOCK_BUTTON_YES, /* Save */
+ GNOME_STOCK_BUTTON_NO, /* Don't save */
+ GNOME_STOCK_BUTTON_CANCEL, /* Cancel */
+ NULL);
+
+ label = gtk_label_new (_("This message has not been sent.\n\nDo you wish to save your changes?"));
+ gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label, TRUE, TRUE, 0);
+ gtk_widget_show (label);
+ gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (composer));
+ gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
+ button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
+
+ exit_dialog_cb (button, composer);
+ } else {
+ gtk_widget_destroy (GTK_WIDGET (composer));
+ }
}
/* Menu callbacks. */
@@ -1406,8 +1410,8 @@ e_msg_composer_construct (EMsgComposer *composer)
/* Set focus on the `To:' field.
gtk_widget_grab_focus (e_msg_composer_hdrs_get_to_entry (E_MSG_COMPOSER_HDRS (composer->hdrs)));
- GTK_WIDGET_SET_FLAGS (composer->editor, GTK_CAN_FOCUS);
- gtk_window_set_focus (GTK_WINDOW (composer), composer->editor); */
+ GTK_WIDGET_SET_FLAGS (composer->editor, GTK_CAN_FOCUS);
+ gtk_window_set_focus (GTK_WINDOW (composer), composer->editor); */
gtk_widget_grab_focus (composer->editor);
}