Skip to content

FileChooser opens, but no on_accept! is triggered #82

@schlichtanders

Description

@schlichtanders

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions