lxqt / libfm-qt

Core library of PCManFM-Qt (Qt binding for libfm)
https://lxqt-project.org
GNU Lesser General Public License v2.1
72 stars 53 forks source link

Save bookmarks where Qt, not Gtk, saves them #698

Closed probonopd closed 3 years ago

probonopd commented 3 years ago
Expected Behavior

pcmanfm-qt saves bookmarks in the place where Qt saves its bookmarks (~/.config/QtProject.conf), so that they are in sync with Qt file open/save dialogs

Current Behavior

pcmanfm-qt saves bookmarks in the place where Gtk saves its bookmarks (~/.config/gtk-3.0/bookmarks)

Possible Solution

This is how Qt bookmarks get stored:

FreeBSD% cat ~/.config/QtProject.conf 
[FileDialog]
(...)
shortcuts=file:, file:///home/user, file:///home/user/Desktop
(...)
Steps to Reproduce (for bugs)
  1. Add bookmarks in pcmanfm-qt 0.16.0
  2. Open a Qt application
  3. Bring up the "File open" dialog
  4. See that the bookmark is missing from the sidebar
Context

https://github.com/helloSystem/Filer/issues/31

System Information
stefonarch commented 3 years ago

Cannot reproduce, vlc or featherpad show bookmarks perfectly. Said that you could be you're right about the place for qt, but bookmarks should be available and the same for all filemanagers IMHO.

tsujan commented 3 years ago

That's intentional for two reasons, at least:

  1. Gtk bookmarks are used by most file managers (which are written in GTK) and it's good to be in sync with them.
  2. There's no consensus about where Qt bookmarks should be. ~/.config/QtProject.conf is only for Qt projects (as its name says). A well-known Qt-based file manager like Dolphin doesn't use it either.
probonopd commented 3 years ago

Gtk bookmarks are used by most file managers (which are written in GTK) and it's good to be in sync with them.

Is anyone using more than one file manager? I would think very few people are.

There's no consensus about where Qt bookmarks should be

The objective is that the bookmarks in the file manager are in sync with the bookmarks in Qt file open/save dialogs. I would think that many people who use a Qt based file manager are also using Qt based applications, and would expect the file open/save dialogs respect the same bookmarks as the file manager.

Right now, the bookmarks in the file manager are in sync with the bookmarks in Gtk file open/save dialogs:

image

But NOT in sync with the bookmarks in Qt file open/save dialogs:

image

My argument is that a Qt-based file manager should work nicely with Qt applications.

Maybe a compromise would be to save the bookmarks in both locations, for Gtk and Qt applications.

tsujan commented 3 years ago

Is anyone using more than one file manager?

Most users have GTK apps, like Firefox. GTK apps call GTK file dialog, which shows the same bookmarks.

The objective is that the bookmarks in the file manager are in sync with the bookmarks in Qt file open/save dialogs.

It isn't our goal (as it's not KDE's). in LXQt, we don't use Qt file dialog, which lacks many features. Under other DEs, users are free to install the needed libraries and have LXQt file dialog with Qt apps.

probonopd commented 3 years ago

Most users have GTK apps, like Firefox. GTK apps call GTK file dialog, which shows the same bookmarks.

Yes, but I am using PcManFmQt because I want to get rid of GTK and GTK apps. So you are saying I would have to tell my system to use the LXQt file dialog with Qt apps, how would one do that?

tsujan commented 3 years ago

Yes, but I am using LxQt because I want to get rid of GTK.

That hasn't been and will never be LXQt's goal.

BTW, apparently, you aren't using LXQt as it is; otherwise, you wouldn't mention Qt file dialog.

So you are saying I would have to tell my system to use the LXQt file dialog

I'm not saying you should do it but you could, by using LXQt's Qt plugin (lxqt-qtplugin). You could also fork and implement what you see fit for your system.

probonopd commented 3 years ago

Thanks for your explanation @tsujan. While I am also not saying that you should do anything, I firmly believe LXQt would be so much better if it dropped all Glib/Gtk/libfm leftovers and went native pure Qt.

tsujan commented 3 years ago

We (you and I) may share some feelings about GTK. I dislike it and have recently found GTK4 more ridiculous than GTK3.

However, LXQt devs — me included — aren't "Qt-puritans", as KDE devs aren't. Actually Qt devs aren't either. For example, GTK icon cache is used by Qt if available. We use it too in our icon engine.

We use GLib extensively because we believe it's better than Qt with regard to file management.

But none of these is related to the main topic.