1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-07 09:46:35 +01:00

partially fix bug where input line eats prompt messages

This commit is contained in:
Jfreegman
2013-12-06 05:07:35 -05:00
parent 18a7bbea3d
commit ce45580c83
7 changed files with 53 additions and 10 deletions

View File

@@ -233,6 +233,7 @@ static void do_tox(Tox *m, ToxWindow *prompt)
static bool dht_on = false;
if (!dht_on && !tox_isconnected(m) && !(conn_try++ % 100)) {
prep_prompt_win();
if (!conn_err) {
wprintw(prompt->window, "Establishing connection...\n");
if ((conn_err = init_connection(m)))
@@ -241,10 +242,14 @@ static void do_tox(Tox *m, ToxWindow *prompt)
} else if (!dht_on && tox_isconnected(m)) {
dht_on = true;
prompt_update_connectionstatus(prompt, dht_on);
prep_prompt_win();
wprintw(prompt->window, "\nDHT connected.\n");
} else if (dht_on && !tox_isconnected(m)) {
dht_on = false;
prompt_update_connectionstatus(prompt, dht_on);
prep_prompt_win();
wprintw(prompt->window, "\nDHT disconnected. Attempting to reconnect.\n");
}
@@ -522,6 +527,7 @@ int main(int argc, char *argv[])
load_data(m, DATA_FILE);
if (f_flag == -1) {
prep_prompt_win();
attron(COLOR_PAIR(RED) | A_BOLD);
wprintw(prompt->window, "You passed '-f' without giving an argument.\n"
"defaulting to 'data' for a keyfile...\n");
@@ -529,6 +535,7 @@ int main(int argc, char *argv[])
}
if (config_err) {
prep_prompt_win();
attron(COLOR_PAIR(RED) | A_BOLD);
wprintw(prompt->window, "Unable to determine configuration directory.\n"
"defaulting to 'data' for a keyfile...\n");