aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/comp-editor.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-12-09 05:16:54 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-12-09 05:16:54 +0800
commit75f8d193c4e79bda653b2d0d96856117f1d5d3d3 (patch)
tree227ab4615244cd738262c5139c86bfcb33118d57 /calendar/gui/dialogs/comp-editor.c
parentdffbebe88bc54a5ffc4ea414a835c4a14672d87e (diff)
downloadgsoc2013-evolution-75f8d193c4e79bda653b2d0d96856117f1d5d3d3.tar
gsoc2013-evolution-75f8d193c4e79bda653b2d0d96856117f1d5d3d3.tar.gz
gsoc2013-evolution-75f8d193c4e79bda653b2d0d96856117f1d5d3d3.tar.bz2
gsoc2013-evolution-75f8d193c4e79bda653b2d0d96856117f1d5d3d3.tar.lz
gsoc2013-evolution-75f8d193c4e79bda653b2d0d96856117f1d5d3d3.tar.xz
gsoc2013-evolution-75f8d193c4e79bda653b2d0d96856117f1d5d3d3.tar.zst
gsoc2013-evolution-75f8d193c4e79bda653b2d0d96856117f1d5d3d3.zip
fixes the tool tip crash.
svn path=/trunk/; revision=30738
Diffstat (limited to 'calendar/gui/dialogs/comp-editor.c')
-rw-r--r--calendar/gui/dialogs/comp-editor.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 86c8116bdb..290b25afa3 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -1169,6 +1169,22 @@ key_press_event(GtkWidget *widget, GdkEventKey *event)
return FALSE;
}
+static gint
+editor_key_press_event(GtkWidget *widget, GdkEventKey *event, CompEditor *editor)
+{
+ EAttachmentBar *bar = E_ATTACHMENT_BAR (widget);
+
+ if (event->keyval == GDK_Escape) {
+ commit_all_fields (editor);
+
+ if (prompt_to_save_changes (editor, TRUE))
+ close_dialog (editor);
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
/* Menu callbacks */
static void
menu_file_save_cb (BonoboUIComponent *uic,
@@ -1338,6 +1354,7 @@ setup_widgets (CompEditor *editor)
gtk_notebook_set_show_tabs (priv->notebook, FALSE);
g_signal_connect (editor, "delete_event", G_CALLBACK (delete_event_cb), editor);
+ g_signal_connect (editor, "key_press_event", G_CALLBACK (editor_key_press_event), editor);
/*Attachments */
priv->attachment_scrolled_window = gtk_scrolled_window_new (NULL, NULL);