mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 22:16:21 +00:00
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:
18
src/common.c
18
src/common.c
@@ -644,3 +644,21 @@ strip_arg_quotes(const char * const input)
|
||||
|
||||
return unquoted;
|
||||
}
|
||||
|
||||
gboolean
|
||||
is_notify_enabled(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
|
||||
|
||||
return notify_enabled;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user