From f8f9ad51979680e9aef316f637d8cf6d3bde1bc5 Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 4 Feb 2016 00:35:10 +0000 Subject: Tidy prefs_do_chat_notify() --- src/config/preferences.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/config') 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* -- cgit 1.4.1-2-gfad0