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

Experimental > Native File Dialog does nothing on Ubuntu Linux #1953

Closed
ericoporto opened this issue Dec 15, 2018 · 9 comments
Closed

Experimental > Native File Dialog does nothing on Ubuntu Linux #1953

ericoporto opened this issue Dec 15, 2018 · 9 comments
Assignees
Labels
Milestone

Comments

@ericoporto
Copy link

When I select Native File Dialog I expect the application to use a file opener from my system. It instead opens a file open dialog rendered in aseprite instead of a Gtk3+ Window or something more native to Linux.

Aseprite and System version

  • Aseprite version: 1.2.9
  • System: Ubuntu 16.04 .5 LTS + Steam
@dacap
Copy link
Member

dacap commented Dec 15, 2018

At the moment the gtk+ file selector is disabled because it creates a hard dependency with gtk+ and gdk libraries. A possible solution in the future would be load gtk+ functions dynamically.

@dacap dacap added the linux label Dec 15, 2018
@ericoporto
Copy link
Author

I haven't tested and the commit dates scare me, but have you seem this project ?

@dacap
Copy link
Member

dacap commented Dec 15, 2018

I see that that project has the same issue: it depends directly on the gtk header files/library.

@ericoporto
Copy link
Author

ericoporto commented Dec 15, 2018

I looked on how chromium did it. But it's too complicated... Steam apparently has the same issue... The easiest way I can think of, but it would still be a lot of work, would be decoupling this in your own lib (that would depend on gtk), and have that built separately and dynamically link that... I didn't knew the difficulty of the task.

@buckle2000
Copy link

I found a solution some applications use. https://gitlab.gnome.org/GNOME/zenity

@Anuken
Copy link

Anuken commented May 28, 2021

Could using the same approach as tinyfiledialogs be an option? It appears to use zenity / matedialog / kdialog for the file chooser - these are run from the command-line and don't require any additional dependencies.

@ericoporto
Copy link
Author

@dacap dacap self-assigned this Jun 26, 2023
@dacap dacap added this to the v1.3-rc5 milestone Jun 26, 2023
@dacap dacap moved this to In Progress in Aseprite v1.3.x Jun 26, 2023
dacap added a commit to dacap/laf that referenced this issue Jun 27, 2023
We've removed the GTK+ impl and LAF_OS_WITH_GTK flag, as we don't have
plans to link with GTK+, and replace it with a new implementation that
run Zenity to show the dialog. It's not perfect, there are several
issues to improve the UX, but it's good enough to offer a native file
dialog on Linux.

Related to:
aseprite/aseprite#1953
aseprite/aseprite#2354
@dacap dacap closed this as completed in 556c621 Jun 27, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Aseprite v1.3.x Jun 27, 2023
@ericoporto
Copy link
Author

Great work! Thank you!

@dacap
Copy link
Member

dacap commented Jun 27, 2023

You're welcome @ericoporto! not the best implementation (which would be loading GTK dynamically or something like that), but it's the best we can do right now to support most Linux distributions. It uses the zenity command line utility, there are a couple of issues I'd like to see if I can implemented for zenity:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

4 participants