changeset 22291:708f66f5a608

merge of '29e93f056359d961762bcff9702089c1cf491fd0' and '7fa0ba16bbd2bff9027acc0c4e408c3a9df3854b'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 13 Feb 2008 06:00:50 +0000
parents 0ba0f2804299 (diff) b6fac84a0974 (current diff)
children 33b5a0e92583
files
diffstat 5 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntbutton.c	Tue Feb 12 04:14:39 2008 +0000
+++ b/finch/libgnt/gntbutton.c	Wed Feb 13 06:00:50 2008 +0000
@@ -79,7 +79,8 @@
 static gboolean
 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);
 		return TRUE;
--- a/finch/libgnt/gntcombobox.c	Tue Feb 12 04:14:39 2008 +0000
+++ b/finch/libgnt/gntcombobox.c	Wed Feb 13 06:00:50 2008 +0000
@@ -155,6 +155,7 @@
 			{
 				case '\r':
 				case '\t':
+				case '\n':
 					hide_popup(box, TRUE);
 					return TRUE;
 				case 27:
--- a/finch/libgnt/gntentry.c	Tue Feb 12 04:14:39 2008 +0000
+++ b/finch/libgnt/gntentry.c	Wed Feb 13 06:00:50 2008 +0000
@@ -713,7 +713,7 @@
 		return FALSE;
 	}
 
-	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)));
 		destroy_suggest(entry);
@@ -782,7 +782,7 @@
 		return TRUE;
 	}
 
-	if (text[0] == '\r') {
+	if (text[0] == '\r' || text[0] == '\n') {
 		gnt_widget_activate(widget);
 		return TRUE;
 	}
--- a/finch/libgnt/gntfilesel.c	Tue Feb 12 04:14:39 2008 +0000
+++ b/finch/libgnt/gntfilesel.c	Wed Feb 13 06:00:50 2008 +0000
@@ -342,7 +342,7 @@
 static gboolean
 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));
 		char *path, *dir;
 
@@ -376,7 +376,7 @@
 	struct stat st;
 	int glob_ret;
 #endif
-	if (strcmp(key, "\r"))
+	if (strcmp(key, "\r") && strcmp(key, "\n"))
 		return FALSE;
 
 	str = (char*)gnt_entry_get_text(GNT_ENTRY(sel->location));
--- a/finch/libgnt/gnttree.c	Tue Feb 12 04:14:39 2008 +0000
+++ b/finch/libgnt/gnttree.c	Wed Feb 13 06:00:50 2008 +0000
@@ -798,7 +798,7 @@
 	GntTree *tree = GNT_TREE(widget);
 	GntTreeRow *old = tree->current;
 
-	if (text[0] == '\r') {
+	if (text[0] == '\r' || text[0] == '\n') {
 		end_search(tree);
 		gnt_widget_activate(widget);
 	} else if (tree->priv->search) {