Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
313:96a9bfba3880 | 314:529f887b5cb7 |
---|---|
2239 dialog_key_press_event_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) | 2239 dialog_key_press_event_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) |
2240 { | 2240 { |
2241 DialogInfo *di = (DialogInfo *)data; | 2241 DialogInfo *di = (DialogInfo *)data; |
2242 | 2242 |
2243 /* Ignore hitting "Enter" if there is no default button. */ | 2243 /* Ignore hitting "Enter" if there is no default button. */ |
2244 if (di->ignore_enter && event->keyval == GDK_Return) | 2244 if (event->keyval == GDK_Return) |
2245 { | |
2246 if (!di->ignore_enter) | |
2247 gtk_dialog_response(di->dialog, GTK_RESPONSE_ACCEPT); | |
2245 return TRUE; | 2248 return TRUE; |
2249 } | |
2246 | 2250 |
2247 /* Close the dialog when hitting "Esc". */ | 2251 /* Close the dialog when hitting "Esc". */ |
2248 if (event->keyval == GDK_Escape) | 2252 if (event->keyval == GDK_Escape) |
2249 { | 2253 { |
2250 gtk_dialog_response(di->dialog, GTK_RESPONSE_REJECT); | 2254 gtk_dialog_response(di->dialog, GTK_RESPONSE_REJECT); |
2324 response = gtk_dialog_run(GTK_DIALOG(dialog)); | 2328 response = gtk_dialog_run(GTK_DIALOG(dialog)); |
2325 | 2329 |
2326 /* GTK_RESPONSE_NONE means the dialog was programmatically destroyed. */ | 2330 /* GTK_RESPONSE_NONE means the dialog was programmatically destroyed. */ |
2327 if (response != GTK_RESPONSE_NONE) | 2331 if (response != GTK_RESPONSE_NONE) |
2328 { | 2332 { |
2333 if (response == GTK_RESPONSE_ACCEPT) /* Enter pressed */ | |
2334 response = def_but; | |
2329 if (textfield != NULL) | 2335 if (textfield != NULL) |
2330 { | 2336 { |
2331 text = (char_u *)gtk_entry_get_text(GTK_ENTRY(entry)); | 2337 text = (char_u *)gtk_entry_get_text(GTK_ENTRY(entry)); |
2332 text = CONVERT_FROM_UTF8(text); | 2338 text = CONVERT_FROM_UTF8(text); |
2333 | 2339 |