brummer10 / Fluida.lv2

Fluidsynth as LV2 plugin
GNU General Public License v2.0
33 stars 4 forks source link

File selector suggestions #22

Closed danboid closed 1 year ago

danboid commented 1 year ago

I'd like to see the fluida file selector get a few tweaks:

brummer10 commented 1 year ago

Hi Thanks for the Suggestion. I'll think about If or how I could include them. To Point one, you could Go to the parent directory with the mousewheel or do a right click on the address, that will Pop Up a Menu with the parent directorys.

danboid commented 1 year ago

Thanks for considering my suggestions Hermann! I've not made proper use of it yet but this is a very useful, easy to use and install plugin.

danboid commented 1 year ago

I've not been able to work out where fluida/Cairo gets its list of Places (paths) to show in the file open window so as a workaround until this gets fixed I've created a symbolic link from /usr/share/sounds/sf2 to ~/sf2 .

brummer10 commented 1 year ago

The Places comes from xdg-user-dirs. Check your ./config/user-dirs.dirs file. You could add/remove places there, most (I guess all) file-managers will use this file to generate the places list.

danboid commented 1 year ago

I tried adding the line:

XDG_SF2_DIR="/usr/share/sounds/sf2"

to ~/.config/user-dirs.dirs like so:

dan@zbook:~/.config$ cat user-dirs.dirs 
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
XDG_SF2_DIR="/usr/share/sounds/sf2"

but now qtractor crashes as soon as I click on the folder icon in fluida to try to open a soundfont.

$ qtractor 
Gtk-Message: 13:54:56.192: Failed to load module "canberra-gtk-module"

(qtractor:2350): GLib-GObject-WARNING **: 13:54:56.207: g_object_get_is_valid_property: object class 'GtkSettings' has no property named 'gtk-application-prefer-dark-theme'

(qtractor:2350): GLib-GObject-WARNING **: 13:54:56.208: g_object_get_is_valid_property: object class 'GtkSettings' has no property named 'gtk-application-prefer-dark-theme'
Segmentation fault
danboid commented 1 year ago

I've also tried adjusting the path of XDG_MUSIC_DIR:

XDG_MUSIC_DIR="/usr/share/sounds/sf2"

Again qtractor segfaults at the same point, when clicking on the fluida folder icon.

brummer10 commented 1 year ago

Oh, yes, there was a bug in the xdg_user_dir parser. I've fixed that now. It should work now with both options you've tried.

danboid commented 1 year ago

Hi @brummer10

Yes, thats fixed now. Thanks!

It would be good if you could edit the Fluida README to explain how users can edit ./config/user-dirs.dirs to add custom paths to the open file window to make loading soundfonts easier. That file was unknown to me until you told me about it.

brummer10 commented 1 year ago

I could do that, but, that is more about the general XDG standard given by freedesktop.org and not really related to Fluida.lv2.

danboid commented 1 year ago

I think you should. I did search for this info before I asked you but failed to find it.

It will only take a couple of sentences to do and this makes fluida much more usable for me. I'll submit a PR to add it if you want?

danboid commented 1 year ago

https://github.com/brummer10/Fluida.lv2/pull/24

danboid commented 1 year ago

I should note that I had tried creating a bookmark to my sf2 dir using MATE's Caja file manager but, surprisingly, it doesn't seem to use the user-dirs.dirs file because my bookmarked dirs didn't appear in the Places panel of Fluida's file selector.

brummer10 commented 1 year ago

Thanks a lot. Merged.

danboid commented 1 year ago

I'm going to close this now as knowing how to configure the XDG user dirs (as I've now documented in the README) fixes most of my previous issues with the file selector.

danboid commented 1 year ago

Just to correct myself on Caja and dirs of interest. Caja does acknowledge the XDG user dirs, its just that you can't add or remove them from within Caja and its Bookmarked dirs, which you can add and remove at will using the Caja GUI are treated separately.

brummer10 commented 1 year ago

Yes, bookmarks been a different thing. Apps usually using there own config file to store bookmarks as, in opposite to the XDG user dirs, they don't been meant to be global. Fluida can't use bookmarks because it didn't have a config file. So the only way to add a "bookmark" is to add it to the XDG user dirs.