Akuli / porcupine

A decent editor written in tkinter
MIT License
161 stars 46 forks source link

Better File Dialog for Linux #1362

Open benjamin-kirkbride opened 1 year ago

benjamin-kirkbride commented 1 year ago
          TIL that it tk uses native file dialogs on not-linux...

Yes, agree completely with everything @rdbende said. My thoughts is it should work like this:

  1. if windows or mac use default filedialog as now; if linux continue
  2. check config to see what user wants to do; if no config set continue
  3. try zenity
  4. try kdialog
  5. try tkfilebrowser (optional install?)
  6. fallback to default tk.filedialog

Originally posted by @benjamin-kirkbride in https://github.com/Akuli/porcupine/issues/1358#issuecomment-1629805198

rdbende commented 1 year ago

I have some stuff with kdialog and zenity here:

https://github.com/tukaan/tukaan/blob/master/tukaan/dialogs/filedialog.py

Though we don't need this many options fortunately.

Akuli commented 1 year ago
  1. try zenity
  2. try kdialog

This might not be great if you have both installed, but you are currently using KDE. Maybe we could try kdialog first and then zenity, if according to environment variables Porcupine is running in KDE.

But I don't have KDE, so I don't know how well zenity works on KDE. Maybe it works fine and we can always try it first :)

  1. try tkfilebrowser (optional install?)

I think this isn't necessary. We already have a sudo apt install line in the linux instructions, so we might as well tell people to install zenity.