mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-22 18:36: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:
14
src/main.c
14
src/main.c
@@ -40,6 +40,7 @@
|
||||
#endif
|
||||
|
||||
#include "profanity.h"
|
||||
#include "common.h"
|
||||
#include "command/command.h"
|
||||
|
||||
static gboolean disable_tls = FALSE;
|
||||
@@ -105,18 +106,7 @@ main(int argc, char **argv)
|
||||
g_print("XMPP library: libstrophe\n");
|
||||
#endif
|
||||
|
||||
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()) {
|
||||
g_print("Desktop notification support: Enabled\n");
|
||||
} else {
|
||||
g_print("Desktop notification support: Disabled\n");
|
||||
|
||||
Reference in New Issue
Block a user