parent
9c5f003457
commit
b93db60f05
|
@ -1,75 +0,0 @@
|
|||
From f245d8714690af30064a2e5ec94bd2374288c2b9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ingo=20Br=C3=BCckl?= <ib@wupperonline.de>
|
||||
Date: Sat, 2 Jul 2022 23:47:36 +0200
|
||||
Subject: [PATCH 1/2] Simplify code
|
||||
|
||||
The state of the modifier keys is available in event->state.
|
||||
---
|
||||
src/window.c | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/window.c b/src/window.c
|
||||
index 1ec0e02c..e9760386 100644
|
||||
--- a/src/window.c
|
||||
+++ b/src/window.c
|
||||
@@ -2620,11 +2620,7 @@ gboolean xa_treeview_mouse_button_press (GtkWidget *widget, GdkEventButton *even
|
||||
|
||||
if (event->button == 1)
|
||||
{
|
||||
- GdkModifierType state;
|
||||
-
|
||||
- gdk_event_get_state((GdkEvent *) event, &state);
|
||||
-
|
||||
- if (gtk_tree_selection_iter_is_selected(selection, &iter) && ((state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) == 0))
|
||||
+ if (gtk_tree_selection_iter_is_selected(selection, &iter) && ((event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) == 0))
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
From 5d18fd23e8242678dbe47c232bc60b47f8fd75b0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ingo=20Br=C3=BCckl?= <ib@wupperonline.de>
|
||||
Date: Sat, 2 Jul 2022 23:51:40 +0200
|
||||
Subject: [PATCH 2/2] Re-enable left mouse button double clicks
|
||||
|
||||
Check the time between two left mouse button clicks and if they are
|
||||
fast enough, fake a double-click event.
|
||||
|
||||
Left mouse button double clicks have been unintentionally disabled by
|
||||
the change in commit e81d108c429e29b13ef1759c05033a6f3c645ac1 in order
|
||||
to allow dragging of multiple rows.
|
||||
|
||||
This fixes github issue #148, reported by aianson.
|
||||
---
|
||||
src/window.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/window.c b/src/window.c
|
||||
index e9760386..b9591aed 100644
|
||||
--- a/src/window.c
|
||||
+++ b/src/window.c
|
||||
@@ -2597,6 +2597,7 @@ void xa_location_entry_activated (GtkEntry *entry,gpointer user_data)
|
||||
|
||||
gboolean xa_treeview_mouse_button_press (GtkWidget *widget, GdkEventButton *event, XArchive *archive)
|
||||
{
|
||||
+ static guint32 last_button1;
|
||||
XEntry *entry;
|
||||
GtkTreePath *path;
|
||||
GtkTreeIter iter;
|
||||
@@ -2620,10 +2621,17 @@ gboolean xa_treeview_mouse_button_press (GtkWidget *widget, GdkEventButton *even
|
||||
|
||||
if (event->button == 1)
|
||||
{
|
||||
+ if (event->time - last_button1 > 250)
|
||||
+ {
|
||||
+ last_button1 = event->time;
|
||||
+
|
||||
if (gtk_tree_selection_iter_is_selected(selection, &iter) && ((event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) == 0))
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
+ }
|
||||
+ else
|
||||
+ event->button = 2;
|
||||
}
|
||||
|
||||
if (!gtk_tree_selection_iter_is_selected(selection, &iter))
|
|
@ -1,15 +1,15 @@
|
|||
# Template file for 'xarchiver'
|
||||
pkgname=xarchiver
|
||||
version=0.5.4.18
|
||||
revision=2
|
||||
version=0.5.4.19
|
||||
revision=1
|
||||
build_style=gnu-configure
|
||||
configure_args="--disable-doc --enable-gtk2=no"
|
||||
hostmakedepends="pkg-config intltool"
|
||||
makedepends="gtk+3-devel"
|
||||
depends="xdg-utils desktop-file-utils hicolor-icon-theme"
|
||||
short_desc="Lightweight desktop independent archive manager"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
maintainer="icp <pangolin@vivaldi.net>"
|
||||
license="GPL-2.0-or-later"
|
||||
homepage="https://github.com/ib/xarchiver"
|
||||
distfiles="${homepage}/archive/${version}.tar.gz"
|
||||
checksum=639889e052aad60c4a4ecacd607de3128ab765686570e93d954171ffdc22333e
|
||||
distfiles="https://github.com/ib/xarchiver/archive/refs/tags/${version}.tar.gz"
|
||||
checksum=3a7b74699527da196034c089ebdc6d6b1360b717ad9811b782719a2194b4734f
|
||||
|
|
Loading…
Reference in New Issue