Removed constant PROJECT from sources.
authorDaniel Carl <danielcarl@gmx.de>
Sun, 30 Dec 2012 09:36:09 +0000 (10:36 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Sun, 30 Dec 2012 09:36:09 +0000 (10:36 +0100)
To easily rename the project into something else is a unused feature.

config.mk
doc/Makefile
doc/vimp.1.txt
src/config.h
src/main.c
src/setting.c
src/util.c

index 2fcfb93..3815633 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -38,7 +38,6 @@ LDFLAGS += $(shell pkg-config --libs $(LIBS)) -lX11 -lXext
 # features
 CPPFLAGS += -DFEATURE_COOKIE
 
-CPPFLAGS += -DPROJECT=\"${PROJECT}\"
 CPPFLAGS += -DVERSION=\"${VERSION}\"
 ifeq ($(USEGTK3), 1)
 CPPFLAGS += -DHAS_GTK3
index 4cd1db6..75b99dd 100644 (file)
@@ -9,7 +9,7 @@ man: $(MAN1)
 
 %.1: %.1.txt
        @echo "${PP} $< > $@"
-       @$(PP) -DVERSION=$(VERSION) -DPROJECT=$(PROJECT) $< > $@
+       @$(PP) -DVERSION=$(VERSION) $< > $@
 
 install: man
        install -d $(MANDIR1)
index ec89d3e..363c0e5 100644 (file)
@@ -1,21 +1,21 @@
 .\" Process this file with
-.\" groff -man -Tascii PROJECT.1
-.TH PROJECT 1 "29/12/2012" PROJECT/VERSION "PROJECT Manual"
+.\" groff -man -Tascii vimp.1
+.TH vimp 1 "30/12/2012" "vimp/VERSION" "Vimp Manual"
 .SH NAME
-PROJECT \- A modal web browser based on webkit thats inspired by vim the great editor.
+vimp \- A modal web browser based on webkit thats inspired by vim the great editor.
 .SH SYNOPSIS
-.BI "PROJECT [" "OPTION" "] [" "URI" "]"
+.BI "vimp [" "OPTION" "] [" "URI" "]"
 .SH DESCRIPTION
-.B PROJECT
+.B vimp
 is a wenkit based web browser that behaves like the vimperator
 plugin for the firefox and usage paradigms from the great editor vim. The goal
-of PROJECT is to build a completely keyboard-driven, efficient and pleasurable
+of vimp is to build a completely keyboard-driven, efficient and pleasurable
 browsing-experience.
 .SH OPTIONS
 Mandatory arguments to long options are mandatory for short options too.
 .TP
 .BI "-e, --embed " "WindowId"
-WindowId of an XEmbed-aware application, that PROJECT will use as its parent.
+WindowId of an XEmbed-aware application, that vimp will use as its parent.
 .TP
 .B "-h, --help"
 Show help options.
@@ -23,7 +23,7 @@ Show help options.
 .B "-v, --version"
 Print build and version information.
 .SH MODES
-PROJECT is modal an has following main modes:
+vimp is modal an has following main modes:
 .TP
 .B Normal Mode
 The default mode. Pressing Escape always enter normal mode.
@@ -35,12 +35,12 @@ Used for editing text elements in a webpage.
 Follow links, form fields and frames via hints.
 .TP
 .B Command Mode
-Execute PROJECT commands from the builtin inputbox (commandline).
+Execute vimp commands from the builtin inputbox (commandline).
 .TP
 .B Insert Mode
 Used for editing text elements in a webpage.
 .SH COMMANDS
-Commands are a central part in PROJECT. They are used for nearly all things
+Commands are a central part in vimp. They are used for nearly all things
 that could be done with this browser. Commands allow to set config variables,
 to assign keybindings and much more. Also the keybindings are only shortcut
 for the commands itself.
@@ -232,11 +232,11 @@ Close the browser.
 .B source
 Toggle between normal view and source view for the current page.
 .SH FILES
-.I $XDG_CONFIG_HOME/PROJECT/config
+.I $XDG_CONFIG_HOME/vimp/config
 .RS
 THe users config file.
 .RE
-.I $XDG_CONFIG_HOME/PROJECT/cookies
+.I $XDG_CONFIG_HOME/vimp/cookies
 .RS
 Cookie store file.
 .SH "REPORTING BUGS"
index 75e493b..2a6b992 100644 (file)
@@ -25,7 +25,6 @@
 #define START_PAGE      "https://github.com/fanglingsu/vimp"
 
 #define SETTING_DEFAUL_FONT_SIZE    12
-#define SETTING_USER_AGENT          PROJECT "/" VERSION " (X11; Linux i686) AppleWebKit/535.22+ Compatible (Safari)"
 #define SETTING_MAX_CONNS           25
 #define SETTING_MAX_CONNS_PER_HOST  5
 
index f982508..0b16424 100644 (file)
@@ -171,7 +171,7 @@ static WebKitWebView* vp_inspect_web_view_cb(gpointer inspector, WebKitWebView*
         window = gtk_plug_new(vp.state.embed);
     } else {
         window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-        gtk_window_set_wmclass(GTK_WINDOW(window), PROJECT, PROJECT);
+        gtk_window_set_wmclass(GTK_WINDOW(window), "vimp", "Vimp");
     }
 
     title  = g_strdup_printf("Inspect page - %s", CURRENT_URL());
@@ -455,7 +455,7 @@ void vp_echo(const MessageType type, gboolean hide, const char *error, ...)
 
 static void vp_print_version(void)
 {
-    fprintf(stderr, "%s/%s (build %s %s)\n", PROJECT, VERSION, __DATE__, __TIME__);
+    fprintf(stderr, "%s/%s (build %s %s)\n", "vimp", VERSION, __DATE__, __TIME__);
 }
 
 static void vp_init(void)
@@ -521,16 +521,16 @@ static void vp_init_gui(void)
         gui->window = gtk_plug_new(vp.state.embed);
     } else {
         gui->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-        gtk_window_set_wmclass(GTK_WINDOW(gui->window), PROJECT, PROJECT);
-        gtk_window_set_role(GTK_WINDOW(gui->window), PROJECT);
+        gtk_window_set_wmclass(GTK_WINDOW(gui->window), "vimp", "Vimp");
+        gtk_window_set_role(GTK_WINDOW(gui->window), "Vimp");
     }
 
     GdkGeometry hints = {10, 10};
     gtk_window_set_default_size(GTK_WINDOW(gui->window), 640, 480);
-    gtk_window_set_title(GTK_WINDOW(gui->window), PROJECT);
+    gtk_window_set_title(GTK_WINDOW(gui->window), "vimp");
     gtk_window_set_geometry_hints(GTK_WINDOW(gui->window), NULL, &hints, GDK_HINT_MIN_SIZE);
     gtk_window_set_icon(GTK_WINDOW(gui->window), NULL);
-    gtk_widget_set_name(GTK_WIDGET(gui->window), PROJECT);
+    gtk_widget_set_name(GTK_WIDGET(gui->window), "vimp");
 
     /* Create a browser instance */
     gui->webview = WEBKIT_WEB_VIEW(webkit_web_view_new());
index 050e9e1..966c9f0 100644 (file)
@@ -74,7 +74,7 @@ static Setting default_settings[] = {
     {"seriffont", "serif-font-family", TYPE_CHAR, setting_webkit, {.s = "serif"}},
     {"spelllang", "spell-checking-languages", TYPE_CHAR, setting_webkit, {.s = NULL}},
     {NULL, "tab-key-cycles-through-elements", TYPE_BOOLEAN, setting_webkit, {.i = 1}},
-    {"useragent", "user-agent", TYPE_CHAR, setting_webkit, {.s = PROJECT "/" VERSION " (X11; Linux i686) AppleWebKit/535.22+ Compatible (Safari)"}},
+    {"useragent", "user-agent", TYPE_CHAR, setting_webkit, {.s = "vimp/" VERSION " (X11; Linux i686) AppleWebKit/535.22+ Compatible (Safari)"}},
     {"stylesheet", "user-stylesheet-uri", TYPE_CHAR, setting_webkit, {.s = NULL}},
     {"zoomstep", "zoom-step", TYPE_DOUBLE, setting_webkit, {.i = 100}},
     /* internal variables */
index ddc4485..752e0ce 100644 (file)
@@ -22,7 +22,7 @@
 
 gchar* util_get_config_dir(void)
 {
-    gchar *path = g_build_filename(g_get_user_config_dir(), PROJECT, NULL);
+    gchar *path = g_build_filename(g_get_user_config_dir(), "vimp", NULL);
     util_create_dir_if_not_exists(path);
 
     return path;
@@ -30,7 +30,7 @@ gchar* util_get_config_dir(void)
 
 gchar* util_get_cache_dir(void)
 {
-    gchar *path = g_build_filename(g_get_user_cache_dir(), PROJECT, NULL);
+    gchar *path = g_build_filename(g_get_user_cache_dir(), "vimp", NULL);
     util_create_dir_if_not_exists(path);
 
     return path;