comparison src/gui_gtk.c @ 867:a5677b7ce858

updated for version 7.0g04
author vimboss
date Fri, 05 May 2006 21:15:17 +0000
parents bc620d6bdf06
children b2dcb8457067
comparison
equal deleted inserted replaced
866:5de6b337e1a2 867:a5677b7ce858
2219 static gboolean 2219 static gboolean
2220 dialog_key_press_event_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) 2220 dialog_key_press_event_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
2221 { 2221 {
2222 DialogInfo *di = (DialogInfo *)data; 2222 DialogInfo *di = (DialogInfo *)data;
2223 2223
2224 #ifndef HAVE_GTK2
2225 /* Ignore hitting "Enter" if there is no default button. */
2226 if (event->keyval == GDK_Return)
2227 {
2228 if (!di->ignore_enter)
2229 gtk_dialog_response(di->dialog, GTK_RESPONSE_ACCEPT);
2230 return TRUE;
2231 }
2232 #endif
2233
2234 /* Close the dialog when hitting "Esc". */ 2224 /* Close the dialog when hitting "Esc". */
2235 if (event->keyval == GDK_Escape) 2225 if (event->keyval == GDK_Escape)
2236 { 2226 {
2237 gtk_dialog_response(di->dialog, GTK_RESPONSE_REJECT); 2227 gtk_dialog_response(di->dialog, GTK_RESPONSE_REJECT);
2238 return TRUE; 2228 return TRUE;