Added room name, and window index to desktop message notifications

closes #176
This commit is contained in:
James Booth
2013-05-23 00:10:55 +01:00
parent 0ced96f578
commit 486cbd6245
3 changed files with 34 additions and 7 deletions

View File

@@ -84,12 +84,25 @@ notify_invite(const char * const from, const char * const room,
}
void
notify_message(const char * const handle)
notify_message(const char * const handle, int win)
{
char message[strlen(handle) + 1 + 10];
sprintf(message, "%s: message.", handle);
char message[strlen(handle) + 1 + 14];
sprintf(message, "%s: message (%d).", handle, win);
_notify(message, 10000, "Incoming message");
_notify(message, 10000, "incoming message");
}
void
notify_room_message(const char * const handle, const char * const room, int win)
{
GString *text = g_string_new("");
g_string_append_printf(text, "Room: %s\n", room);
g_string_append_printf(text, "%s: message (%d).", handle, win);
_notify(text->str, 10000, "incoming message");
g_string_free(text, FALSE);
}
void