[Glade-users] glade 3.4.3 + C code generation

Tristan Van Berkom tristan.van.berkom at gmail.com
Wed May 21 11:54:03 EDT 2008


Please remember to keep discussions on the list and remember to keep
the list on CC, thankyou.

If you are using a static distribution of your app, just use
glade_xml_new_from_buffer() and
include the glade file statically in a string constant.

Cheers,
                        -Tristan

On Wed, May 21, 2008 at 12:49 PM, Luis Ariel Lecca
<ariel_xxii at yahoo.com.ar> wrote:
>
> Thanks Tristan, very descriptive information...
> In case of static aplication (with no external references and with not
> external XML files) Do you know another way to solve this ?
>
> I use Anjuta too, (and old version) but at this time I compile my
> aplicaction for linux and win32...so with the last one I use MSVC...(with
> glade C code gen...) to probe easilly the application (here I have external
> references)
> then I change one definition and I compile my application for linux on it as
> static.
>
> Thanks again,
> Luis
> Tristan Van Berkom <tristan.van.berkom at gmail.com> escribió:
>
> This is the code you typically use with glade:
>
> ================================================================
> /* In main, after gtk_init () and generally before gtk_main () */
>
> /* Create widgets */
> GladeXml *xml = glade_xml_new (... path of the glade file... );
>
> /* Get the pointers to the widgets you need in the UI */
> for (i = 0; i < n_needed_widgets; i++) {
> if (!(needed_widgets[i] = glade_xml_get_widget (xml,
> needed_widget_names[i])))
> print_an_error ();
> }
>
> /* You might be using signal connections from the glade file: */
> glade_xml_signal_autoconnect (or maybe use another varient for this
> from glade-xml.h in libglade);
>
> /* Dont leak the xml object */
> g_object_unref (xml);
>
> /******************
> at this point, youll want to gtk_window_present( your main window );
> and call gtk_main().
> ******************/
> ================================================================
>
> The bottom line is that we dont generate code - anjuta might in the
> future generate the
> afore mentioned code, if it doesnt already.
>
> Cheers,
> -Tristan
>
> On Wed, May 21, 2008 at 12:17 PM, Luis Ariel Lecca
> wrote:
>>
>> Hello all,
>> Im a gtk/glade user and today I got the new glade 3.4.3...
>> My question is:
>> Is it any way to add C code generation using this glade release (with the
>> new improvements) ?
>>
>> I found some problems on C code generation with old glade release (its
>> about
>> signals), but is easy to solve it for me at this time but I dont want mix
>> this new glade rel. with and older C code generation to get more
>> inconsistences.
>>
>> Im newie in this mail list and I didnt found this topic.
>>
>> Thanks in advance
>> Luis
>>
>>
>> ________________________________
>> Yahoo! Encuentros
>> Ahora encontrar pareja es mucho más fácil, probá el nuevo Yahoo!
>> Encuentros.
>> Visitá http://yahoo.cupidovirtual.com/servlet/NewRegistration
>> _______________________________________________
>> Glade-users maillist - Glade-users at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/glade-users
>>
>>
>
> ________________________________
> Tarjeta de crédito Yahoo! de Banco Supervielle. Solicitá tu nueva Tarjeta de
> crédito. De tu PC directo a tu casa.
> Visitá www.tuprimeratarjeta.com.ar


More information about the Glade-users mailing list