epsilon-phase / Symmetricality

More symmetry for everyone :)
GNU General Public License v3.0
4 stars 0 forks source link

File open and save dialog #2

Closed epsilon-phase closed 8 years ago

epsilon-phase commented 8 years ago

Having a visible filename for saving and loading is useful, however, it feels like an ancient program in that awkward valley between a GUI application and a terminal application

epsilon-phase commented 8 years ago

It is worth looking into "tinyfiledialogs" which purports to provide precisely the sort of functionality I want without having to link to additional libraries(which is really neat).

Though it does seem to be a C wrapper around various python scripts(which are embedded inside of it... eww).

epsilon-phase commented 8 years ago

It is done.

vareille commented 8 years ago

tinyfiledialogs is not really embedding various python scripts. On unix, it tries various command line calls to show the dialogs. When everything fails (applescript, zenity, kdialog, xdialog), then, and only then, it tries a python tkinter command line call, because tkinter offers file dialogs and is present on many systems. The goal (which I believe is achieved) is to make sure the dialogs are shown whatever the system you are on, and whatever is installed or not on it.

epsilon-phase commented 8 years ago

Thanks for the clarification, but there are import declarations for python modules in there. I think.

In any case it seems to work well enough. On Jan 5, 2016 8:36 AM, "chafporte" notifications@github.com wrote:

tinyfiledialogs is not really embedding various python scripts. On unix, it tries various command line calls to show the dialogs. When everything fails (applescript, zenity, kdialog, xdialog), then, and only then, it tries a python tkinter command line call, because tkinter offers file dialogs and is present on many systems. The goal (which I believe is achieved) is to make sure the dialogs are shown whatever the system you are on, and whatever is installed or not on it.

— Reply to this email directly or view it on GitHub https://github.com/jaked122/Symmetricality/issues/2#issuecomment-168999709 .

vareille commented 8 years ago

no, the python imports are in the command line call itself (a C string). the idea is that you don't need to link or include anything. it uses what it find. and if there's nothing available, it uses or opens a console with a dialog in it.

thanks for using it.

epsilon-phase commented 8 years ago

So you're the author? Thanks for making it if so.

It's easily the most magical C source file I've ever used.

vareille commented 8 years ago

thanks. It is just something I started for myself, then I though it might help others too.