commit: 004303e8f062d2dc66c45a11851a65d646010bd8
parent: 8c4f30b133dc4e3103a87d3ebb203b32989c84a5
author: Chris Noxz <chris@noxz.tech>
date: Sat, 30 Dec 2023 12:28:02 +0100
add right clicking as an option to cancel downloads
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/adji.1 b/adji.1
@@ -316,10 +316,10 @@ move through tabs in the same direction as your scroll.
The download bar remains hidden until a download is initiated. As the download
progresses, the progress is shown and updated. Each download is represented by
a button that can be clicked. During an active download, clicking the button
-with the middle mouse button will abort the download and remove the button.
-Once the download is complete, left-clicking the button will open the
+with the middle or right mouse button will abort the download and remove the
+button. Once the download is complete, left-clicking the button will open the
downloaded file using 'xdg-open,' while clicking the button with the middle
-mouse button will simply remove it.
+or right mouse button will simply remove it.
.
.SS Web view
.TP
diff --git a/browser.h b/browser.h
@@ -350,6 +350,7 @@ cb_download_press(GtkWidget *btn,
gpointer data)
{
switch (event->button) {
+ case 3: /* right click: */
case 2: /* middle click: cancel and/or remove */
if (!(*((gboolean*)g_object_get_data(G_OBJECT(btn), __NAME__"-finished"))))
webkit_download_cancel(WEBKIT_DOWNLOAD(data));