diff src/gui_gtk.c @ 314:529f887b5cb7

updated for version 7.0082
author vimboss
date Tue, 07 Jun 2005 21:09:25 +0000
parents a20218704019
children 7033303ea0c0
line wrap: on
line diff
--- a/src/gui_gtk.c
+++ b/src/gui_gtk.c
@@ -2241,8 +2241,12 @@ dialog_key_press_event_cb(GtkWidget *wid
     DialogInfo *di = (DialogInfo *)data;
 
     /* Ignore hitting "Enter" if there is no default button. */
-    if (di->ignore_enter && event->keyval == GDK_Return)
+    if (event->keyval == GDK_Return)
+    {
+	if (!di->ignore_enter)
+	    gtk_dialog_response(di->dialog, GTK_RESPONSE_ACCEPT);
 	return TRUE;
+    }
 
     /* Close the dialog when hitting "Esc". */
     if (event->keyval == GDK_Escape)
@@ -2326,6 +2330,8 @@ gui_mch_dialog(int	type,	    /* type of 
     /* GTK_RESPONSE_NONE means the dialog was programmatically destroyed. */
     if (response != GTK_RESPONSE_NONE)
     {
+	if (response == GTK_RESPONSE_ACCEPT)	    /* Enter pressed */
+	    response = def_but;
 	if (textfield != NULL)
 	{
 	    text = (char_u *)gtk_entry_get_text(GTK_ENTRY(entry));