mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-12 23:23:01 +01:00
make status message version not hard-coded
This commit is contained in:
parent
3960208fd6
commit
9e2fde8d84
@ -418,7 +418,12 @@ void prompt_init_statusbar(ToxWindow *self, Tox *m)
|
||||
snprintf(statusbar->nick, sizeof(statusbar->nick), "%s", nick);
|
||||
|
||||
/* temporary until statusmessage saving works */
|
||||
uint8_t *statusmsg = "Toxing on Toxic v.0.2.4";
|
||||
uint8_t ver[strlen(TOXICVER) + 1];
|
||||
uint8_t statusmsg[MAX_STR_SIZE];
|
||||
strcpy(ver, TOXICVER);
|
||||
uint8_t *toxic_ver = strtok(ver, "_");
|
||||
snprintf(statusmsg, MAX_STR_SIZE, "Toxing on Toxic v.%s", toxic_ver);
|
||||
|
||||
m_set_statusmessage(m, statusmsg, strlen(statusmsg) + 1);
|
||||
snprintf(statusbar->statusmsg, sizeof(statusbar->statusmsg), "%s", statusmsg);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user