summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--browser.c (renamed from zea.c)7
2 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 2c9a12f..cb3fd29 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,11 @@
CFLAGS += -Wall -Wextra -O3
+__NAME__ = zea
-zea: zea.c
+$(__NAME__): browser.c
$(CC) $(CFLAGS) $(LDFLAGS) \
+ -D__NAME__=\"$(__NAME__)\" \
-o $@ $< \
`pkg-config --cflags --libs gtk+-2.0 glib-2.0 webkit-1.0`
clean:
- rm -f zea
+ rm -f $(__NAME__)
diff --git a/zea.c b/browser.c
index 9a1c9b8..226db87 100644
--- a/zea.c
+++ b/browser.c
@@ -12,9 +12,8 @@
#include <webkit/webkit.h>
-#define __NAME__ "zea"
#define DOWNLOAD_DIR "/tmp/tmp"
-#define ZEA_LANGUAGE "en-US"
+#define LANGUAGE "en-US"
static void adblock(WebKitWebView *, WebKitWebFrame *, WebKitWebResource *,
@@ -275,8 +274,8 @@ new_client(const gchar *uri)
if (!language_set)
{
- g_object_set(webkit_get_default_session(), "accept-language",
- ZEA_LANGUAGE, NULL);
+ g_object_set(webkit_get_default_session(), "accept-language", LANGUAGE,
+ NULL);
language_set = TRUE;
}