Clemapfel / Mousetrap.jl

Finally, a GUI Engine made for Julia
https://clemens-cords.com/mousetrap
GNU Lesser General Public License v3.0
387 stars 10 forks source link

`FileChooser` opens, but no `on_accept!` is triggered #82

Open schlichtanders opened 2 months ago

schlichtanders commented 2 months ago

Hello, I am currently in the process of finding out how to open the system filepicker from julia. It is quite difficult unfortunately.

using Moustrap, the on_accept! just does nothing in my case

julia> using Mousetrap

(process:812411): Gtk-WARNING **: 14:23:00.435: Unknown key gtk-button-images in /home/ssahm/.config/gtk-4.0/settings.ini

(process:812411): Gtk-WARNING **: 14:23:00.435: Unknown key gtk-menu-images in /home/ssahm/.config/gtk-4.0/settings.ini

(process:812411): Gtk-WARNING **: 14:23:00.435: Unknown key gtk-toolbar-style in /home/ssahm/.config/gtk-4.0/settings.ini

(process:812411): Adwaita-WARNING **: 14:23:00.460: Using GtkSettings:gtk-application-prefer-dark-theme with libadwaita is unsupported. Please use AdwStyleManager:color-scheme instead.

julia> file_chooser = FileChooser()
FileChooser()

julia> on_accept!(file_chooser) do self::FileChooser, files
           println("selected files: $files")
       end

julia> present!(file_chooser)

If I now choose a file and click "open", then nothing happens.

Running on nixos with julia 1.10.2 installed via juliaup

schlichtanders commented 2 months ago

@Clemapfel Do you know how to debug this further? What could be the problem ...