Mercurial > pidgin.yaz
annotate console/libgnt/gntkeys.c @ 14693:ae0136b0a3ae
[gaim-migrate @ 17445]
Patch #1569730 from Richard Nelson (wabz):
"This patch adds a "Clear" button, timestamp and pause
options, and stops it scrolling down if it's scrolled up."
and
"Also gives the debug window a name, so window managers
can more easily have their way with it."
These changes make the debug window a whole lot more usable.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 08 Oct 2006 03:56:06 +0000 |
parents | ae4cbed1b309 |
children | 70623f0d5cdc |
rev | line source |
---|---|
14091
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
1 #include "gntkeys.h" |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
2 |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
3 #include <string.h> |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
4 |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
5 void gnt_keys_refine(char *text) |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
6 { |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
7 if (text[0] == 27) |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
8 { |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
9 /* These are for urxvt */ |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
10 if (strcmp(text + 1, "Oa") == 0) |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
11 { |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
12 strcpy(text + 1, GNT_KEY_CTRL_UP); |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
13 } |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
14 else if (strcmp(text + 1, "Ob") == 0) |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
15 { |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
16 strcpy(text + 1, GNT_KEY_CTRL_DOWN); |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
17 } |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
18 } |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
19 else if ((unsigned char)text[0] == 195) |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
20 { |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
21 /* These for xterm */ |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
22 if (text[2] == 0) |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
23 { |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
24 text[0] = 27; |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
25 text[1] -= 64; |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
26 } |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
27 } |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
28 } |
ae4cbed1b309
[gaim-migrate @ 16715]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
29 |