1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Removed commented code, renamed win switch handlers

This commit is contained in:
James Booth 2015-01-31 22:12:27 +00:00
parent baa122e7dc
commit 84688c063e
2 changed files with 30 additions and 52 deletions

View File

@ -184,28 +184,6 @@ gboolean
ui_readline(void)
{
return inp_readline();
// int key_type;
// wint_t ch;
//
// char *line = inp_read(&key_type, &ch);
// _win_handle_switch(ch);
//
// ProfWin *current = wins_get_current();
// win_handle_page(current, ch, key_type);
//
// if (ch == KEY_RESIZE) {
// ui_resize();
// }
//
// if (ch != ERR && key_type != ERR) {
// ui_reset_idle_time();
// ui_input_nonblocking(TRUE);
// } else {
// ui_input_nonblocking(FALSE);
// }
//
// return line;
}
void

View File

@ -121,70 +121,70 @@ tab_handler(int count, int key)
}
int
alt1_handler(int count, int key)
win1_handler(int count, int key)
{
ui_switch_win(1);
return 0;
}
int
alt2_handler(int count, int key)
win2_handler(int count, int key)
{
ui_switch_win(2);
return 0;
}
int
alt3_handler(int count, int key)
win3_handler(int count, int key)
{
ui_switch_win(3);
return 0;
}
int
alt4_handler(int count, int key)
win4_handler(int count, int key)
{
ui_switch_win(4);
return 0;
}
int
alt5_handler(int count, int key)
win5_handler(int count, int key)
{
ui_switch_win(5);
return 0;
}
int
alt6_handler(int count, int key)
win6_handler(int count, int key)
{
ui_switch_win(6);
return 0;
}
int
alt7_handler(int count, int key)
win7_handler(int count, int key)
{
ui_switch_win(7);
return 0;
}
int
alt8_handler(int count, int key)
win8_handler(int count, int key)
{
ui_switch_win(8);
return 0;
}
int
alt9_handler(int count, int key)
win9_handler(int count, int key)
{
ui_switch_win(9);
return 0;
}
int
alt0_handler(int count, int key)
win0_handler(int count, int key)
{
ui_switch_win(0);
return 0;
@ -235,27 +235,27 @@ altpagedown_handler(int count, int key)
int
startup_hook(void)
{
rl_bind_keyseq("\\e1", alt1_handler);
rl_bind_keyseq("\\e2", alt2_handler);
rl_bind_keyseq("\\e3", alt3_handler);
rl_bind_keyseq("\\e4", alt4_handler);
rl_bind_keyseq("\\e5", alt5_handler);
rl_bind_keyseq("\\e6", alt6_handler);
rl_bind_keyseq("\\e7", alt7_handler);
rl_bind_keyseq("\\e8", alt8_handler);
rl_bind_keyseq("\\e9", alt9_handler);
rl_bind_keyseq("\\e0", alt0_handler);
rl_bind_keyseq("\\e1", win1_handler);
rl_bind_keyseq("\\e2", win2_handler);
rl_bind_keyseq("\\e3", win3_handler);
rl_bind_keyseq("\\e4", win4_handler);
rl_bind_keyseq("\\e5", win5_handler);
rl_bind_keyseq("\\e6", win6_handler);
rl_bind_keyseq("\\e7", win7_handler);
rl_bind_keyseq("\\e8", win8_handler);
rl_bind_keyseq("\\e9", win9_handler);
rl_bind_keyseq("\\e0", win0_handler);
rl_bind_keyseq("\\eOP", alt1_handler);
rl_bind_keyseq("\\eOQ", alt2_handler);
rl_bind_keyseq("\\eOR", alt3_handler);
rl_bind_keyseq("\\eOS", alt4_handler);
rl_bind_keyseq("\\e[15~", alt5_handler);
rl_bind_keyseq("\\e[17~", alt6_handler);
rl_bind_keyseq("\\e[18~", alt7_handler);
rl_bind_keyseq("\\e[19~", alt8_handler);
rl_bind_keyseq("\\e[20~", alt9_handler);
rl_bind_keyseq("\\e[21~", alt0_handler);
rl_bind_keyseq("\\eOP", win1_handler);
rl_bind_keyseq("\\eOQ", win2_handler);
rl_bind_keyseq("\\eOR", win3_handler);
rl_bind_keyseq("\\eOS", win4_handler);
rl_bind_keyseq("\\e[15~", win5_handler);
rl_bind_keyseq("\\e[17~", win6_handler);
rl_bind_keyseq("\\e[18~", win7_handler);
rl_bind_keyseq("\\e[19~", win8_handler);
rl_bind_keyseq("\\e[20~", win9_handler);
rl_bind_keyseq("\\e[21~", win0_handler);
rl_bind_keyseq("\\e[1;3D", altleft_handler);
rl_bind_keyseq("\\e[1;3C", altright_handler);