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

GTK / File Dialogs #63

Open
cookiengineer opened this issue Apr 12, 2017 · 7 comments
Open

GTK / File Dialogs #63

cookiengineer opened this issue Apr 12, 2017 · 7 comments

Comments

@cookiengineer
Copy link
Contributor

cookiengineer commented Apr 12, 2017

Is there an API available to open a GTK File dialog to open files from the system's native file browser?

That would ease up interaction with files much more. Otherwise, I guess, somebody would have to implement their own filesystem dialog in canvas / webgl to navigate around the system.

So if it's not available, this would be a feature request for:

  • Open File Dialog
  • Save File Dialog
@paraboul
Copy link
Member

paraboul commented Apr 12, 2017

Yes it's available (GTK and macOS) :)

https://github.com/nidium/Nidium/blob/master/src/Binding/JSWindow.cpp#L1119-L1120

window.openFileDialog(["jpg"], function(files) {});

Not implemented the save dialog yet though.

Dragging files from the Desktop to the Window is also implemented on macOS but not in GTK.

@paraboul
Copy link
Member

For reference, the GTK implementation is here : https://github.com/nidium/Nidium/blob/master/src/Interface/linux/X11UIInterface.cpp#L69

@cookiengineer
Copy link
Contributor Author

cookiengineer commented Apr 12, 2017

Woah, awesome! I've gotta say, nidium feels more and more like a wet dream for (native) App developers.

Is there any way to contribute to the API docs or are they hosted in another repository I've overseen? Would love to write some docs, so people can find stuff like this quicker.

@verpeteren
Copy link
Contributor

verpeteren commented Apr 12, 2017

The documentation for the api`s is in ./docs.
Our buildbot uses NidiumTools/src/dokumentator.py to upload them to the website after an successful build.

@paraboul
Copy link
Member

We probably want to open the guide stuff for contribution. I'll try to figure out this asap

@cookiengineer
Copy link
Contributor Author

Okay, now my question is: There are Open File dialogs and they work perfectly. Are there also Save File Dialogs?

The window bindings and UI interface seem to have none available. So would this be a feature request?

@paraboul
Copy link
Member

Indeed there is no save window.
If this is something you really need to continue, this is something pretty straightforward to create.

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

3 participants