diff options
author | James Booth <boothj5@gmail.com> | 2016-02-04 00:41:53 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-02-04 00:41:53 +0000 |
commit | c14ef3390690d732c64bf88a37b23dcdebb6e867 (patch) | |
tree | 541eee3a0f732e719a5b63970c83af47838208ec /src/ui/notifier.c | |
parent | f8f9ad51979680e9aef316f637d8cf6d3bde1bc5 (diff) | |
download | profani-tty-c14ef3390690d732c64bf88a37b23dcdebb6e867.tar.gz |
Tidy notify_message()
Diffstat (limited to 'src/ui/notifier.c')
-rw-r--r-- | src/ui/notifier.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui/notifier.c b/src/ui/notifier.c index 30497fe3..fda5aedd 100644 --- a/src/ui/notifier.c +++ b/src/ui/notifier.c @@ -98,11 +98,16 @@ notify_invite(const char *const from, const char *const room, const char *const } void -notify_message(const char *const name, int win, const char *const text) +notify_message(const char *const name, int num, const char *const text) { + int ui_index = num; + if (ui_index == 10) { + ui_index = 0; + } + GString *message = g_string_new(""); - g_string_append_printf(message, "%s (win %d)", name, win); - if (text) { + g_string_append_printf(message, "%s (win %d)", name, ui_index); + if (text && prefs_get_boolean(PREF_NOTIFY_CHAT_TEXT)) { g_string_append_printf(message, "\n%s", text); } |