mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 13:53:26 +01:00
Fix whitespace
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
parent
3369c9d808
commit
5cbbb62ce2
@ -502,24 +502,24 @@ bool line_info_onKey(ToxWindow *self, wint_t key)
|
|||||||
struct history *hst = self->chatwin->hst;
|
struct history *hst = self->chatwin->hst;
|
||||||
bool match = true;
|
bool match = true;
|
||||||
|
|
||||||
if (key == user_settings->key_half_page_up) {
|
if (key == user_settings->key_half_page_up) {
|
||||||
line_info_page_up(self, hst);
|
line_info_page_up(self, hst);
|
||||||
}
|
}
|
||||||
else if (key == user_settings->key_half_page_down) {
|
else if (key == user_settings->key_half_page_down) {
|
||||||
line_info_page_down(self, hst);
|
line_info_page_down(self, hst);
|
||||||
}
|
}
|
||||||
else if (key == user_settings->key_scroll_line_up) {
|
else if (key == user_settings->key_scroll_line_up) {
|
||||||
line_info_scroll_up(hst);
|
line_info_scroll_up(hst);
|
||||||
}
|
}
|
||||||
else if (key == user_settings->key_scroll_line_down) {
|
else if (key == user_settings->key_scroll_line_down) {
|
||||||
line_info_scroll_down(hst);
|
line_info_scroll_down(hst);
|
||||||
}
|
}
|
||||||
else if (key == user_settings->key_page_bottom) {
|
else if (key == user_settings->key_page_bottom) {
|
||||||
line_info_reset_start(self, hst);
|
line_info_reset_start(self, hst);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
match = false;
|
match = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return match;
|
return match;
|
||||||
}
|
}
|
||||||
|
@ -110,15 +110,15 @@ static const struct keys_strings {
|
|||||||
/* defines from toxic.h */
|
/* defines from toxic.h */
|
||||||
static void key_defaults(struct user_settings* settings)
|
static void key_defaults(struct user_settings* settings)
|
||||||
{
|
{
|
||||||
settings->key_next_tab = T_KEY_NEXT;
|
settings->key_next_tab = T_KEY_NEXT;
|
||||||
settings->key_prev_tab = T_KEY_PREV;
|
settings->key_prev_tab = T_KEY_PREV;
|
||||||
settings->key_scroll_line_up = KEY_PPAGE;
|
settings->key_scroll_line_up = KEY_PPAGE;
|
||||||
settings->key_scroll_line_down = KEY_NPAGE;
|
settings->key_scroll_line_down = KEY_NPAGE;
|
||||||
settings->key_half_page_up = T_KEY_C_F;
|
settings->key_half_page_up = T_KEY_C_F;
|
||||||
settings->key_half_page_down = T_KEY_C_V;
|
settings->key_half_page_down = T_KEY_C_V;
|
||||||
settings->key_page_bottom = T_KEY_C_H;
|
settings->key_page_bottom = T_KEY_C_H;
|
||||||
settings->key_peer_list_up = T_KEY_C_LB;
|
settings->key_peer_list_up = T_KEY_C_LB;
|
||||||
settings->key_peer_list_down = T_KEY_C_RB;
|
settings->key_peer_list_down = T_KEY_C_RB;
|
||||||
settings->key_toggle_peerlist = T_KEY_C_B;
|
settings->key_toggle_peerlist = T_KEY_C_B;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,30 +296,30 @@ int settings_load(struct user_settings *s, const char *patharg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* keys */
|
/* keys */
|
||||||
if ((setting = config_lookup(cfg, key_strings.self)) != NULL) {
|
if ((setting = config_lookup(cfg, key_strings.self)) != NULL) {
|
||||||
const char* tmp = NULL;
|
const char* tmp = NULL;
|
||||||
if (config_setting_lookup_string(setting, key_strings.next_tab, &tmp))
|
if (config_setting_lookup_string(setting, key_strings.next_tab, &tmp))
|
||||||
s->key_next_tab = key_parse(&tmp);
|
s->key_next_tab = key_parse(&tmp);
|
||||||
if (config_setting_lookup_string(setting, key_strings.prev_tab, &tmp))
|
if (config_setting_lookup_string(setting, key_strings.prev_tab, &tmp))
|
||||||
s->key_prev_tab = key_parse(&tmp);
|
s->key_prev_tab = key_parse(&tmp);
|
||||||
if (config_setting_lookup_string(setting, key_strings.scroll_line_up, &tmp))
|
if (config_setting_lookup_string(setting, key_strings.scroll_line_up, &tmp))
|
||||||
s->key_scroll_line_up = key_parse(&tmp);
|
s->key_scroll_line_up = key_parse(&tmp);
|
||||||
if (config_setting_lookup_string(setting, key_strings.scroll_line_down, &tmp))
|
if (config_setting_lookup_string(setting, key_strings.scroll_line_down, &tmp))
|
||||||
s->key_scroll_line_down= key_parse(&tmp);
|
s->key_scroll_line_down= key_parse(&tmp);
|
||||||
if (config_setting_lookup_string(setting, key_strings.half_page_up, &tmp))
|
if (config_setting_lookup_string(setting, key_strings.half_page_up, &tmp))
|
||||||
s->key_half_page_up = key_parse(&tmp);
|
s->key_half_page_up = key_parse(&tmp);
|
||||||
if (config_setting_lookup_string(setting, key_strings.half_page_down, &tmp))
|
if (config_setting_lookup_string(setting, key_strings.half_page_down, &tmp))
|
||||||
s->key_half_page_down = key_parse(&tmp);
|
s->key_half_page_down = key_parse(&tmp);
|
||||||
if (config_setting_lookup_string(setting, key_strings.page_bottom, &tmp))
|
if (config_setting_lookup_string(setting, key_strings.page_bottom, &tmp))
|
||||||
s->key_page_bottom = key_parse(&tmp);
|
s->key_page_bottom = key_parse(&tmp);
|
||||||
if (config_setting_lookup_string(setting, key_strings.peer_list_up, &tmp))
|
if (config_setting_lookup_string(setting, key_strings.peer_list_up, &tmp))
|
||||||
s->key_peer_list_up = key_parse(&tmp);
|
s->key_peer_list_up = key_parse(&tmp);
|
||||||
if (config_setting_lookup_string(setting, key_strings.peer_list_down, &tmp))
|
if (config_setting_lookup_string(setting, key_strings.peer_list_down, &tmp))
|
||||||
s->key_peer_list_down = key_parse(&tmp);
|
s->key_peer_list_down = key_parse(&tmp);
|
||||||
if (config_setting_lookup_string(setting, key_strings.toggle_peerlist, &tmp))
|
if (config_setting_lookup_string(setting, key_strings.toggle_peerlist, &tmp))
|
||||||
s->key_toggle_peerlist = key_parse(&tmp);
|
s->key_toggle_peerlist = key_parse(&tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef AUDIO
|
#ifdef AUDIO
|
||||||
if ((setting = config_lookup(cfg, audio_strings.self)) != NULL) {
|
if ((setting = config_lookup(cfg, audio_strings.self)) != NULL) {
|
||||||
|
@ -41,15 +41,15 @@ struct user_settings {
|
|||||||
char chatlogs_path[PATH_MAX];
|
char chatlogs_path[PATH_MAX];
|
||||||
char avatar_path[PATH_MAX];
|
char avatar_path[PATH_MAX];
|
||||||
|
|
||||||
int key_next_tab;
|
int key_next_tab;
|
||||||
int key_prev_tab;
|
int key_prev_tab;
|
||||||
int key_scroll_line_up;
|
int key_scroll_line_up;
|
||||||
int key_scroll_line_down;
|
int key_scroll_line_down;
|
||||||
int key_half_page_up;
|
int key_half_page_up;
|
||||||
int key_half_page_down;
|
int key_half_page_down;
|
||||||
int key_page_bottom;
|
int key_page_bottom;
|
||||||
int key_peer_list_up;
|
int key_peer_list_up;
|
||||||
int key_peer_list_down;
|
int key_peer_list_down;
|
||||||
int key_toggle_peerlist;
|
int key_toggle_peerlist;
|
||||||
|
|
||||||
#ifdef AUDIO
|
#ifdef AUDIO
|
||||||
|
Loading…
Reference in New Issue
Block a user