GNOME Bugzilla – Bug 527094
Allow the user to include glade files statically in code
Last modified: 2012-07-26 15:23:52 UTC
many times, people dont want to distribute the actual glade file for ui security reasons, anjuta should provide an option to take the step of creating a const char *glade_file = "..."; for the user.
How will the user edit the file if it is inlined in source code? If it is put later in the project after everything's been done, then Anjuta can't really inline it at project creation time.
I would suggest using a separate file for the inlined glade file(s). depending on how you want to save project data, maybe just keep the glade file around and only generate the includable constant glade string at project compilation time. I guess its just a question of checking the setting at compile time and optionally generating a file with the inline code, and changing the new_from_file() generated line for a _new_from_buffer() line, if you dont have support for swapping, changing already generated code, then it would have to be an option you would be stuck with at project creation time (although I think you could easily enough make a wrapper funcion anjuta_load_glade() and implement it differently in a private anjuta generated source file accordingly, again at compilation time depending on the setting). my 2 cents.
After discussing with Juan we agreed that you should use GResources for that purpose as this is a cleaner, easier and more portable solution but build single file applications. I mean, you can still extract GResources but you can also extract strings and if you want real security you will probably have to find another solution anyway.