1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-08 06:36:35 +01:00

group title fixes and api update

This commit is contained in:
Jfreegman
2014-11-15 15:55:45 -05:00
parent 1bd880708b
commit 4e177d60b0
7 changed files with 24 additions and 8 deletions

View File

@@ -33,8 +33,15 @@ void cmd_set_title(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*arg
char title[MAX_STR_SIZE];
if (argc < 1) {
snprintf(title, sizeof(title), "Title is set to: %s", self->name);
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, MAGENTA, title);
int tlen = tox_group_get_title(m, self->num, (uint8_t *) title);
if (tlen != -1) {
title[tlen] = '\0';
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Title is set to: %s", title);
} else {
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Title is not set");
}
return;
}