mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-03 01:06:44 +02:00
Interface improvements and bump to v0.10.0
- Give window tab and statusbar a make over - Place window tab above input field - Reduce input field to one square in height - Refactor window tab so that it's now a subwin of its parent ToxWindow - Fix bug causing notification counter to sometimes increment by 2 - No longer scroll on output when output is not at bottom of screen - Show a small indicator on far left of window tab when output is not at bottom of screen - Reduce ncurses/UI thread sleep time by half - Handle nanosleep errors better
This commit is contained in:
30
src/toxic.c
30
src/toxic.c
@ -256,7 +256,7 @@ static void init_term(void)
|
||||
keypad(stdscr, 1);
|
||||
noecho();
|
||||
nonl();
|
||||
timeout(100);
|
||||
timeout(50);
|
||||
|
||||
if (has_colors()) {
|
||||
short bg_color = COLOR_BLACK;
|
||||
@ -268,15 +268,23 @@ static void init_term(void)
|
||||
}
|
||||
}
|
||||
|
||||
init_pair(0, COLOR_WHITE, COLOR_BLACK);
|
||||
init_pair(1, COLOR_GREEN, bg_color);
|
||||
init_pair(2, COLOR_CYAN, bg_color);
|
||||
init_pair(3, COLOR_RED, bg_color);
|
||||
init_pair(4, COLOR_BLUE, bg_color);
|
||||
init_pair(5, COLOR_YELLOW, bg_color);
|
||||
init_pair(6, COLOR_MAGENTA, bg_color);
|
||||
init_pair(7, COLOR_BLACK, COLOR_BLACK);
|
||||
init_pair(8, COLOR_BLACK, COLOR_WHITE);
|
||||
init_pair(WHITE, COLOR_WHITE, COLOR_BLACK);
|
||||
init_pair(GREEN, COLOR_GREEN, bg_color);
|
||||
init_pair(CYAN, COLOR_CYAN, bg_color);
|
||||
init_pair(RED, COLOR_RED, bg_color);
|
||||
init_pair(BLUE, COLOR_BLUE, bg_color);
|
||||
init_pair(YELLOW, COLOR_YELLOW, bg_color);
|
||||
init_pair(MAGENTA, COLOR_MAGENTA, bg_color);
|
||||
init_pair(BLACK, COLOR_BLACK, COLOR_BLACK);
|
||||
init_pair(BLUE_BLACK, COLOR_BLUE, COLOR_BLACK);
|
||||
init_pair(BLACK_WHITE, COLOR_BLACK, COLOR_WHITE);
|
||||
init_pair(WHITE_BLUE, COLOR_WHITE, COLOR_BLUE);
|
||||
init_pair(CYAN_BLUE, COLOR_CYAN, COLOR_BLUE);
|
||||
init_pair(GREEN_BLUE, COLOR_GREEN, COLOR_BLUE);
|
||||
init_pair(PURPLE_BLUE, COLOR_MAGENTA, COLOR_BLUE);
|
||||
init_pair(BLACK_BLUE, COLOR_BLACK, COLOR_BLUE);
|
||||
init_pair(YELLOW_BLUE, COLOR_YELLOW, COLOR_BLUE);
|
||||
init_pair(RED_BLUE, COLOR_RED, COLOR_BLUE);
|
||||
}
|
||||
|
||||
refresh();
|
||||
@ -1421,6 +1429,7 @@ int main(int argc, char **argv)
|
||||
prompt = init_windows(m);
|
||||
prompt_init_statusbar(prompt, m, !datafile_exists);
|
||||
load_conferences(m);
|
||||
set_active_window_index(0);
|
||||
|
||||
if (pthread_mutex_init(&Winthread.lock, NULL) != 0) {
|
||||
exit_toxic_err("failed in main", FATALERR_MUTEX_INIT);
|
||||
@ -1483,7 +1492,6 @@ int main(int argc, char **argv)
|
||||
|
||||
pthread_mutex_lock(&Winthread.lock);
|
||||
print_init_messages(prompt);
|
||||
set_active_window_index(0);
|
||||
pthread_mutex_unlock(&Winthread.lock);
|
||||
|
||||
cleanup_init_messages();
|
||||
|
Reference in New Issue
Block a user