aboutsummaryrefslogtreecommitdiffstats
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
parentfaae476f9945cb6d9b31ee3f88e12e65b202312a (diff)
downloadgsoc2013-evolution-e41312f0b71cbd0affe760597130410c8b996e58.tar.gz
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
-rw-r--r--composer/ChangeLog9
-rw-r--r--composer/e-msg-composer-hdrs.c14
-rw-r--r--composer/e-msg-composer-hdrs.h2
-rw-r--r--composer/e-msg-composer.c36
4 files changed, 44 insertions, 17 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 14a55ab116..cb0434ec1e 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,12 @@
+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.
+
2001-01-02 Dan Winship <danw@helixcode.com>
* e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
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;
}
diff --git a/composer/e-msg-composer-hdrs.h b/composer/e-msg-composer-hdrs.h
index a495fd853c..a343fb0b7d 100644
--- a/composer/e-msg-composer-hdrs.h
+++ b/composer/e-msg-composer-hdrs.h
@@ -47,6 +47,8 @@ struct _EMsgComposerHdrs {
GtkTable parent;
EMsgComposerHdrsPrivate *priv;
+
+ gboolean has_changed;
};
struct _EMsgComposerHdrsClass {
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);
}
>-0/+9 * Make Perl link all .so it builds with libperl.so.mat2014-12-171-0/+9 * Split devel/gettext in devel/gettext-runtime and devel/gettext-tools. Thetijl2014-11-301-0/+13 * Change the way Perl modules are installed, update the default Perl to 5.18.mat2014-11-261-0/+29 * Finally retire USE_PGSQLcrees2014-11-231-0/+10 * Introduce the SITE_ARCH variable containing SITE_PERL/PERL_ARCH.mat2014-11-181-0/+6 * - Enable SSP by default.bdrewery2014-11-031-0/+8 * Add an example with @exec too.mat2014-10-081-0/+3 * Note @cwd being deprecated.mat2014-10-071-0/+15 * Add BUNDLE_LIBS knob to prevent pkg(8) from automatically add provided shlibsbapt2014-10-021-0/+7 * Remove support for old autoconf and automake versions from USE_AUTOTOOLS:tijl2014-10-011-0/+6 * If either of OSVERSION or UNAME_r is improperly set when building in abdrewery2014-10-011-0/+30 * Add hint as to where @stopdaemon has gone.mandree2014-09-251-21/+20 * Proofread the 20140922 CHANGES entry.rakuco2014-09-241-4/+4 * Document recent changes in plist handlingbapt2014-09-221-0/+19 * - Remove last uses of USE_AUTOTOOLS=libtool from bsd.gnome.mktijl2014-09-171-0/+10 * Document r368281.tijl2014-09-171-0/+11 * Remove support for pkg_installbapt2014-09-011-0/+9 * Remove support for NO_STAGEbapt2014-09-011-0/+5 * Document r366154antoine2014-08-261-0/+5 * - Rename PYTHON_FEATURES to USE_PYTHON to comply to USE_PERL5 and to avoid amva2014-08-151-3/+3 * - Fix typosunpoet2014-08-101-2/+2 * Convert the Python framework bits to USES=python.mva2014-08-091-0/+23 * Now that all LIB_DEPENDS has been switched to modern version, remove supportbapt2014-07-161-0/+5 * Support for installations based on the easy_install setup.py target hasmva2014-07-091-0/+8 * Add a bit about USE_PERL5=fixpacklist here.mat2014-06-291-0/+7 * Remove the IGNOREFILES feature: it was an unsafe feature allowing to use filesbapt2014-06-231-0/+7 * Introduce a new PYTHON_CONCURRENT_INSTALL knob to support the parallelmva2014-06-081-0/+27 * - Remove USE_GMAKE support, please use USES=gmake insteadmiwi2014-05-291-0/+5 * Drop compatibility code for USE_DOS2UNIXbapt2014-05-261-0/+5 * Convert all :U to :tu and :L to :tlbapt2014-05-051-0/+9 * Document r352514bapt2014-05-011-0/+9 * When linking a library libA with a library libB using libtool, if libB.latijl2014-04-231-0/+12 * - Rename check-orphans to check-plist. Keep the old for backwards-compat.bdrewery2014-04-191-0/+16 * - Make default target "make stage" if staging supported.bdrewery2014-04-171-0/+6 * - Add a @sample plist keywordbdrewery2014-04-121-0/+17 * Two new USES added to finish handling distfiles formats a consistent way:bapt2014-03-121-0/+14 * Add a note for USES=zip and USES=makeself which were recently added by baptrene2014-03-081-0/+10 * KDE/FreeBSD team is happy to present Qt 5 in ports!makc2014-03-041-0/+7 * - Whitespace cleanupmiwi2014-01-291-11/+11 * Add two new options helpers:mat2014-01-281-0/+11 * New USES=uniquefiles to make files or directories uniquemva2014-01-121-0/+38 * - Remove lang/python as implicit build and run dependency frommva2013-12-191-0/+22 * New USES=fortran to replace USE_FORTRAN.tijl2013-12-131-0/+14 * New USES=twisted, to replace the old USE_TWISTED knob.mva2013-12-081-0/+17 * Remove ltverhack's hard depend on USE_AUTOTOOLS=libtool.kwm2013-11-201-0/+15 * Indent 20131031 entry like the rest of the file.kwm2013-11-201-10/+10 * Add a description of USES=kmodrene2013-10-311-0/+14 * - Remove manual creation and removal of share/applications, as it's now in th...amdmi32013-10-221-0/+6 * - Fix typosunpoet2013-10-201-1/+1 * New USES=compilerbapt2013-10-091-0/+18 * - Add new USES= qmake (with staging support)makc2013-10-091-0/+8 * - PATCHFILES now support an optional :-pX flag that notes which patch stripbdrewery2013-10-051-0/+9 * Introduce the new "scons" USES. The goal is to replace the old bsd.scons.mkbapt2013-10-031-0/+6 * Add an entry about "create packages as a user"bapt2013-09-241-3/+16 * - add new USES target: zope, and convert the tree to itrm2013-09-231-0/+8 * Add support for staging area in the ports treebapt2013-09-231-0/+29 * - Rename public name of SSP support to WITH_SSP_PORTS as /usr/srcbdrewery2013-09-221-2/+2 * SSP support has been added to ports with WITH_SSP for i386 and amd64bdrewery2013-09-201-0/+22 * - Document the addition of tcl/tk to the USES and DEFAULT_VERSIONS framework.gahr2013-09-191-0/+14