2004-08-21 [colin] 0.9.12cvs74.2
[claws.git] / src / gtk / colorsel.c
index 2896f97014095bf62776c83543f8cd529a296ff8..b5c9627a6f6a7b2e517dd31bbdbf74009387ec65 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
 
 #include "colorsel.h"
 #include "manage_window.h"
@@ -38,8 +39,16 @@ static gboolean quote_colors_set_dialog_key_pressed(GtkWidget *widget,
                                                GdkEventKey *event,
                                                gpointer data)
 {
-       *((gint *) data) = 1;
-       gtk_main_quit();
+       if (event && event->keyval == GDK_Escape) {
+               *((gint *) data) = 1;
+               gtk_main_quit();
+               return TRUE;
+       } else if (event && event->keyval == GDK_Return) {
+               *((gint *) data) = 0;
+               gtk_main_quit();
+               return FALSE;
+       }
+       return FALSE;
 }
 
 gint colorsel_select_color_rgb(gchar *title, gint rgbvalue)