diff console/libgnt/gntcombobox.c @ 14876:70623f0d5cdc

[gaim-migrate @ 17645] Use terminfo/termcap information (from ncurses) as much as possible. There still need to be some manual 'refinement' based on $TERM. I'll see if I can get rid of those. Also, I am probably going to allow users to provide information that terminfo can't provide, like the keycode for ctrl+up etc. Let me know if any of the keybinding doesn't work. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 01 Nov 2006 03:38:23 +0000
parents d18b9360ba54
children 065e7ac30338
line wrap: on
line diff
--- a/console/libgnt/gntcombobox.c	Wed Nov 01 02:13:37 2006 +0000
+++ b/console/libgnt/gntcombobox.c	Wed Nov 01 03:38:23 2006 +0000
@@ -135,8 +135,8 @@
 	{
 		if (text[0] == 27)
 		{
-			if (strcmp(text + 1, GNT_KEY_UP) == 0 ||
-					strcmp(text + 1, GNT_KEY_DOWN) == 0)
+			if (strcmp(text, GNT_KEY_UP) == 0 ||
+					strcmp(text, GNT_KEY_DOWN) == 0)
 			{
 				popup_dropdown(box);
 				return TRUE;
@@ -170,10 +170,10 @@
 
 	if (event == GNT_MOUSE_SCROLL_UP) {
 		if (dshowing)
-			gnt_widget_key_pressed(box->dropdown, "\033" GNT_KEY_UP);
+			gnt_widget_key_pressed(box->dropdown, GNT_KEY_UP);
 	} else if (event == GNT_MOUSE_SCROLL_DOWN) {
 		if (dshowing)
-			gnt_widget_key_pressed(box->dropdown, "\033" GNT_KEY_DOWN);
+			gnt_widget_key_pressed(box->dropdown, GNT_KEY_DOWN);
 	} else if (event == GNT_LEFT_MOUSE_DOWN) {
 		if (dshowing) {
 			set_selection(box, gnt_tree_get_selection_data(GNT_TREE(box->dropdown)));