aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid <dbphillipsnz@gmail.com>2014-06-04 20:40:30 +1200
committerDavid <dbphillipsnz@gmail.com>2014-06-04 20:40:30 +1200
commitd01434fda086a9307b274db3924dbe21f2fec7ef (patch)
tree6c43395fdb5423f8c3eb7888a45ecc95bf460058
parentd1e3b814cbb9c08ce5a626445cd2930b13a9893c (diff)
downloadparamano-d01434fda086a9307b274db3924dbe21f2fec7ef.tar.xz
Tidy-up
-rw-r--r--Makefile38
-rw-r--r--trayfreq.c6
2 files changed, 20 insertions, 24 deletions
diff --git a/Makefile b/Makefile
index d539b47..6373e3f 100644
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,7 @@ EXTRA_CFLAGS+= -DPREFIX=\"$(PREFIX)\" \
-DBINDIR=\"$(BINDIR)\" \
-DSUDO=\"$(SUDO)\" \
-DTRAYFREQ_SET=\"$(TRAYFREQ_SET)\" \
+ -DTRAYFREQ_CONF=\"$(TRAYFREQ_CONF)\" \
-DLOCALEDIR=\"$(LOCALEDIR)\" \
-DSHAREDIR=\"$(SHAREDIR)\" \
-DROOT_UID=$(ROOT_UID)
@@ -46,25 +47,20 @@ DEPS = bat_tray.h \
tray.h \
trayfreq_set_interface.h
-trayfreq_CFLAGS = -I/usr/include/gtk-2.0 \
- -I/usr/lib/gtk-2.0/include \
- -I/usr/include/pango-1.0 \
- -I/usr/include/cairo \
- -I/usr/include/gdk-pixbuf-2.0 \
- -I/usr/include/atk-1.0 \
- -I/usr/include/glib-2.0 \
- -I/usr/lib/glib-2.0/include \
- -Wall \
- -D_=gettext
+CFLAGS = -I/usr/include/gtk-2.0 \
+ -I/usr/lib/gtk-2.0/include \
+ -I/usr/include/pango-1.0 \
+ -I/usr/include/cairo \
+ -I/usr/include/gdk-pixbuf-2.0 \
+ -I/usr/include/atk-1.0 \
+ -I/usr/include/glib-2.0 \
+ -I/usr/lib/glib-2.0/include \
+ -Wall \
+ -D_=gettext
-trayfreq_LDFLAGS = -lgtk-3 \
- -lgobject-2.0 \
- -lglib-2.0
-
-trayfreq_set_CFLAGS = -Wall \
- -D_=gettext
-
-trayfreq_set_LDFLAGS = -lglib-2.0
+LDFLAGS = -lgtk-3 \
+ -lgobject-2.0 \
+ -lglib-2.0
########################################################################
# Make entire suite
@@ -85,7 +81,7 @@ trayfreq: bat_tray.o \
trayfreq.o \
tray.o \
trayfreq_set_interface.o
- $(CC) -o $@ $? $(trayfreq_LDFLAGS)
+ $(CC) -o $@ $? $(LDFLAGS)
########################################################################
# Make trayfreq-set utility
@@ -95,13 +91,13 @@ trayfreq-set: \
getfreq.o \
getgov.o
- $(CC) -o $@ $? $(trayfreq_set_LDFLAGS)
+ $(CC) -o $@ $? $(LDFLAGS)
########################################################################
########################################################################
%.o: %.c $(DEPS)
- $(CC) -c -o $@ $< $(trayfreq_CFLAGS) $(EXTRA_CFLAGS)
+ $(CC) -c -o $@ $< $(CFLAGS) $(EXTRA_CFLAGS)
########################################################################
diff --git a/trayfreq.c b/trayfreq.c
index 8213e06..8433bba 100644
--- a/trayfreq.c
+++ b/trayfreq.c
@@ -57,7 +57,7 @@ int main(int argc, char** argv)
if (sigaction(SIGUSR1, &sig_act, NULL) == -1)
{
- debug("WARN: Couldn't set sigaction for SIGUSR1\n");
+ debug("Couldn't set sigaction for SIGUSR1\n");
}
config_init();
gc_init();
@@ -106,7 +106,7 @@ void config_init()
}
if(!home_config_exists)
- config.file_name = g_strconcat("/usr/share/trayfreq/trayfreq.conf", NULL);
+ config.file_name = g_strconcat(TRAYFREQ_CONF, NULL);
gboolean success = config_open(&config);
if(!success)
@@ -128,7 +128,7 @@ void config_init()
if (temp)
_DEFAULT_SHOW_BATTERY = ( temp[0] == '1' );
- info("Running as UID %d and GID %d\n", getuid(), getgid());
+ info("UID: %d GID: %d\n", getuid(), getgid());
temp = config_get_key(&config, "extra", "theme");
if (temp && strlen(temp) < sizeof(_DEFAULT_THEME) )