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

Native Filepickers silently fail/don't appear when CurrentFilter is set #2632

Open
Miepee opened this issue Mar 9, 2024 · 0 comments
Open

Comments

@Miepee
Copy link
Contributor

Miepee commented Mar 9, 2024

Expected Behavior

File picker should appear

Actual Behavior

The file picker doesn't appear / seems to fail somewhere

Steps to Reproduce the Problem

  1. Use Linux (havent tested on other OS)
  2. Use either flatpak, or set the environmnent variable GTK_USE_PORTAL=1
  3. Call the below code

Code that Demonstrates the Problem

FileFilter filter = new FileFilter("Zip files", ".zip");
using OpenFileDialog fileFinder = new OpenFileDialog
{
    Filters = { filter },
    Title = title,
    CurrentFilter = filter,
    CheckFileExists = true,
};
fileFinder.ShowDialog();

Notes

Commenting out CurrentFilter works fine.
I tried to investiage it a litle bit and the sisue Seems to be somewhere in GTKFileDialog.cs::SetFilters. It is getting called by ShowDialog. Setting a breakpoint on that call, reveals that after stepping over the function, it will never reach the next line (int result = Control.Run();).
I am not sure what could cause this. It seems to choke somewhere on the AddFilter GTK# call, but I have no clue why.

Specifications

  • Version: dotnet 8
  • Platform(s): Eto.Platform.GTK 2.8.2
  • Operating System(s): Arch Linux, Fedora
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant