logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: 00e6ddaee5b24b98ce1082985ef48dc6f6f52319
parent: 76b542b1b833e6bd32fbc6980077ea4bc8b5a176
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon,  4 May 2020 00:54:08 +0200

Downloads: Make it an hyperlink

Diffstat:

MREADME.md2+-
Mbadwolf.c2+-
Mdownloads.c6+++++-
Mpo/messages.pot28++++++++++++++--------------
4 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/README.md b/README.md @@ -19,7 +19,7 @@ Comparing from other small WebKit browsers for unixes found in the wild: - not queryabe by WebKit (so the web can't use it) - done in a standard format (like XBEL for bookmarks) - Static UI, no element should be added at runtime, this is to avoid potential tracking via viewport changes -- Small codebase, right now we are under 1 500 lines total +- Small codebase, should be possible to read and understand it completely over an afternoon. - Does not use modal editing (from vi) as that was designed for editing, not browsing - UTF-8 encoding by default diff --git a/badwolf.c b/badwolf.c @@ -747,7 +747,7 @@ badwolf_get_tab_position(GtkContainer *notebook, GtkWidget *child) int main(int argc, char *argv[]) { - struct Window *window = &(struct Window){NULL, NULL, NULL}; + struct Window *window = &(struct Window){NULL, NULL, NULL, NULL}; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, DATADIR "/locale"); bind_textdomain_codeset(PACKAGE, "UTF-8"); diff --git a/downloads.c b/downloads.c @@ -51,9 +51,13 @@ downloadCb_created_destination(WebKitDownload *webkit_download, gpointer user_data) { (void)webkit_download; + char *markup; struct Download *download = (struct Download *)user_data; - gtk_label_set_text(GTK_LABEL(download->file_path), destination); + markup = g_markup_printf_escaped("<a href=\"%s\">%s</a>", destination, destination); + + gtk_label_set_markup(GTK_LABEL(download->file_path), markup); + g_free(markup); } gboolean diff --git a/po/messages.pot b/po/messages.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Badwolf 0.5.1+gb1ff239.download-progress\n" +"Project-Id-Version: Badwolf 0.5.1+g76b542b.develop\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2020-05-01 00:20+0200\n" +"POT-Creation-Date: 2020-05-04 00:50+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,11 +17,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: downloads.c:155 downloads.c:159 +#: downloads.c:159 downloads.c:163 msgid "Badwolf Downloads" msgstr "" -#: badwolf.c:760 +#: badwolf.c:770 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "" @@ -41,15 +41,15 @@ msgstr "" msgid "Crashed" msgstr "" -#: downloads.c:98 +#: downloads.c:102 msgid "Download cancelled" msgstr "" -#: downloads.c:100 +#: downloads.c:104 msgid "Download error" msgstr "" -#: downloads.c:118 +#: downloads.c:122 msgid "Download finished" msgstr "" @@ -92,11 +92,11 @@ msgid "" "Runtime WebKit version: %d.%d.%d" msgstr "" -#: badwolf.c:689 +#: badwolf.c:699 msgid "New tab" msgstr "" -#: badwolf.c:808 +#: badwolf.c:819 msgid "Open new tab" msgstr "" @@ -104,12 +104,12 @@ msgstr "" msgid "Out of Memory" msgstr "" -#: badwolf.c:758 +#: badwolf.c:768 #, c-format msgid "Running Badwolf version: %s\n" msgstr "" -#: badwolf.c:765 +#: badwolf.c:775 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "" @@ -131,7 +131,7 @@ msgstr "" msgid "Unknown Crash" msgstr "" -#: badwolf.c:615 +#: badwolf.c:625 msgid "search in current page" msgstr "" @@ -147,12 +147,12 @@ msgstr "" msgid "the web process terminated for an unknown reason.\n" msgstr "" -#: badwolf.c:772 +#: badwolf.c:782 #, c-format msgid "webkit-web-extension directory set to: %s\n" msgstr "" #. TRANSLATOR Ignore this entry. Done for forcing Unicode in xgettext. -#: badwolf.c:842 +#: badwolf.c:853 msgid "ø" msgstr ""