diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-10-28 02:38:28 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-10-28 02:38:28 +0800 |
commit | 08761f5b182bf40f7a534b24055cf83c8926cd30 (patch) | |
tree | 6c07643c36e88826b1459e65f2e90acb3d431254 | |
parent | 28b3e37c8a597f966062a2cf01cf2160bb2ad7af (diff) | |
download | gsoc2013-evolution-08761f5b182bf40f7a534b24055cf83c8926cd30.tar.gz gsoc2013-evolution-08761f5b182bf40f7a534b24055cf83c8926cd30.tar.zst gsoc2013-evolution-08761f5b182bf40f7a534b24055cf83c8926cd30.zip |
Close on Esc. (create_composer): Connect to the key-press-event signal.
2004-10-27 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (composer_key_pressed): Close on Esc.
(create_composer): Connect to the key-press-event signal.
svn path=/trunk/; revision=27743
-rw-r--r-- | composer/ChangeLog | 13 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 17 |
2 files changed, 27 insertions, 3 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 5310da6fce..a94023731b 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,10 +1,17 @@ +2004-10-27 Jeffrey Stedfast <fejj@ximian.com> + + * e-msg-composer.c (composer_key_pressed): Close on Esc. + (create_composer): Connect to the key-press-event signal. + 2004-10-26 mengjie yu <meng-jie.yu@sun.com> fix for bugzilla #44876 - * e-msg-composer-hdrs.c (header_new_recipient), (create_headers): add access key for Reply_to, - From,Subject,To,Cc,Bcc,Post_to; - * e-msg-composer.c: (setup_signatures_menu):Add accesss key for Signature. + * e-msg-composer-hdrs.c (header_new_recipient, create_headers): + add access key for Reply_to, From, Subject, To, Cc, Bcc, Post_to + + * e-msg-composer.c (setup_signatures_menu): Add accesss key for + Signature. 2004-10-19 JP Rosevear <jpr@novell.com> diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 921386159e..9ab83158e6 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -3199,6 +3199,19 @@ msg_composer_destroy_notify (void *data) all_composers = g_slist_remove (all_composers, composer); } +static int +composer_key_pressed (EMsgComposer *composer, GdkEventKey *event, void *user_data) +{ + if (event->keyval == GDK_Escape) { + do_exit (composer); + g_signal_stop_emission_by_name (composer, "key-press-event"); + return TRUE; + } + + return FALSE; +} + + /* Verbs for non-control entries */ static BonoboUIVerb entry_verbs [] = { BONOBO_UI_VERB ("EditCut", menu_edit_cut_cb), @@ -3318,6 +3331,10 @@ create_composer (int visible_mask) all_composers = g_slist_prepend (all_composers, composer); + g_signal_connect (composer, "key-press-event", + G_CALLBACK (composer_key_pressed), + NULL); + g_signal_connect (composer, "destroy", G_CALLBACK (msg_composer_destroy_notify), NULL); |