diff options
author | James Booth <boothj5@gmail.com> | 2016-02-04 00:35:10 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-02-04 00:35:10 +0000 |
commit | f8f9ad51979680e9aef316f637d8cf6d3bde1bc5 (patch) | |
tree | e7e6c07a0e4837036c11b894bbb2d5c3c2bdfe78 | |
parent | 834226560707358c47d85d16bd85a49e218ef2d8 (diff) | |
download | profani-tty-f8f9ad51979680e9aef316f637d8cf6d3bde1bc5.tar.gz |
Tidy prefs_do_chat_notify()
-rw-r--r-- | src/config/preferences.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c index d0506e06..af89b0c6 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -194,21 +194,15 @@ prefs_reset_room_trigger_ac(void) gboolean prefs_do_chat_notify(gboolean current_win) { - gboolean notify_current = prefs_get_boolean(PREF_NOTIFY_CHAT_CURRENT); - gboolean notify_window = FALSE; - if (!current_win || (current_win && notify_current) ) { - notify_window = TRUE; - } - if (!notify_window) { + if (prefs_get_boolean(PREF_NOTIFY_CHAT) == FALSE) { return FALSE; + } else { + if ((current_win == FALSE) || ((current_win == TRUE) && prefs_get_boolean(PREF_NOTIFY_CHAT_CURRENT))) { + return TRUE; + } else { + return FALSE; + } } - - gboolean notify_message = prefs_get_boolean(PREF_NOTIFY_CHAT); - if (notify_message) { - return TRUE; - } - - return FALSE; } GList* |