[Pipmak-Devel] Re: GTK dialogs for Linux
Status: Alpha
Brought to you by:
cwalther
From: Urs H. <ur...@an...> - 2006-01-08 16:10:29
|
Christian Walther wrote: > I just committed a GTK implementation of the platform-specific > functions (error messages, open and save dialogs) for Linux (and other > Unixes). It works here with GTK 2.10 on Fedora Core 4 on x86, and it > should work with GTK >= 2.4 anywhere. > > Urs, or anyone, if you have any comments about my somewhat unorthodox > solutions (GTK just doesn't seem to be made for sporadic use in > non-GTK applications), please let me know. Yeah! This (the source code) looks good. I tried it the same way (some time ago) and was stuck with the dialog not closing. I found out that calling gtk_main would solve that problem, but never return. But you found the solution: From the source: /* for some reason, the dialog isn't closed without the following two lines */ g_timeout_add(0, quitGtkMain, NULL); gtk_main(); The good thing is, that you can easily implement the dialogs unsing other libraries. The problem is, I think, that linking a complete GTK-Library to a game, that only uses error-dialogs and file-save/load-dialogs from GTK and implements all other graphic stuff through SDL is an overkill. But for us, this is not a big problem, because the unhappy ones can compile pipmak without GTK. So, your solution is good. |