From 9978fc3e4843fa7d12d522ac874cd5ac1f26f5f9 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Thu, 18 Jul 2013 09:51:03 +0200 Subject: [PATCH] Added another pre-compiler flag to enable announcement. This makes it easier to remove the announcement via sed script or other automated scripts. --- src/config.def.h | 6 ++++-- src/main.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/config.def.h b/src/config.def.h index 6ff2b10..cfeb3ff 100644 --- a/src/config.def.h +++ b/src/config.def.h @@ -38,7 +38,9 @@ #define MAXIMUM_HINTS 500 -/* remove this if the bookmark file fits to the new format "URLtitle of pagetag1 tag2" */ +/* remove next line if the bookmark file fits to the new format "URLtitle of pagetag1 tag2" */ +#define SHOW_ANNOUNCEMENT + #define ANNOUNCEMENT "\ \ Bookmark file format changed \ @@ -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 \\t\\t if the line haven't already a \t in it.
\ sed -i -e '/\\t/!{s/ /\\t\\t/}' bookmark
\ \ -

If you had no entries in the bookmark file or you changed it successfully, you should remove the '#define ANNOUNCEMENT' from config.h file and recompile vimb.

\ +

If you had no entries in the bookmark file or you changed it successfully, you should remove the '#define SHOW_ANNOUNCEMENT' from config.h file and recompile vimb.

\ \ " diff --git a/src/main.c b/src/main.c index c08eaa4..b821b3a 100644 --- a/src/main.c +++ b/src/main.c @@ -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 */ -- 2.20.1