im.pidgin.pidgin: 29e93f056359d961762bcff9702089c1cf491fd0

sadrul at pidgin.im sadrul at pidgin.im
Wed Feb 13 01:00:46 EST 2008


-----------------------------------------------------------------
Revision: 29e93f056359d961762bcff9702089c1cf491fd0
Ancestor: a86cc370be80c0a0f0688ae2dec4f55775779fa1
Author: sadrul at pidgin.im
Date: 2008-02-13T05:57:54
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/29e93f056359d961762bcff9702089c1cf491fd0

Modified files:
        finch/libgnt/gntbutton.c finch/libgnt/gntcombobox.c
        finch/libgnt/gntentry.c finch/libgnt/gntfilesel.c
        finch/libgnt/gnttree.c

ChangeLog: 

'\n' (ctrl-j) should behave similar to '\r' (ctrl-m). Fixes #4833.

-------------- next part --------------
============================================================
--- finch/libgnt/gntbutton.c	f58b015839409d9ac55ff85be81b61cd0d22448c
+++ finch/libgnt/gntbutton.c	a947c6212594ebc4d7cfdf4d957d43e37b455abc
@@ -79,7 +79,8 @@ gnt_button_key_pressed(GntWidget *widget
 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;
============================================================
--- finch/libgnt/gntcombobox.c	3f04f2a89f6b9226915cb23f715cf032d5a31276
+++ finch/libgnt/gntcombobox.c	59421d856192fd78ce26c72b3c910154559555ef
@@ -155,6 +155,7 @@ gnt_combo_box_key_pressed(GntWidget *wid
 			{
 				case '\r':
 				case '\t':
+				case '\n':
 					hide_popup(box, TRUE);
 					return TRUE;
 				case 27:
============================================================
--- finch/libgnt/gntentry.c	1691fcf276c83124aa5e63c05d2f360fb9dc8919
+++ finch/libgnt/gntentry.c	b5dcf9cdc13bf2d088fda32c12a71bdfaadcecc5
@@ -713,7 +713,7 @@ gnt_entry_key_pressed(GntWidget *widget,
 		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 @@ gnt_entry_key_pressed(GntWidget *widget,
 		return TRUE;
 	}
 
-	if (text[0] == '\r') {
+	if (text[0] == '\r' || text[0] == '\n') {
 		gnt_widget_activate(widget);
 		return TRUE;
 	}
============================================================
--- finch/libgnt/gntfilesel.c	243a4b6d567f73b479dc81f699d9188dbf051012
+++ finch/libgnt/gntfilesel.c	3583c3bb977baf11ea03ce2dae7208a08934ab08
@@ -342,7 +342,7 @@ dir_key_pressed(GntTree *tree, const cha
 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 @@ location_key_pressed(GntTree *tree, cons
 	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));
============================================================
--- finch/libgnt/gnttree.c	9d206421026420da8278f4c2cfad91cb54379675
+++ finch/libgnt/gnttree.c	543c598fe75014100e6540620ed6301ad84c0c17
@@ -798,7 +798,7 @@ gnt_tree_key_pressed(GntWidget *widget, 
 	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) {


More information about the Commits mailing list