1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-26 22:13:26 +01:00

make status message version not hard-coded

This commit is contained in:
Jfreegman 2014-02-22 04:46:35 -05:00
parent 3960208fd6
commit 9e2fde8d84

View File

@ -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);