I am looking for tool that can convert .Glade (or xml) file to C source.
I have tried g2c (Glade To C Translator) but i am looking for windows binary.
Any one does know any good tool for window.
Thanks,
PP.
You don't need a tool. Just write a script in your favorite scripting language to format your glade file as a C string literal:
For example, let's call it glade_file.c
:
const gchar *my_glade_file =
"<interface>"
"<object class=\"GtkDialog\">"
"<et-cetera />"
"</object>"
"</interface>";
Compile glade_file.c
into your program, then do this when you build your interface:
extern const gchar *my_glade_file;
result = gtk_builder_add_from_string(builder, my_glade_file, -1, &error);
glade2 works for me. though if you are using new glade3 features it won't help you..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With