cvfosammmm / Setzer

LaTeX editor written in Python with Gtk
https://www.cvfosammmm.org/setzer/
Other
388 stars 34 forks source link

Move to `Gtk.FileChooserNative` #325

Closed oscfdezdz closed 1 year ago

oscfdezdz commented 1 year ago

The main motivation for this change was to remove or reduce file system permissions, since it provides access to the org.freedesktop.portal.FileChooser portal. That change would have brought a regression in displaying the file path, showing /run/user/1000/doc/.../<filename> which, in this case, is not good. Therefore, I discarded the idea of making changes to the permissions.

Even so, the improvements that Gtk.FileChooserNative provides by its own, in terms of UX, by making use of the system/platform file selector are, I think, enough to make this change.

Related PR #318

oscfdezdz commented 1 year ago

The latest versions of the GTK file chooser include a grid view of icons. BibTeX and TeX files don't have thumbnails, but PDFs do and when a directory contains many files, they may be useful to identify the desired file more quickly as they usually have the same name.

cvfosammmm commented 1 year ago

I think it would be nice to do more custom stuff in the future. Like we could show the .pdf-thumbnails for .tex-files possibly. I can think of other mods along these lines.

cvfosammmm commented 1 year ago

I don't really see a good reason to change it. We get the grid view anyways (since it's in Gtk), or not? Then I think would be a reason to stay with Gtk.

oscfdezdz commented 1 year ago

We get the grid view anyways (since it's in Gtk), or not? Then I think would be a reason to stay with Gtk.

It was added to GTK4 in version 4.9.2 and is not available in GTK3 unless Gtk.FileChooserNative is used and the system has updated versions of xdg-desktop-portal-gtk/gnome.

cvfosammmm commented 1 year ago

Setzer will switch to 4 eventually.

oscfdezdz commented 1 year ago

Closing this one since there's already an issue for GTK 4 and solving that one will solve this as a side effect.