Mercurial > vim
changeset 2649:b2789846ed39 v7.3.069
updated for version 7.3.069
Problem: GTK: pressing Enter in inputdialog() doesn't work like clicking OK
as documented.
Solution: call gtk_entry_set_activates_default(). (Britton Kerin)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 24 Nov 2010 18:48:12 +0100 |
parents | 656e652c6579 |
children | ef3a3ec8940c |
files | src/gui_gtk.c src/version.c |
diffstat | 2 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gui_gtk.c +++ b/src/gui_gtk.c @@ -1287,6 +1287,9 @@ gui_mch_dialog(int type, /* type of entry = gtk_entry_new(); gtk_widget_show(entry); + /* Make Enter work like pressing OK. */ + gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE); + text = CONVERT_TO_UTF8(textfield); gtk_entry_set_text(GTK_ENTRY(entry), (const char *)text); CONVERT_TO_UTF8_FREE(text);