thonny / thonny

Python IDE for beginners
https://thonny.org
MIT License
3.07k stars 1.01k forks source link

Create custom file dialog for Linux #2756

Open jdeisenberg opened 1 year ago

jdeisenberg commented 1 year ago
  1. Start Thonny
  2. Open a file via File/Open; the file dialog appears above the main Thonny window.
  3. Go to another application (say, the browser) by clicking in its window.
  4. Return to Thonny by clicking Thonny’s main window.
  5. Open a file via File/Open; the file dialog appears below the main Thonny window.

KDE Plasma Vesion 5.24.7 KDE Frameworks Version 5.92.0 Qt Version 5.15.3 Kernel Version: 5.19.0-40-generic (64-bit) Graphics Platform: X11 Thonny Version 4.0.2, Ubuntu 22.04.2 LTS (64-bit), Python 3.10.9 (64 bit) Tk 8.6.12

Attached video shows the problem.

https://user-images.githubusercontent.com/160096/233431400-5decb855-bb45-40db-8f6a-fc23cafa2b8d.mp4

aivarannamaa commented 1 year ago

Thanks for the report!

Unfortunately this is hard to fix. Thonny uses zenity utililty for selecting files and in most systems it doesn't work as it should. The work-around is to use Tk filedialogs instead of zenity (Tools => Options => General), but these have other problems.

I'll keep this issue and maybe I'll build another custom filedialog, which is nicer than Tk's.