changeset 7455:3a5f89ba0da5

[gaim-migrate @ 8068] we'll see if anyone complains about this committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 07 Nov 2003 06:40:07 +0000
parents 50f4386a8262
children 702fbd2460d7
files src/gtknotify.c
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtknotify.c	Fri Nov 07 03:27:45 2003 +0000
+++ b/src/gtknotify.c	Fri Nov 07 06:40:07 2003 +0000
@@ -22,6 +22,8 @@
  */
 #include "gtkinternal.h"
 
+#include <gdk/gdkkeysyms.h>
+
 #include "connection.h"
 #include "debug.h"
 #include "prefs.h"
@@ -259,6 +261,17 @@
 	return data;
 }
 
+static
+gboolean formatted_input_cb(GtkWidget *dialog,
+		GdkEventKey *event, gpointer data)
+{
+	if (event->keyval == GDK_Escape) {
+		gtk_object_destroy(GTK_OBJECT(dialog));
+		return TRUE;
+	}
+	return FALSE;
+}
+
 static void *
 gaim_gtk_notify_formatted(const char *title, const char *primary,
 						  const char *secondary, const char *text,
@@ -325,6 +338,9 @@
 
 	g_signal_connect_swapped(G_OBJECT(button), "clicked",
 					 G_CALLBACK(formatted_close_cb), window);
+	g_signal_connect(G_OBJECT(window), "key_press_event",
+			G_CALLBACK(formatted_input_cb), NULL);
+
 
 	/* Add the text to the gtkimhtml */
 	if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_colors"))