Just comment config.mk to remove libnotify
This commit is contained in:
parent
0e87e7c205
commit
f1fe73aff8
|
@ -1,7 +1,7 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
/* Notification, replace libnotify if you don't want it */
|
||||
static char *notifycmd = "libnotify"; /* Use libnotify or command given*/
|
||||
/* Notification, remove DNOTIFY in config.mk if you don't want it */
|
||||
static char *notifycmd = ""; /* Uses given command if not compiled by DNOTIFY */
|
||||
static char *notifyext = ""; /* Notify with extra command (eg. play an alarm) */
|
||||
|
||||
/*
|
||||
|
|
11
config.mk
11
config.mk
|
@ -7,10 +7,13 @@ VERSION = 0.1
|
|||
PREFIX = /usr/local
|
||||
MANPREFIX = ${PREFIX}/share/man
|
||||
|
||||
# libnotify - comment if you don't want it (config.h too)
|
||||
INCS = -I. -I/usr/include `pkg-config --cflags libnotify`
|
||||
LIBS = -L/usr/lib `pkg-config --libs libnotify`
|
||||
INCS = -I. -I/usr/include
|
||||
LIBS = -L/usr/lib
|
||||
|
||||
# libnotify, comment if you don't want it
|
||||
DEFS = -DNOTIFY
|
||||
INCS+= `pkg-config --cflags libnotify`
|
||||
LIBS+= `pkg-config --libs libnotify`
|
||||
|
||||
# flags
|
||||
CPPFLAGS = -DVERSION=\"${VERSION}\"
|
||||
|
@ -18,4 +21,4 @@ CFLAGS += -g -std=c99 -pedantic -Wall -Os ${INCS} ${DEFS} ${CPPFLAGS}
|
|||
LDFLAGS += -g ${LIBS}
|
||||
|
||||
# compiler and linker
|
||||
# CC = cc
|
||||
CC ?= cc
|
||||
|
|
13
spt.c
13
spt.c
|
@ -27,9 +27,9 @@ static int i, timecount;
|
|||
|
||||
/* function declarations */
|
||||
static void die(const char *errstr, ...);
|
||||
static void spawn(char *, char *);
|
||||
static void notify_send(char *);
|
||||
static void remaining_time(int);
|
||||
static void spawn(char *cmd, char *cmt);
|
||||
static void notify_send(char *cmt);
|
||||
static void remaining_time(int sigint);
|
||||
static void usage(void);
|
||||
|
||||
/* functions implementations */
|
||||
|
@ -59,7 +59,6 @@ spawn(char *cmd, char *cmt)
|
|||
void
|
||||
notify_send(char *cmt)
|
||||
{
|
||||
if (!strcmp(notifycmd, "libnotify")) { /* use libnotify */
|
||||
#ifdef NOTIFY
|
||||
notify_init("spt");
|
||||
NotifyNotification *n = notify_notification_new("spt", cmt, \
|
||||
|
@ -67,10 +66,10 @@ notify_send(char *cmt)
|
|||
notify_notification_show(n, NULL);
|
||||
g_object_unref(G_OBJECT(n));
|
||||
notify_uninit();
|
||||
#endif /* NOTIFY */
|
||||
} else if (strcmp(notifycmd, "")) {
|
||||
#else
|
||||
if (strcmp(notifycmd, ""))
|
||||
spawn(notifycmd, cmt);
|
||||
}
|
||||
#endif /* NOTIFY */
|
||||
|
||||
if (strcmp(notifyext, "")) /* extra commands to use */
|
||||
spawn(notifyext, NULL);
|
||||
|
|
Loading…
Reference in New Issue
Block a user