Single-click for upload/open etc dialogs?

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
barryed
Level 1
Level 1
Posts: 20
Joined: Thu Feb 25, 2016 2:51 pm

Single-click for upload/open etc dialogs?

Post by barryed »

I have set Thunar to open files with a single click. However, in app-initiated file manager dialogs, like open or upload, I still have to double-click. Is there a way to make them respond to a single click as well?

xfce 4.14
64 bit
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
sleeper12
Level 21
Level 21
Posts: 14560
Joined: Thu May 25, 2017 3:22 pm

Re: Single-click for upload/open etc dialogs?

Post by sleeper12 »

barryed
Level 1
Level 1
Posts: 20
Joined: Thu Feb 25, 2016 2:51 pm

Re: Single-click for upload/open etc dialogs?

Post by barryed »

Thanks, but it doesn't.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Single-click for upload/open etc dialogs?

Post by MrEen »

Those dialogs aren't from Thunar itself.

The file that controls most things in these windows is /usr/share/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml and I don't see a single/double click option to change there.

ToZ on the Xfce forum might know if it can be added to the file manually.
User avatar
secureIT
Level 4
Level 4
Posts: 471
Joined: Wed Dec 05, 2018 1:26 pm

Re: Single-click for upload/open etc dialogs?

Post by secureIT »

Hi barryed,

First let me explain why there is a difference in choosing files with filemanager (thunar) and
choosing files with some apps like firefox e.g.
File manager itself will respect the adjustments for single/double click event.
Firefox e.g. dont uses filemanger but gtkfilechooser for choosing files.
But gtkfilechooser has no implementation for mouse single-clicks.

The developers of gtkfilechooser will not implement single-clicks.
See the whole discussion from 2003 up to 2017 here :

https://bugzilla.gnome.org/show_bug.cgi?id=121113

So you cant achieve what you want in simply adding entries to : org.gtk.Settings.FileChooser.gschema.xml


But there is a workaround, if you are willing to use another mouse-button for doing double-click-events with only one single-click.

I used the wheel-down-button to perform this action ......

Note: I tried it, and it runs flawlessly in thunar and also with gtkfilechooser
And there is no need to change the adjustment in thunar to single-click if you use the mapped wheel-down-button

If you want to try it, you need to install the following dependencies :

Open up a terminal, copy and paste the following - and hit return

Code: Select all

apt install xbindkeys xdotool

Then open a terminal copy and paste the following command to it - and hit return

Code: Select all

xev
Now a little window opens and if you set your mouse-pointer to it and push a button (e.g. wheel-down-button)
Then you will see additional informations and also the number of the button you pushed.

If you see >button 2< ( which is the default button number for middle mouse-click) then go on ...

Open up a terminal, copy and paste the following - and hit return

Code: Select all

xed .xbindkeysrc
copy and paste the following content into this now opened .xbindkeysrc

Code: Select all

# bind wheel-down-button to double-click
#
# needed dependencies:  xbindkeys xdootool
#
"xdotool click --repeat 2 1"
b:2 + Release
#
# activate with command     xbindkeys
# deactivate with command   pkill -f xbindkeys
Save the .xbindkeysrc and close xed.

Paste the following command in a terminal and hit enter

Code: Select all

xbindkeys
Now you can try how your wheel-down-button acts.

To stop the whole thing :

Paste the following command in a terminal and hit enter

Code: Select all

pkill -f xbindkeys 
.
barryed
Level 1
Level 1
Posts: 20
Joined: Thu Feb 25, 2016 2:51 pm

Re: Single-click for upload/open etc dialogs?

Post by barryed »

Much belated thanks for this. Great explanation; nice to know there's a workaround. I tend to eschew complexification though, so in the end my personal workaround is "get over it." :lol:
Locked

Return to “Xfce”