Mercurial > pidgin.yaz
diff console/libgnt/gntmain.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 | 3d1be4577fa9 |
children | 5228f8cf2a6a |
line wrap: on
line diff
--- a/console/libgnt/gntmain.c Wed Nov 01 02:13:37 2006 +0000 +++ b/console/libgnt/gntmain.c Wed Nov 01 03:38:23 2006 +0000 @@ -822,7 +822,7 @@ if (buffer[0] == 27) { /* Some special key has been pressed */ - if (strcmp(buffer+1, GNT_KEY_POPUP) == 0) + if (strcmp(buffer, GNT_KEY_POPUP) == 0) {} else if (strcmp(buffer + 1, "c") == 0) { @@ -906,7 +906,7 @@ gnt_widget_get_position(widget, &x, &y); gnt_widget_get_size(widget, &w, &h); - if (strcmp(buffer + 1, GNT_KEY_LEFT) == 0) + if (strcmp(buffer, GNT_KEY_LEFT) == 0) { if (x > X_MIN) { @@ -914,7 +914,7 @@ changed = TRUE; } } - else if (strcmp(buffer + 1, GNT_KEY_RIGHT) == 0) + else if (strcmp(buffer, GNT_KEY_RIGHT) == 0) { if (x + w < X_MAX) { @@ -922,7 +922,7 @@ changed = TRUE; } } - else if (strcmp(buffer + 1, GNT_KEY_UP) == 0) + else if (strcmp(buffer, GNT_KEY_UP) == 0) { if (y > Y_MIN) { @@ -930,7 +930,7 @@ changed = TRUE; } } - else if (strcmp(buffer + 1, GNT_KEY_DOWN) == 0) + else if (strcmp(buffer, GNT_KEY_DOWN) == 0) { if (y + h < Y_MAX) { @@ -983,7 +983,7 @@ gnt_widget_get_size(widget, &width, &height); - if (strcmp(buffer + 1, GNT_KEY_DOWN) == 0) + if (strcmp(buffer, GNT_KEY_DOWN) == 0) { if (widget->priv.y + height < Y_MAX) { @@ -991,17 +991,17 @@ changed = TRUE; } } - else if (strcmp(buffer + 1, GNT_KEY_UP) == 0) + else if (strcmp(buffer, GNT_KEY_UP) == 0) { height--; changed = TRUE; } - else if (strcmp(buffer + 1, GNT_KEY_LEFT) == 0) + else if (strcmp(buffer, GNT_KEY_LEFT) == 0) { width--; changed = TRUE; } - else if (strcmp(buffer + 1, GNT_KEY_RIGHT) == 0) + else if (strcmp(buffer, GNT_KEY_RIGHT) == 0) { if (widget->priv.x + width < X_MAX) {