Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bookmarks config file #1009

Open
tsujan opened this issue Aug 15, 2024 · 4 comments · May be fixed by #1010
Open

Bookmarks config file #1009

tsujan opened this issue Aug 15, 2024 · 4 comments · May be fixed by #1010
Labels

Comments

@tsujan
Copy link
Member

tsujan commented Aug 15, 2024

For bookmarks we use ~/.config/gtk-3.0/bookmarks to have compatibility with GTK3 apps. We also check the legacy file of GTK2 (why?).

I don't know about GTK4, but I think following GTK isn't a good idea after GTK3. Instead, I propose that we forget about GTK ≥ 4 and take a more self-consistent approach, by using a file of our own (perhaps ~/.local/share/libfm-qt/bookmarks), with ~/.config/gtk-3.0/bookmarks only for backward compatibility.

@stefonarch
Copy link
Member

We also check the legacy file of GTK2 (why?).

Because of pcmanfm? Afaik only arch has pcmanfm-gtk3.

Atm bookmarks are shared with thunar, nautilus and others probably. So existing bookmarks will be ported to a new config file? GTK4 should provide backwards compatibility too, so the current approach won't be unusable soon IMO.

@tsujan
Copy link
Member Author

tsujan commented Aug 15, 2024

So existing bookmarks will be ported to a new config file?

Yes, it'll be backward compatible (I already made a patch): After the first run of any libfm-qt based app, libfm-qt will make its separate bookmarks file by using the GTK3 file (if any) and won't share any change to it it with GTK afterward. Some users might consider it as a good thing because their GTK bookmarks will be kept untouched.

GTK4 should provide backwards compatibility too

Do you really expect backward compatibility from GNOME? ;)

BTW, do you know how GTK4 manages bookmarks? I installed gtk4-demos and found a way of calling open-file dialog from gtk4-widget-factory but, to my surprise, our LXQt file dialog was launched instead!

@stefonarch
Copy link
Member

stefonarch commented Aug 15, 2024

BTW, do you know how GTK4 manages bookmarks? I installed gtk4-demos and found a way of calling open-file dialog from gtk4-widget-factory but, to my surprise, our LXQt file dialog was launched instead!

Maybe the lxqt portal? I've no idea about GTK4 and I prefer to remain in that state. Let's make a PR and maybe there will be some more people discuss it.

@tsujan
Copy link
Member Author

tsujan commented Aug 15, 2024

Maybe the lxqt portal?

Yes. I just wanted to see how a purely GTK4 file dialog managed bookmarks. But it isn't important.

Let's make a PR...

Will do it soon.

tsujan added a commit that referenced this issue Aug 15, 2024
The new file is `~/.local/share/libfm-qt/bookmarks`. If it doesn't exist or is empty, as soon as a libfm-qt based app is launched, the GTK3 file `~/.config/gtk-3.0/bookmarks` will be consulted for backward compatibility, then the new file will be created and the GTK3 file will be ignored.

Closes #1009

NOTE: The portal file dialogs will see the change after a reboot (or after restarting user portal services).
@tsujan tsujan linked a pull request Aug 15, 2024 that will close this issue
tsujan added a commit that referenced this issue Aug 15, 2024
The new file is `~/.local/share/libfm-qt/bookmarks`. If it doesn't exist or is empty, as soon as a libfm-qt based app is launched, the GTK3 file `~/.config/gtk-3.0/bookmarks` will be consulted for backward compatibility, then the new file will be created and the GTK3 file will be ignored.

Closes #1009

NOTE: The portal file dialogs will see the change after a reboot (or after restarting user portal services).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants