Added another pre-compiler flag to enable announcement.
authorDaniel Carl <danielcarl@gmx.de>
Thu, 18 Jul 2013 07:51:03 +0000 (09:51 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Thu, 18 Jul 2013 07:51:03 +0000 (09:51 +0200)
This makes it easier to remove the announcement via sed script or other
automated scripts.

src/config.def.h
src/main.c

index 6ff2b10..cfeb3ff 100644 (file)
@@ -38,7 +38,9 @@
 
 #define MAXIMUM_HINTS              500
 
-/* remove this if the bookmark file fits to the new format "URL<tab>title of page<tab>tag1 tag2" */
+/* remove next line if the bookmark file fits to the new format "URL<tab>title of page<tab>tag1 tag2" */
+#define SHOW_ANNOUNCEMENT
+
 #define ANNOUNCEMENT "\
 <!DOCTYPE html><html lang=\"en\" dir=\"ltr\"><head> \
 <title>Bookmark file format changed</title> \
@@ -67,7 +69,7 @@ If you have no entries in you bookmark you must edit them to fit the new format.
 // replace the first space in earch line of file to <b>\\t\\t</b> if the line haven't already a \t in it.<br/> \
 sed -i -e '/\\t/!{s/ /\\t\\t/}' bookmark<br/> \
 </code> \
-<p>If you had no entries in the bookmark file or you changed it successfully, you should remove the '#define ANNOUNCEMENT' from <i>config.h</i> file and recompile vimb.</p> \
+<p>If you had no entries in the bookmark file or you changed it successfully, you should remove the '#define SHOW_ANNOUNCEMENT' from <i>config.h</i> file and recompile vimb.</p> \
 </body> \
 </html>"
 
index c08eaa4..b821b3a 100644 (file)
@@ -1077,7 +1077,7 @@ int main(int argc, char *argv[])
 
     init_core();
 
-#ifdef ANNOUNCEMENT
+#if defined(ANNOUNCEMENT) && defined(SHOW_ANNOUNCEMENT)
     webkit_web_view_load_string(vb.gui.webview, ANNOUNCEMENT, "text/html", NULL, NULL);
 #else
     /* command line argument: URL */