[Solved][Bug ?] Single/double click preference of desktop environment not used

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
openBrain
Posts: 3440
Joined: Fri Nov 09, 2018 5:38 pm

[Solved][Bug ?] Single/double click preference of desktop environment not used

Postby openBrain » Wed Dec 12, 2018 9:28 pm

Hi all,

I encounter a quite annoying behavior.
In FC directory/file dialogs (for example "open" or "save" dialogs), the single/double click preference of my desktop environment is not imported.
In my case, double click is used in KDE to select a file or enter a directory.
While all installed applications seem to also use that setting in their dialogs, FC uses single click.
It's not an harmful behavior, but leads to unexpected things when you use to double-click (you can quickly getting lost on directories deeper than expected, or being prompt to confirm a file overwriting... :lol: )

Could someone confirm ? And does it need a bug report filling ?

BR

EDIT :
OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15287 (Git)
Build type: Release
Branch: master
Hash: 792bb8282a475905a233905a07060640456f3128
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
Last edited by openBrain on Wed Jan 16, 2019 7:20 pm, edited 1 time in total.
chrisb
Posts: 22526
Joined: Tue Mar 17, 2015 9:14 am

Re: [Bug ?] Single/double click preference of desktop environment not used

Postby chrisb » Wed Dec 12, 2018 10:57 pm

This might be related to the discussion about which file selection dialog to use for Ubuntu: https://forum.freecadweb.org/viewtopic. ... 60#p271260.
openBrain
Posts: 3440
Joined: Fri Nov 09, 2018 5:38 pm

Re: [Bug ?] Single/double click preference of desktop environment not used

Postby openBrain » Wed Dec 12, 2018 11:20 pm

chrisb wrote:
Wed Dec 12, 2018 10:57 pm
This might be related to the discussion about which file selection dialog to use for Ubuntu: https://forum.freecadweb.org/viewtopic. ... 60#p271260.
Too late now to read and understand this thread. But I'll carefully read later on and see if I get some clues about my issue. :)
Just notice that while the "copy to clipboard" tells I use Ubuntu, I actually run Kubuntu. I thus expect FreeCAD (over KDE) to use the default Qt dialog (and to integrate finely) but I'm sure of nothing at this time.
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: [Bug ?] Single/double click preference of desktop environment not used

Postby triplus » Thu Dec 13, 2018 9:46 am

You can enable/disable the usage of Dolphin file manager by following this procedure:

https://forum.freecadweb.org/viewtopic. ... 80#p273068

P.S. Sometimes native file manager can have some issues. For example Nautilus has issues with adding extensions. End user has to add them manually. It was reported Dolphin doesn't have such issue, but maybe some other issue will be detected. Anyway, it's easy now, to try it out, and to see how it goes.
openBrain
Posts: 3440
Joined: Fri Nov 09, 2018 5:38 pm

Re: [Bug ?] Single/double click preference of desktop environment not used

Postby openBrain » Fri Dec 14, 2018 4:40 pm

triplus wrote:
Thu Dec 13, 2018 9:46 am
You can enable/disable the usage of Dolphin file manager by following this procedure:

https://forum.freecadweb.org/viewtopic. ... 80#p273068

P.S. Sometimes native file manager can have some issues. For example Nautilus has issues with adding extensions. End user has to add them manually. It was reported Dolphin doesn't have such issue, but maybe some other issue will be detected. Anyway, it's easy now, to try it out, and to see how it goes.
Hi triplus,

Just tried the commands you pointed out. I guess these commands are to be entered in the FreeCAD's Python console, but I'm not completely sure. May you confirm ?
If this is right the way, I tried the 3 sets of commands given in the thread post, and no one allows me to recover my default desktop env behavior (double click). Always stuck with single click on FC dialogs. ;)
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: [Bug ?] Single/double click preference of desktop environment not used

Postby triplus » Wed Dec 19, 2018 11:46 am

Did the file dialog change, or you always got the same one? You need to test it with the latest FreeCAD 0.18 development release, or it won't work.

https://github.com/FreeCAD/FreeCAD/rele ... g/0.18_pre
openBrain
Posts: 3440
Joined: Fri Nov 09, 2018 5:38 pm

Re: [Bug ?] Single/double click preference of desktop environment not used

Postby openBrain » Wed Dec 19, 2018 8:01 pm

triplus wrote:
Wed Dec 19, 2018 11:46 am
Did the file dialog change, or you always got the same one? You need to test it with the latest FreeCAD 0.18 development release, or it won't work.

https://github.com/FreeCAD/FreeCAD/rele ... g/0.18_pre
Hi,

Just upgraded from the 0.18.15287 to the latest available through PPA (15441).
Tried again and ... nothing.
And indeed I actually don't see any change in the dialog before or after testing the command lines.
Maybe I do something wrong but can't figure out what it could be...

Last info after upgrade
----
OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15441 (Git)
Build type: Release
Branch: master
Hash: c43adafb127f1238bedcb0d2033be3e9e8f7494e
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: [Bug ?] Single/double click preference of desktop environment not used

Postby triplus » Thu Dec 20, 2018 3:07 pm

It should work with that version. After FreeCAD is started and this code snippet is pasted in the FreeCAD Python console:

Code: Select all

p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Dialog")
p.SetBool("DontUseNativeDialog", False)
Without restarting FreeCAD now File -> Open should bring up Nautilus (if you haven't customize Ubuntu in this area). Maybe you tried it after you restarted FreeCAD? If yes, that could indicate FreeCAD crashes on close, due to some issue, and the parameter doesn't get saved.

https://forum.freecadweb.org/viewtopic. ... 12#p275289
openBrain
Posts: 3440
Joined: Fri Nov 09, 2018 5:38 pm

Re: [Bug ?] Single/double click preference of desktop environment not used

Postby openBrain » Thu Dec 20, 2018 5:37 pm

triplus wrote:
Thu Dec 20, 2018 3:07 pm
It should work with that version. After FreeCAD is started and this code snippet is pasted in the FreeCAD Python console:

Code: Select all

p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Dialog")
p.SetBool("DontUseNativeDialog", False)
Without restarting FreeCAD now File -> Open should bring up Nautilus (if you haven't customize Ubuntu in this area). Maybe you tried it after you restarted FreeCAD? If yes, that could indicate FreeCAD crashes on close, due to some issue, and the parameter doesn't get saved.

https://forum.freecadweb.org/viewtopic. ... 12#p275289
I tried both without then with restarting. That made no difference.
Nautilus ??? Don't expect to see it as I'm running KDE (Kubuntu). Should I see Dolphin instead ?

BR
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: [Bug ?] Single/double click preference of desktop environment not used

Postby triplus » Thu Dec 20, 2018 5:43 pm

openBrain wrote:
Thu Dec 20, 2018 5:37 pm
Nautilus ??? Don't expect to see it as I'm running KDE (Kubuntu). Should I see Dolphin instead ?
Yes, you should get Dolphin.

P.S. Will test on Kubuntu 18.10 + AppImage and report back.