1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-20 04:06:35 +02:00

update settings and docs with peerlist-toggle keybinding

This commit is contained in:
Jfreegman
2014-10-08 02:56:54 -04:00
parent e6b18231c0
commit d3a489b756
6 changed files with 19 additions and 4 deletions

View File

@ -218,6 +218,7 @@ static void help_draw_keys(ToxWindow *self)
wprintw(win, " Ctrl+F and Ctrl+V : Scroll window history half a page\n");
wprintw(win, " Ctrl+H : Move to the bottom of window history\n");
wprintw(win, " Ctrl+[ and Ctrl+] : Scroll peer list in groupchats\n\n");
wprintw(win, " Ctrl+b : Toggle the groupchat peerlist\n\n");
wprintw(win, " (Note: Custom keybindings override these defaults.)\n\n");
help_draw_bottom_menu(win);
@ -280,7 +281,7 @@ void help_onKey(ToxWindow *self, wint_t key)
break;
case 'k':
help_init_window(self, 12, 80);
help_init_window(self, 13, 80);
self->help->type = HELP_KEYS;
break;

View File

@ -92,6 +92,7 @@ static const struct keys_strings {
const char* page_bottom;
const char* peer_list_up;
const char* peer_list_down;
const char* toggle_peerlist;
} key_strings = {
"keys",
"next_tab",
@ -102,7 +103,8 @@ static const struct keys_strings {
"half_page_down",
"page_bottom",
"peer_list_up",
"peer_list_down"
"peer_list_down",
"toggle_peerlist",
};
/* defines from toxic.h */
@ -117,6 +119,7 @@ static void key_defaults(struct user_settings* settings)
settings->key_page_bottom = T_KEY_C_H;
settings->key_peer_list_up = T_KEY_C_LB;
settings->key_peer_list_down = T_KEY_C_RB;
settings->key_toggle_peerlist = T_KEY_C_B;
}
static const struct tox_strings {
@ -305,6 +308,7 @@ int settings_load(struct user_settings *s, const char *patharg)
if (config_setting_lookup_string(setting, key_strings.page_bottom, &tmp)) s->key_page_bottom = key_parse(&tmp);
if (config_setting_lookup_string(setting, key_strings.peer_list_up, &tmp)) s->key_peer_list_up = key_parse(&tmp);
if (config_setting_lookup_string(setting, key_strings.peer_list_down, &tmp)) s->key_peer_list_down = key_parse(&tmp);
if (config_setting_lookup_string(setting, key_strings.toggle_peerlist, &tmp)) s->key_toggle_peerlist = key_parse(&tmp);
}
#ifdef AUDIO

View File

@ -50,6 +50,7 @@ struct user_settings {
int key_page_bottom;
int key_peer_list_up;
int key_peer_list_down;
int key_toggle_peerlist;
#ifdef AUDIO
int audio_in_dev;