Create is_notify_enabled function

The same code was used on two different occasions. I put it into a
function.
This commit is contained in:
Michael Vetter
2015-10-09 11:50:21 +02:00
parent 4730dca546
commit e434b1bbf8
4 changed files with 22 additions and 24 deletions

View File

@@ -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