'\n' (ctrl-j) should behave similar to '\r' (ctrl-m). Fixes #4833.
--- a/gntbutton.c Thu Jan 31 07:53:22 2008 +0000
+++ b/gntbutton.c Wed Feb 13 05:57:54 2008 +0000
@@ -79,7 +79,8 @@
gnt_button_key_pressed(GntWidget *widget, const char *key)
- if (strcmp(key, GNT_KEY_ENTER) == 0)
+ if (strcmp(key, GNT_KEY_ENTER) == 0 || + strcmp(key, SAFE(cursor_down)) == 0) gnt_widget_activate(widget);
--- a/gntcombobox.c Thu Jan 31 07:53:22 2008 +0000
+++ b/gntcombobox.c Wed Feb 13 05:57:54 2008 +0000
@@ -155,6 +155,7 @@
--- a/gntentry.c Thu Jan 31 07:53:22 2008 +0000
+++ b/gntentry.c Wed Feb 13 05:57:54 2008 +0000
@@ -713,7 +713,7 @@
- if ((text[0] == '\r' || text[0] == ' ') && entry->ddown)
+ if ((text[0] == '\r' || text[0] == ' ' || text[0] == '\n') && entry->ddown) char *text = g_strdup(gnt_tree_get_selection_data(GNT_TREE(entry->ddown)));
@@ -782,7 +782,7 @@
+ if (text[0] == '\r' || text[0] == '\n') { gnt_widget_activate(widget);
--- a/gntfilesel.c Thu Jan 31 07:53:22 2008 +0000
+++ b/gntfilesel.c Wed Feb 13 05:57:54 2008 +0000
@@ -342,7 +342,7 @@
dir_key_pressed(GntTree *tree, const char *key, GntFileSel *sel)
- if (strcmp(key, "\r") == 0) {
+ if (strcmp(key, "\r") == 0 || strcmp(key, "\n") == 0) { char *str = g_strdup(gnt_tree_get_selection_data(tree));
@@ -376,7 +376,7 @@
+ if (strcmp(key, "\r") && strcmp(key, "\n")) str = (char*)gnt_entry_get_text(GNT_ENTRY(sel->location));
--- a/gnttree.c Thu Jan 31 07:53:22 2008 +0000
+++ b/gnttree.c Wed Feb 13 05:57:54 2008 +0000
@@ -798,7 +798,7 @@
GntTree *tree = GNT_TREE(widget);
GntTreeRow *old = tree->current;
+ if (text[0] == '\r' || text[0] == '\n') { gnt_widget_activate(widget);
} else if (tree->priv->search) {