summaryrefslogtreecommitdiff
path: root/src/gui/curses/gui-input.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2004-07-03 14:07:09 +0000
committerSebastien Helleu <flashcode@flashtux.org>2004-07-03 14:07:09 +0000
commit9e6938bdf7505aae1c43090fb0de6cb858d53a8d (patch)
tree2acfb4c09ba2b8595fbe2498bbd2dc195c5d0d8a /src/gui/curses/gui-input.c
parentb9a40bbe218c536da07bef4c4f46277284d86537 (diff)
downloadweechat-9e6938bdf7505aae1c43090fb0de6cb858d53a8d.zip
Added auto-switch to active channels (alt-a)
Diffstat (limited to 'src/gui/curses/gui-input.c')
-rw-r--r--src/gui/curses/gui-input.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/gui/curses/gui-input.c b/src/gui/curses/gui-input.c
index 3e98619a1..179d962d7 100644
--- a/src/gui/curses/gui-input.c
+++ b/src/gui/curses/gui-input.c
@@ -37,6 +37,7 @@
#include "../gui.h"
#include "../../common/weeconfig.h"
#include "../../common/command.h"
+#include "../../common/hotlist.h"
#include "../../irc/irc.h"
#define KEY_ESCAPE 27
@@ -62,6 +63,16 @@ gui_read_keyb ()
gui_calculate_pos_size (gui_current_window);
gui_redraw_buffer (gui_current_window->buffer);
break;
+ /* inactive function keys */
+ case KEY_F(1):
+ case KEY_F(2):
+ case KEY_F(3):
+ case KEY_F(4):
+ case KEY_F(5):
+ case KEY_F(9):
+ case KEY_F(11):
+ case KEY_F(12):
+ break;
/* previous buffer in window */
case KEY_F(6):
gui_switch_to_previous_buffer (gui_current_window);
@@ -316,6 +327,26 @@ gui_read_keyb ()
}
}
break;
+ /* Alt-A */
+ case 'a':
+ case 'A':
+ if (hotlist)
+ {
+ if (!hotlist_initial_buffer)
+ hotlist_initial_buffer = gui_current_window->buffer;
+ gui_switch_to_buffer (gui_current_window, hotlist->buffer);
+ gui_redraw_buffer (gui_current_window->buffer);
+ }
+ else
+ {
+ if (hotlist_initial_buffer)
+ {
+ gui_switch_to_buffer (gui_current_window, hotlist_initial_buffer);
+ gui_redraw_buffer (gui_current_window->buffer);
+ hotlist_initial_buffer = NULL;
+ }
+ }
+ break;
}
}
break;
@@ -341,8 +372,8 @@ gui_read_keyb ()
break;
/* other key => add to input buffer */
default:
- /*gui_printf (gui_current_buffer,
- "[Debug] key pressed = %d, as octal: %o\n", key, key);*/
+ /*gui_printf (gui_current_window->buffer,
+ "[Debug] key pressed = %d, as octal: %o\n", key, key);*/
new_char[0] = key;
new_char[1] = '\0';
gui_buffer_insert_string (gui_current_window->buffer,