diff options
author | Michael Vetter <jubalh@openmailbox.org> | 2015-10-09 11:50:21 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@openmailbox.org> | 2015-10-12 09:29:04 +0200 |
commit | e434b1bbf8bd84b8478f4264bf1ced66b64f4df9 (patch) | |
tree | 0fedac7ec422f81437effda72b8caca9709f934b /src/ui | |
parent | 4730dca546a6242b71cb9fcef1dc7d5adb1fe0a5 (diff) | |
download | profani-tty-e434b1bbf8bd84b8478f4264bf1ced66b64f4df9.tar.gz |
Create is_notify_enabled function
The same code was used on two different occasions. I put it into a function.
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/console.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/ui/console.c b/src/ui/console.c index 5445a503..64b8e5a1 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -1151,18 +1151,7 @@ cons_show_ui_prefs(void) void cons_notify_setting(void) { - gboolean notify_enabled = FALSE; -#ifdef HAVE_OSXNOTIFY - notify_enabled = TRUE; -#endif -#ifdef HAVE_LIBNOTIFY - notify_enabled = TRUE; -#endif -#ifdef PLATFORM_CYGWIN - notify_enabled = TRUE; -#endif - - if (notify_enabled) { + if (is_notify_enabled()) { if (prefs_get_boolean(PREF_NOTIFY_MESSAGE)) cons_show("Messages (/notify message) : ON"); else |