Retrieving the filename from a GtkFileChooserDialog

Figured it out if anyone runs across this later, ended up just needing to cast the widget to the correct type:

    if msg == "file"
        local val = Gtk.GAccessor.filename(Gtk.GtkFileChooser(widget))
        if val != C_NULL
            local filename = Gtk.bytestring(val)
            println("Filename: ", filename)
        end
    end
2 Likes