about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-01-31 22:12:27 +0000
committerJames Booth <boothj5@gmail.com>2015-01-31 22:12:27 +0000
commit84688c063e1b1684cebf7251f39a32e07f77c6b7 (patch)
tree60ab8ce8f0182177cd8fbf20603e4e5c1a7748ad /src
parentbaa122e7dcd2cf9a996868e9f51f187a9b626f47 (diff)
downloadprofani-tty-84688c063e1b1684cebf7251f39a32e07f77c6b7.tar.gz
Removed commented code, renamed win switch handlers
Diffstat (limited to 'src')
-rw-r--r--src/ui/core.c22
-rw-r--r--src/ui/inputwin.c62
2 files changed, 31 insertions, 53 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index 5b9970fc..7131b005 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -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
diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c
index 2737101b..083b6c4e 100644
--- a/src/ui/inputwin.c
+++ b/src/ui/inputwin.c
@@ -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("\\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("\\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", 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);