mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 21:13:02 +01:00
Allow empty status messages
This commit is contained in:
parent
63cc23401a
commit
94d22a8853
@ -494,7 +494,7 @@ static void prompt_onFriendRequest(ToxWindow *self, Tox *m, const char *key, con
|
|||||||
sound_notify(self, generic_message, NT_WNDALERT_1 | NT_NOTIFWND, NULL);
|
sound_notify(self, generic_message, NT_WNDALERT_1 | NT_NOTIFWND, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void prompt_init_statusbar(ToxWindow *self, Tox *m)
|
void prompt_init_statusbar(ToxWindow *self, Tox *m, bool first_time_run)
|
||||||
{
|
{
|
||||||
int x2, y2;
|
int x2, y2;
|
||||||
getmaxyx(self->window, y2, x2);
|
getmaxyx(self->window, y2, x2);
|
||||||
@ -524,7 +524,7 @@ void prompt_init_statusbar(ToxWindow *self, Tox *m)
|
|||||||
nick[n_len] = '\0';
|
nick[n_len] = '\0';
|
||||||
statusmsg[s_len] = '\0';
|
statusmsg[s_len] = '\0';
|
||||||
|
|
||||||
if (s_len == 0 || !strncmp(statusmsg, "Toxing on Toxic", strlen("Toxing on Toxic"))) {
|
if (first_time_run) {
|
||||||
snprintf(statusmsg, sizeof(statusmsg), "Toxing on Toxic");
|
snprintf(statusmsg, sizeof(statusmsg), "Toxing on Toxic");
|
||||||
s_len = strlen(statusmsg);
|
s_len = strlen(statusmsg);
|
||||||
statusmsg[s_len] = '\0';
|
statusmsg[s_len] = '\0';
|
||||||
|
@ -45,7 +45,7 @@ extern FriendRequests FrndRequests;
|
|||||||
ToxWindow new_prompt(void);
|
ToxWindow new_prompt(void);
|
||||||
|
|
||||||
void prep_prompt_win(void);
|
void prep_prompt_win(void);
|
||||||
void prompt_init_statusbar(ToxWindow *self, Tox *m);
|
void prompt_init_statusbar(ToxWindow *self, Tox *m, bool first_time_run);
|
||||||
void prompt_update_nick(ToxWindow *prompt, const char *nick);
|
void prompt_update_nick(ToxWindow *prompt, const char *nick);
|
||||||
void prompt_update_statusmessage(ToxWindow *prompt, Tox *m, const char *statusmsg);
|
void prompt_update_statusmessage(ToxWindow *prompt, Tox *m, const char *statusmsg);
|
||||||
void prompt_update_status(ToxWindow *prompt, TOX_USER_STATUS status);
|
void prompt_update_status(ToxWindow *prompt, TOX_USER_STATUS status);
|
||||||
|
@ -1285,7 +1285,7 @@ int main(int argc, char **argv)
|
|||||||
init_term();
|
init_term();
|
||||||
|
|
||||||
prompt = init_windows(m);
|
prompt = init_windows(m);
|
||||||
prompt_init_statusbar(prompt, m);
|
prompt_init_statusbar(prompt, m, !datafile_exists);
|
||||||
load_groups(prompt, m);
|
load_groups(prompt, m);
|
||||||
|
|
||||||
/* thread for ncurses stuff */
|
/* thread for ncurses stuff */
|
||||||
|
Loading…
Reference in New Issue
Block a user