aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-09-05 07:53:00 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-09-05 07:53:00 +0800
commitf92642ab4f07a36273a8ae16df3f68cbf2592665 (patch)
tree4bb4a070e05261d93773b1fdfabdb609383b9e13 /composer
parent0857bf4b47e80fd3ac3bf99afa01c2e274244e18 (diff)
downloadgsoc2013-evolution-f92642ab4f07a36273a8ae16df3f68cbf2592665.tar.gz
gsoc2013-evolution-f92642ab4f07a36273a8ae16df3f68cbf2592665.tar.zst
gsoc2013-evolution-f92642ab4f07a36273a8ae16df3f68cbf2592665.zip
Make it so that the composer will close when the user hits Escape.
2002-09-04 Jeffrey Stedfast <fejj@ximian.com> * e-msg-composer.c (create_composer): Make it so that the composer will close when the user hits Escape. svn path=/trunk/; revision=17983
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog5
-rw-r--r--composer/e-msg-composer.c49
2 files changed, 40 insertions, 14 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 3a9a9c0f73..66ed6aa845 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-04 Jeffrey Stedfast <fejj@ximian.com>
+
+ * e-msg-composer.c (create_composer): Make it so that the composer
+ will close when the user hits Escape.
+
2002-08-27 Radek Doulik <rodo@ximian.com>
* e-msg-composer.c (signature_cb): removed "Set as default" menu item
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 9d99f023d8..b989aa8e1b 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -357,7 +357,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
if (composer->mime_body) {
plain_encoding = CAMEL_MIME_PART_ENCODING_7BIT;
for (i = 0; composer->mime_body[i]; i++) {
- if ((unsigned char)composer->mime_body[i] > 127) {
+ if ((unsigned char) composer->mime_body[i] > 127) {
plain_encoding = CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE;
break;
}
@@ -2731,6 +2731,24 @@ msg_composer_destroy_notify (void *data)
all_composers = g_slist_remove (all_composers, composer);
}
+static int
+composer_key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
+{
+ if (event->keyval == GDK_Escape) {
+ do_exit (E_MSG_COMPOSER (widget));
+
+ return TRUE; /* Stop the event? is this TRUE or FALSE? */
+ }
+
+ /* Have to call parent's handler, or the widget wouldn't get any
+ key press events. Note that this is NOT done if the dialog
+ may have been destroyed. */
+ if (GTK_WIDGET_CLASS (parent_class)->key_press_event)
+ return (* (GTK_WIDGET_CLASS (parent_class)->key_press_event)) (widget, event);
+
+ return FALSE; /* Not handled. */
+}
+
static EMsgComposer *
create_composer (int visible_mask)
{
@@ -2745,6 +2763,9 @@ create_composer (int visible_mask)
all_composers = g_slist_prepend (all_composers, composer);
+ gtk_signal_connect (GTK_OBJECT (composer), "key-press-event",
+ GTK_SIGNAL_FUNC (composer_key_pressed),
+ NULL);
gtk_signal_connect (GTK_OBJECT (composer), "destroy",
GTK_SIGNAL_FUNC (msg_composer_destroy_notify),
NULL);
@@ -3179,19 +3200,19 @@ handle_multipart_alternative (EMsgComposer *composer, CamelMultipart *multipart,
content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
if (CAMEL_IS_MULTIPART (content)) {
- CamelMultipart *child_mp;
-
- child_mp = CAMEL_MULTIPART (content);
+ CamelMultipart *mp;
+
+ mp = CAMEL_MULTIPART (content);
if (CAMEL_IS_MULTIPART_SIGNED (content)) {
/* handle the signed content and configure the composer to sign outgoing messages */
- handle_multipart_signed (composer, child_mp, depth + 1);
+ handle_multipart_signed (composer, mp, depth + 1);
} else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) {
/* decrypt the encrypted content and configure the composer to encrypt outgoing messages */
- handle_multipart_encrypted (composer, child_mp, depth + 1);
+ handle_multipart_encrypted (composer, mp, depth + 1);
} else {
/* depth doesn't matter so long as we don't pass 0 */
- handle_multipart (composer, child_mp, depth + 1);
+ handle_multipart (composer, mp, depth + 1);
}
} else if (header_content_type_is (content_type, "text", "html")) {
/* text/html is preferable, so once we find it we're done... */
@@ -3236,21 +3257,21 @@ handle_multipart (EMsgComposer *composer, CamelMultipart *multipart, int depth)
content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
if (CAMEL_IS_MULTIPART (content)) {
- CamelMultipart *child_mp;
-
- child_mp = CAMEL_MULTIPART (content);
+ CamelMultipart *mp;
+
+ mp = CAMEL_MULTIPART (content);
if (CAMEL_IS_MULTIPART_SIGNED (content)) {
/* handle the signed content and configure the composer to sign outgoing messages */
- handle_multipart_signed (composer, child_mp, depth + 1);
+ handle_multipart_signed (composer, mp, depth + 1);
} else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) {
/* decrypt the encrypted content and configure the composer to encrypt outgoing messages */
- handle_multipart_encrypted (composer, child_mp, depth + 1);
+ handle_multipart_encrypted (composer, mp, depth + 1);
} else if (header_content_type_is (content_type, "multipart", "alternative")) {
- handle_multipart_alternative (composer, child_mp, depth + 1);
+ handle_multipart_alternative (composer, mp, depth + 1);
} else {
/* depth doesn't matter so long as we don't pass 0 */
- handle_multipart (composer, child_mp, depth + 1);
+ handle_multipart (composer, mp, depth + 1);
}
} else if (depth == 0 && i == 0) {
/* Since the first part is not multipart/alternative, then this must be the body */
ate to version 0.61cpiazza1999-10-216-6/+12 * Update to 0.6.0nakai1999-10-154-8/+8 * Use PKG_PREFIX in pkg/INSTALL instead of PREFIX so this will installsteve1999-10-112-3/+3 * Update ifmail to 2.15dan1999-10-093-169/+110 * Move USE_BZIP2 down to where it belongs so portlint no longerjim1999-10-031-1/+1 * Update to version 1.2.3cpiazza1999-10-027-32/+65 * Upgrade to "Nine While Nine" the 19990927 version.obrien1999-09-283-9/+9 * Update to version 0.5.2cpiazza1999-09-286-6/+10 * Update leafnode+ port to 2.8dan1999-09-273-18/+18 * Updated to version 0.5.0jim1999-09-194-10/+10 * Enforce random pkg/COMMENT rules, including the one that states Emacshoek1999-09-182-2/+2 * Typo ("$(CHOWN}" -> "${CHOWN}"). Fix "version required" comment andasami1999-09-111-10/+10 * /var/spool/news doesn't exist by default, so create it in pre-install.asami1999-09-112-0/+6 * Upgrade to INN 2.2.1.torstenb1999-09-106-10/+20 * Update MASTER_SITEScpiazza1999-09-102-2/+2 * Update to version 0.4.9.jim1999-09-084-6/+6 * Rework configuration, add a MASTER_SITE, and honor PREFIX.steve1999-09-074-168/+209 * FreeBSD.ORG -> FreeBSD.orgmharo1999-08-3115-19/+19 * $Id$ -> $FreeBSD$peter1999-08-3044-44/+44 * Activate pan.jim1999-08-301-1/+2 * Import of pan.jim1999-08-3010-0/+96 * Remove preceeding pkgname from some of the comments having one.hoek1999-08-302-2/+2 * sed -> ${SED}mharo1999-08-281-2/+2 * ln -> ${LN}mharo1999-08-283-6/+6 * echo -> ${ECHO} or ${ECHO_MSG} and in some cases, move echo stuffmharo1999-08-283-7/+7 * grep -> ${GREP}mharo1999-08-231-2/+2 * awk -> ${AWK}mharo1999-08-232-5/+5 * chown -> ${CHOWN}mharo1999-08-231-9/+9 * chmod -> ${CHMOD}mharo1999-08-236-18/+18 * Get the sources of the inn-stable port from the download sectionandreas1999-08-221-2/+3 * Update one of the MASTER_SITEScpiazza1999-08-141-2/+2 * Change the second MASTER_SITEcpiazza1999-08-141-2/+2 * Update to the 1.4.19990805 "Preacher Man" version.obrien1999-08-072-4/+4 * "foo" and "bar" are not valid categories. :)asami1999-08-051-2/+2 * Activate bgrabcpiazza1999-08-021-1/+2 * Import of bgrab.cpiazza1999-08-027-0/+75 * Upgrade to dejasearch 1.6.3kris1999-07-274-15/+9 * Update inn-stable to latest version inn-STABLE_2_2-1999-07-24_03-02andreas1999-07-252-3/+3 * Upgrade to suck-4.2.1jseger1999-07-222-4/+4 * Adjust do-install target to match reality (${MACHINE_ARCH} now part ofasami1999-07-191-3/+3 * Update to 0.9.5.7cpiazza1999-07-172-4/+5 * Unified the writing of working directories.sada1999-07-062-4/+6 * Change maintainer's email address.cpiazza1999-07-051-3/+3 * No need to use -p since ${MKDIR} == 'mkdir -p'.steve1999-07-051-2/+2 * A bit of portlint cleaning and fix a few style nits.steve1999-07-051-28/+36 * Add `LEAF_SETUP_WRKDIRS' option variable which enables a user tosada1999-07-055-23/+69 * Commit #3/4 to enforce caps, no period.hoek1999-06-2730-30/+30 * Upgrade to the 19990624 pre-1.4 release.obrien1999-06-262-4/+4 * time(3) returns a time_t and not a long.steve1999-06-232-0/+22 * Fix for archs where sizeof(long) != sizeof(time_t).steve1999-06-231-0/+29 * Use 'ln -sf' for the /var/news symlink just in case it already exists.steve1999-06-231-1/+1 * Update to use pgp-verify version 1.12.steve1999-06-102-6/+6 * Use {PERL5} rather than hardcoded path.obrien1999-06-091-2/+2 * Activate the gup port.steve1999-06-091-1/+2 * Initial import of gup version 0.4.steve1999-06-099-0/+93 * Update to version 1.1.steve1999-06-093-7/+7 * Moved these files to the distfiles directory on my homepage.steve1999-05-301-2/+2 * Correct distfile fennerage by upgrading to beta72.mph1999-05-222-5/+5 * update to 0.9.5.6mharo1999-05-172-5/+3 * Update to version 9.5.5.steve1999-05-172-4/+4 * Fix a typo.torstenb1999-05-122-4/+4 * Tweak fetch URLs slightly.obrien1999-05-101-3/+3 * LIB_DEPENDS on the new unified xview port.steve1999-05-051-2/+2 * WWW: - the root of all evilmharo1999-05-039-7/+14 * Mark this port as being interactive and other misc. cleanups from thesteve1999-05-034-26/+55 * Stick this port's distfiles on my homepage since it has disappearedsteve1999-05-031-2/+2 * fix port so it buildsmharo1999-05-032-2/+15 * Upgrade to inn 2.2-releasetorstenb1999-05-038-280/+308 * This port hangs during parallel package build....asami1999-04-231-1/+5 * this should finish cleaning up the WWW_SITE -> DESCR/WWW: mess ...scrappy1999-04-222-3/+3 * upgrade dejanews to 1.2mharo1999-04-202-5/+7 * Split up patchfiles. Add patch from PR 9710. Update md5 file so itmharo1999-04-168-213/+247 * Add p5-libwww to dependency list and remove dead MASTER_SITE.mharo1999-04-162-4/+5 * Upgrade Styrofoam to Endemoniadaobrien1999-04-153-19/+4 * Upgrade news/suck to 4.1.1jseger1999-04-122-4/+4 * remove manpages from PLISTandreas1999-04-111-1/+0 * Oops, remove manpages from PLIST as requested from Satoshi.andreas1999-04-111-88/+0 * Update inn stable to inn-STABLE_2_2-1999-04-08_03-01andreas1999-04-113-100/+114 * don't include realname from passwd to Sender field, can contain illegal charsache1999-04-101-0/+15 * If not upgrading from a previous version of Leafnode or Leafnode+,jseger1999-04-082-4/+15 * Remove extraneous VAR setting (forgotten from testing)brian1999-04-051-3/+2 * Update to version 2.6.steve1999-04-035-33/+42 * restore bzip dependsache1999-03-272-3/+3 * Upgrade to suck-4.1.0jseger1999-03-255-80/+40 * Add PKGNAME, no - allowed in version number part.asami1999-03-221-1/+2 * leafnode-1.4 -> leafnode-1.9.2brian1999-03-225-28/+56 * don't depend on bzip and gmakeache1999-03-202-5/+3 * Activate dejasearch.kris1999-03-141-1/+2 * Oops, use USE_PERL5.kris1999-03-141-0/+1 * DejaSearch is a frontend script to the DejaNews service which allowskris1999-03-145-0/+39 * Upgrade to the 19990216 tin-pre 1.4 releaseobrien1999-03-022-8/+9 * Step III:andreas1999-03-011-2/+2 * Added COPYRIGHT fileandreas1999-02-251-0/+21 * Copyright notice addedandreas1999-02-252-11/+17 * updated inn2 to last recent STABLE versionandreas1999-02-242-29/+42 * correct path for rc.news $PREFIX/news/bin/rc.newsandreas1999-02-221-1/+1 * Add a bunch of new patches.steve1999-02-224-10/+52 * Famous last words for UUCP users, because path of rnews has changed in inn2.andreas1999-02-181-2/+8 * incoming/bad is also neededandreas1999-02-171-1/+3 * news.daily: an incoming spool dir is needed.andreas1999-02-171-1/+3 * grammar...andreas1999-02-171-2/+2 * Enable new inn2 portandreas1999-02-171-1/+2 * when having newsfeeds over UUCP rnews has to be readable for uuxqt ...andreas1999-02-171-1/+3 * New port inn2.2-stable after repository copy.andreas1999-02-176-126/+265 * Update to 1.19flathill1999-02-133-9/+6 * Update to 3.10.4.flathill1999-02-123-33/+76 * fix configure mistakesache1999-02-113-4/+33 * Correct distfile fennerage by upgrading to 4.0b70.mph1999-02-102-5/+5 * Use double quotes rather than single quotes in the pre-configurejdp1999-01-301-11/+11 * Activate the newsfish port.steve1999-01-261-1/+2 * Initial import of newsfish version 1.0.1.steve1999-01-266-0/+46 * Get rid of a couple of defunct MASTER_SITES.steve1999-01-261-3/+1 * Update MASTER_SITES and checksum.steve1999-01-262-4/+4 * Update to version 1.07. Also use ${PERL5} to find the perl binary.steve1999-01-262-6/+6 * Bump png's major number to 3.vanilla1999-01-231-2/+2 * Use the version number pmapp.c since the distfile doesn't have a version.steve1999-01-181-6/+5 * Honor PREFIX and install documentation.steve1999-01-183-12/+291 * A couple more Y2K links I've been able to find...scrappy1999-01-134-4/+12 * Rewrite p5- module's PLIST for alpha.simokawa1999-01-113-6/+6 * Warn the user if a news spool directory doesn't exist. Also add anothersteve1999-01-111-3/+5 * Update to new knews version 1.0b.1.andreas1999-01-084-31/+17 * remove -m486 option for alpha.simokawa1999-01-051-1/+1 * Upgrade to 2.3.mph1998-12-297-357/+43 * DISTFILE movement and updating of checksum.billf1998-12-272-3/+3 * fidogate uses bad pathsflathill1998-12-242-21/+12 * Oops, let the port name slip into the COMMENT.steve1998-12-241-1/+1 * Activate the leafnode+ port.steve1998-12-241-1/+2 * Initial import of leafnode+ version 1.2.steve1998-12-248-0/+536 * Activate the p5-News-Newsrc and re-order.steve1998-12-241-2/+3 * Initial import of p5-News-Newsrc version 1.06.steve1998-12-245-0/+47 * Update to version 4.7k.steve1998-12-234-129/+136 * Switch to better MASTER_SITEsjseger1998-12-182-4/+8 * Activate fidogate.jseger1998-12-121-1/+2 * Import of fidogate 4.2.9jseger1998-12-126-0/+167 * Add more MASTER_SITES.vanilla1998-12-111-3/+3 * Sort entries. In particular, "large", "medium", "small" sort in this order,asami1998-12-071-2/+2 * Upgrade to 0.9.5.4, and use the correct sendmail.billf1998-12-073-4/+15 * Upgrade to 1.21, associated changes.billf1998-12-032-7/+7 * Can't maintain dnews anymore sice I don't need it anymore sinceandreas1998-12-031-2/+2 * BROKEN='fetch, distfile not avail. (version 4.7k is the latest)'obrien1998-12-011-1/+3 * Bypass a sanity check that see if stdin is closedsmace1998-11-241-0/+19 * Remove extraneous x11 from CATEGORIES.steve1998-11-211-2/+2 * mp -> mp-letterasami1998-11-201-2/+2 * Don't use a variable that conflicts with bsd.port.mk USE_PERL5.hoek1998-11-073-12/+12 * really upgrade it this time.obrien1998-11-031-0/+116 * Fix to work under perl5/fbsd3.0.obrien1998-11-031-7/+8 * No need to use += for a variable defined only once.asami1998-10-201-2/+2 * Unbreak. Submitted by: stevejseger1998-10-151-3/+2 * Mark BROKEN for ELF:jseger1998-10-141-1/+3 * Update to version 0.9.5.3.steve1998-10-102-5/+5 * original distribution updated (1.2 -> 1.21)itojun1998-10-072-4/+4 * Upgrade to beta-69.mph1998-09-262-5/+5 * devel/libslang has been ELFized.asami1998-09-251-2/+2 * Remove regexp support for libxview not that it builds ELF too.steve1998-09-221-2/+2 * Roll back libpng major to 2.asami1998-09-171-2/+2 * Roll back libXpm major to 4. Sorry, it wasn't a good idea to bump itasami1998-09-171-2/+2 * Use ${PERL5} wherever appropriate. Largely untested; hope my eyeballasami1998-09-162-4/+4 * libpng major is now 3. Also remove regexp support in preparation forasami1998-09-151-2/+2 * jpeg is now converted to ELF so change LIB_DEPENDS lines accordingly.asami1998-09-151-2/+2 * libXpm major is now 5. Also remove regexp support in preparation forasami1998-09-151-2/+2 * Remove quasi-important articles to get this under the 70-char limit.hoek1998-09-061-1/+1 * Don't list lusers.org as an example site, since that site now existshoek1998-09-061-1/+1 * Don't assume env TMPDIR is defined.hoek1998-09-061-5/+8 * cnews is no longer broken.steve1998-08-301-2/+1 * Unbreak, portlint, and cleanup pkg/PLIST. NOTE: some of thesteve1998-08-302-59/+146 * Add a reminder that this software is not free and give a pointer tosteve1998-08-241-0/+3 * NEWSFLASH! Manpages to be deleted from PLISTs!hoek1998-08-20