From 863073d9888c53959306e893bf2dfdcf32eb3334 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 9 Feb 2020 19:41:46 +0100 Subject: Makefile: Fixup flags by removing .POSIX The Makefile is still POSIX with few extensions but .POSIX at the start got removed to avoid CC being set to c99 which fails as the code is in C11. --- Makefile | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index c6092c6..0caf4b4 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,9 @@ -.POSIX: -# POSIX Makefile with extensions common to *BSD and GNU such as: +# POSIX-ish Makefile with extensions common to *BSD and GNU such as: # - Usage of backticks for shell evaluation # - Usage of ?= for defining variables when not already defined # - Usage of += for appending to a variable -PACKAGE = Badwolf +PACKAGE = Badwolf VERSION = 0.5.0-rc.1 VERSION_FULL = $(VERSION)`./version.sh` @@ -16,12 +15,11 @@ DATADIR ?= $(PREFIX)/share/badwolf APPSDIR ?= $(PREFIX)/share/applications CC ?= cc +CFLAGS ?= -g -Wall -Wextra -Wconversion -Wsign-conversion -O2 DBG ?= PKGCONFIG ?= pkg-config MSGFMT ?= msgfmt -CFLAGS ?= -g -Wall -Wextra -Wconversion -Wsign-conversion -O2 - DEPS = gtk+-3.0 webkit2gtk-4.0 libsoup-2.4 SRCS = uri.c uri_test.c keybindings.c badwolf.c OBJS = uri.o keybindings.o badwolf.o @@ -31,9 +29,9 @@ EXE_test = uri_test TRANS = fr.mo pt_BR.mo DOCS = usr.bin.badwolf README.md KnowledgeBase.md -CFLAGS += -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION_FULL)\" -CFLAGS += `$(PKGCONFIG) --cflags $(DEPS)` -LIBS = `$(PKGCONFIG) --libs $(DEPS)` +CDEPS = -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION_FULL)\" +CDEPS += `$(PKGCONFIG) --cflags $(DEPS)` +LIBS = `$(PKGCONFIG) --libs $(DEPS)` all: $(EXE) $(TRANS) @@ -51,10 +49,10 @@ badwolf: $(OBJS) $(CC) -std=c11 -o $@ $(OBJS) $(LDFLAGS) $(LIBS) .c: - $(CC) -std=c11 $(CFLAGS) $(LDFLAGS) $(LIBS) -o $@ $< + $(CC) -std=c11 $(CFLAGS) $(CDEPS) $(LDFLAGS) $(LIBS) -o $@ $< .c.o: - $(CC) -std=c11 $(CFLAGS) -c -o $@ $< + $(CC) -std=c11 $(CFLAGS) $(CDEPS) -c -o $@ $< uri_test: uri.o uri_test.o $(CC) -std=c11 -o $@ uri.o uri_test.o $(LDFLAGS) $(LIBS) -- cgit v1.3.1-23-gd82d From 0804d8b82a88fd3652959824758036961e821f2e Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 9 Feb 2020 19:48:03 +0100 Subject: keybindings: Add runtime version information --- keybindings.c | 12 ++++++++++-- po/fr.po | 25 ++++++++----------------- po/messages.pot | 23 +++++++---------------- 3 files changed, 25 insertions(+), 35 deletions(-) diff --git a/keybindings.c b/keybindings.c index 86713c2..4f39bbb 100644 --- a/keybindings.c +++ b/keybindings.c @@ -27,6 +27,15 @@ badwolf_about_dialog(GtkWindow *main_window, gpointer user_data) struct Window *window = (struct Window *)user_data; GtkWidget *about_dialog = gtk_about_dialog_new(); + char *comments = NULL; + + comments = g_strdup_printf( + _("Minimalist and privacy-oriented WebKitGTK+ browser\n" + "Runtime WebKit version: %d.%d.%d"), + webkit_get_major_version(), + webkit_get_minor_version(), + webkit_get_micro_version()); + gtk_window_set_transient_for(GTK_WINDOW(about_dialog), main_window); gtk_window_set_destroy_with_parent(GTK_WINDOW(about_dialog), TRUE); @@ -35,8 +44,7 @@ badwolf_about_dialog(GtkWindow *main_window, gpointer user_data) gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about_dialog), "2019 Haelwenn (lanodan) Monnier "); gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about_dialog), homepage); - gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about_dialog), - _("Minimalist and privacy-oriented WebKitGTK+ browser")); + gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about_dialog), comments); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about_dialog), version); g_signal_connect(about_dialog, "activate-link", G_CALLBACK(about_dialogCb_activate_link), window); diff --git a/po/fr.po b/po/fr.po index a3b348e..4d5827f 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Badwolf 0.3.0+gd88f2e7\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2020-02-04 07:54+0100\n" +"POT-Creation-Date: 2020-02-09 19:39+0100\n" "PO-Revision-Date: 2019-12-22 00:57+0100\n" "Last-Translator: Haelwenn (lanodan) Monnier \n" "Language-Team: French\n" @@ -38,7 +38,6 @@ msgstr "" "\n" #: badwolf.c:95 -#, fuzzy msgid "Crashed" msgstr "Crash" @@ -72,9 +71,13 @@ msgstr "Erreur : Le certificat n'est pas encore valide.\n" msgid "Error: The given identity doesn't match the expected one.\n" msgstr "Erreur : L'identité ne correspond pas à celle attendue.\n" -#: keybindings.c:39 -msgid "Minimalist and privacy-oriented WebKitGTK+ browser" -msgstr "Navigateur WebKitGTK+ minimaliste et orienté vie privée" +#: keybindings.c:33 +#, c-format +msgid "" +"Minimalist and privacy-oriented WebKitGTK+ browser\n" +"Runtime WebKit version: %d.%d.%d" +msgstr "Navigateur WebKitGTK+ minimaliste et orienté vie privée\n" +"Version WebKit au lancement: %d.%d.%d" #: badwolf.c:686 msgid "New tab" @@ -131,18 +134,6 @@ msgstr "le processus web a dépassé la limitation de mémoire.\n" msgid "the web process terminated for an unknown reason.\n" msgstr "le processus web s’est interrompu pour une raison inconnue.\n" -#: badwolf.c:95 -msgid "title|Crashed" -msgstr "Crash" - -#: badwolf.c:99 -msgid "title|Out of Memory" -msgstr "Dépassement Mémoire" - -#: badwolf.c:103 -msgid "title|Unknown Crash" -msgstr "Crash inconnu" - #: badwolf.c:776 #, c-format msgid "webkit-web-extension directory set to: %s\n" diff --git a/po/messages.pot b/po/messages.pot index 6f2f9f8..113380c 100644 --- a/po/messages.pot +++ b/po/messages.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Badwolf 0.4.0+g2e84f1d\n" +"Project-Id-Version: Badwolf 0.5.0-rc.1+g863073d\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2020-02-04 07:54+0100\n" +"POT-Creation-Date: 2020-02-09 19:47+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -65,8 +65,11 @@ msgstr "" msgid "Error: The given identity doesn't match the expected one.\n" msgstr "" -#: keybindings.c:39 -msgid "Minimalist and privacy-oriented WebKitGTK+ browser" +#: keybindings.c:33 +#, c-format +msgid "" +"Minimalist and privacy-oriented WebKitGTK+ browser\n" +"Runtime WebKit version: %d.%d.%d" msgstr "" #: badwolf.c:686 @@ -124,18 +127,6 @@ msgstr "" msgid "the web process terminated for an unknown reason.\n" msgstr "" -#: badwolf.c:95 -msgid "title|Crashed" -msgstr "" - -#: badwolf.c:99 -msgid "title|Out of Memory" -msgstr "" - -#: badwolf.c:103 -msgid "title|Unknown Crash" -msgstr "" - #: badwolf.c:776 #, c-format msgid "webkit-web-extension directory set to: %s\n" -- cgit v1.3.1-23-gd82d From 859af74fb7d8c81c6f90fe1001555b4bf1bb3fa6 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 9 Feb 2020 19:48:36 +0100 Subject: Makefile: Add po/messages.pot in all target --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0caf4b4..b343c56 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ CDEPS = -DDATADIR=\"$(DATADIR)\" -DPACKAGE=\"$(PACKAGE)\" -D_POSIX_C_SOURCE=2008 CDEPS += `$(PKGCONFIG) --cflags $(DEPS)` LIBS = `$(PKGCONFIG) --libs $(DEPS)` -all: $(EXE) $(TRANS) +all: $(EXE) $(TRANS) po/messages.pot po/messages.pot: $(SRCS) xgettext --keyword=_ --language=C --from-code=UTF-8 -o $@ --add-comments --sort-output --copyright-holder="Badwolf Authors " --package-name="$(PACKAGE)" --package-version="$(VERSION_FULL)" --msgid-bugs-address="contact+badwolf-msgid@hacktivis.me" $(SRCS) -- cgit v1.3.1-23-gd82d From 7dd5d018e3e889680da7f6d7624c83dca7054a3c Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 9 Feb 2020 19:57:34 +0100 Subject: keybindings: Update About dialog copyright notice --- keybindings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keybindings.c b/keybindings.c index 4f39bbb..d574276 100644 --- a/keybindings.c +++ b/keybindings.c @@ -42,7 +42,7 @@ badwolf_about_dialog(GtkWindow *main_window, gpointer user_data) gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about_dialog), "SPDX-License-Identifier: BSD-3-Clause"); gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about_dialog), - "2019 Haelwenn (lanodan) Monnier "); + "2019-2020 Badwolf Authors "); gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about_dialog), homepage); gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about_dialog), comments); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about_dialog), version); -- cgit v1.3.1-23-gd82d From 8af89b019a5b1da7549a819049e7908d0d106017 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 9 Feb 2020 20:11:50 +0100 Subject: Makefile: Bump to 0.5.0 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b343c56..0cc0a14 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # - Usage of += for appending to a variable PACKAGE = Badwolf -VERSION = 0.5.0-rc.1 +VERSION = 0.5.0 VERSION_FULL = $(VERSION)`./version.sh` PREFIX ?= /usr/local -- cgit v1.3.1-23-gd82d