aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}