aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-07-26 04:24:38 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-07-26 04:24:38 +0800
commitc3e490d2c3370d3c32641a9640f0046f8138de10 (patch)
tree8b304e42302bb053fd249e2792abde666755d707 /mail
parentbb0aa94cd0d6da63e449811bb1959ba0d462fb0a (diff)
downloadgsoc2013-evolution-c3e490d2c3370d3c32641a9640f0046f8138de10.tar
gsoc2013-evolution-c3e490d2c3370d3c32641a9640f0046f8138de10.tar.gz
gsoc2013-evolution-c3e490d2c3370d3c32641a9640f0046f8138de10.tar.bz2
gsoc2013-evolution-c3e490d2c3370d3c32641a9640f0046f8138de10.tar.lz
gsoc2013-evolution-c3e490d2c3370d3c32641a9640f0046f8138de10.tar.xz
gsoc2013-evolution-c3e490d2c3370d3c32641a9640f0046f8138de10.tar.zst
gsoc2013-evolution-c3e490d2c3370d3c32641a9640f0046f8138de10.zip
Handle our own Delete key presses. Fixes bug #45597.
2003-07-25 Jeffrey Stedfast <fejj@ximian.com> * message-browser.c (message_browser_new): Handle our own Delete key presses. Fixes bug #45597. svn path=/trunk/; revision=21971
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/message-browser.c21
2 files changed, 26 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 83ecc9fa81..de0a213e33 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-25 Jeffrey Stedfast <fejj@ximian.com>
+
+ * message-browser.c (message_browser_new): Handle our own Delete
+ key presses. Fixes bug #45597.
+
2003-07-23 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (mail_format_data_wrapper_write_to_stream): Revert
diff --git a/mail/message-browser.c b/mail/message-browser.c
index 572cc2f5d1..9c7c8dee51 100644
--- a/mail/message-browser.c
+++ b/mail/message-browser.c
@@ -328,6 +328,25 @@ set_bonobo_ui (GtkWidget *widget, FolderBrowser *fb)
/*bonobo_ui_component_thaw (uic, NULL);*/
}
+static int
+on_key_press (GtkWidget *widget, GdkEventKey *key, gpointer data)
+{
+ MessageBrowser *mb = data;
+
+ if (key->state & GDK_CONTROL_MASK)
+ return FALSE;
+
+ switch (key->keyval) {
+ case GDK_Delete:
+ case GDK_KP_Delete:
+ message_browser_delete (NULL, mb, NULL);
+ return TRUE;
+ default:
+ }
+
+ return FALSE;
+}
+
GtkWidget *
message_browser_new (const GNOME_Evolution_Shell shell, const char *uri, const char *uid)
{
@@ -369,6 +388,8 @@ message_browser_new (const GNOME_Evolution_Shell shell, const char *uri, const c
new->loaded_id = g_signal_connect (fb, "folder_loaded", G_CALLBACK (message_browser_folder_loaded), new);
g_signal_connect (fb, "message_loaded", G_CALLBACK (message_browser_message_loaded), new);
+ g_signal_connect (new, "key_press_event", G_CALLBACK (on_key_press), new);
+
return GTK_WIDGET (new);
}