logo

badwolf

minimalist and privacy-oriented web browser based on WebKitGTK git clone https://hacktivis.me/git/badwolf.git
commit: d52aae2414564040b7d3ff61b6e4cfa09617ace0
parent c5a130bb03ed75efca511bcea2e48931941062eb
Author: Stacy Harper <contact@stacyharper.net>
Date:   Mon, 27 Dec 2021 17:57:42 +0100

badwolf.c: add mouse middle click to open link in new tab

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>

Diffstat:

Mbadwolf.12+-
Mbadwolf.c3++-
Mbadwolf.fr.12+-
Mpo/fr_man.po9+++++----
Mpo/manpage.pot4++--
5 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/badwolf.1 b/badwolf.1 @@ -27,7 +27,7 @@ if it works for the whole window, followed by the keybind it grabs. Zooms the webpage in/out. .It webview Ctrl-0 Resets webpage zoom to 100%. -.It webview Ctrl-MousePrimary +.It webview Ctrl-MousePrimary, webview MouseMiddle Opens the selected link in a new tab. (Note: JS still overrides the event) .It any Ctrl-t Creates a new tab (in a new session, similar as pressing the button) diff --git a/badwolf.c b/badwolf.c @@ -335,7 +335,8 @@ WebViewCb_decide_policy(WebKitWebView *UNUSED(web_view), WebKitNavigationAction *navigation_action = webkit_navigation_policy_decision_get_navigation_action(n); - if(GDK_CONTROL_MASK == webkit_navigation_action_get_modifiers(navigation_action)) + if(GDK_CONTROL_MASK == webkit_navigation_action_get_modifiers(navigation_action) || + 2 == webkit_navigation_action_get_mouse_button(navigation_action)) { WebKitURIRequest *uri = webkit_navigation_action_get_request(navigation_action); const gchar *target_url = webkit_uri_request_get_uri(uri); diff --git a/badwolf.fr.1 b/badwolf.fr.1 @@ -38,7 +38,7 @@ entière, suivit par le raccourcis. (Dé)-Grossir le zoom de la page. .It vueweb Ctrl-0 Remettre le zoom de la page à 100%. -.It vueweb Ctrl-SourisPremier +.It vueweb Ctrl-SourisPremier, vueweb SourisMilieu Ouvrir le lien sélectionné dans un nouvel onglet. (Note: JS modifie quand-même l'action) .It tout Ctrl-t diff --git a/po/fr_man.po b/po/fr_man.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2022-09-19 18:17+0200\n" +"POT-Creation-Date: 2022-09-19 18:23+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" @@ -125,15 +125,16 @@ msgstr "Remettre le zoom de la page à 100%." #. type: It #: badwolf.1:30 #, no-wrap -msgid "webview Ctrl-MousePrimary" -msgstr "vueweb Ctrl-SourisPremier" +msgid "webview Ctrl-MousePrimary, webview MouseMiddle" +msgstr "vueweb Ctrl-SourisPremier, vueweb SourisMilieu" #. type: Plain text #: badwolf.1:32 msgid "" "Opens the selected link in a new tab. (Note: JS still overrides the event)" msgstr "" -"Ouvrir le lien sélectionné dans un nouvel onglet. (Note: JS modifie quand-même l'action)" +"Ouvrir le lien sélectionné dans un nouvel onglet. (Note: JS modifie quand-" +"même l'action)" #. type: It #: badwolf.1:32 diff --git a/po/manpage.pot b/po/manpage.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Badwolf 1.2.0+gc88b0cd.develop\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2022-09-19 18:17+0200\n" +"POT-Creation-Date: 2022-09-19 18:23+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" @@ -116,7 +116,7 @@ msgstr "" #. type: It #: badwolf.1:30 #, no-wrap -msgid "webview Ctrl-MousePrimary" +msgid "webview Ctrl-MousePrimary, webview MouseMiddle" msgstr "" #. type: Plain text