aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-02-04 00:35:10 +0000
committerJames Booth <boothj5@gmail.com>2016-02-04 00:35:10 +0000
commitf8f9ad51979680e9aef316f637d8cf6d3bde1bc5 (patch)
treee7e6c07a0e4837036c11b894bbb2d5c3c2bdfe78 /src
parent834226560707358c47d85d16bd85a49e218ef2d8 (diff)
downloadprofani-tty-f8f9ad51979680e9aef316f637d8cf6d3bde1bc5.tar.gz
Tidy prefs_do_chat_notify()
Diffstat (limited to 'src')
-rw-r--r--src/config/preferences.c20
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*