[Glade-users] i don't get it

On Wed, 2004-01-28 at 20:02, Alef T Veld wrote:
I'm building my gui with the glade interface designer. Then i just use the .glade file it generates, and 
remove all
the crap i don't need.

Possible i'm removing a bit to much, but i don't understand what's going on here. I get a gazillion errors 
on startup,
yet it seems to work fine. However, i now have a new widget added to my table1, with about 10 pages, and it 
displays the first 2, with wrong labels to.

I will add the errors i get (sorry if it is to much) and my main.c file i use for program initialization. I 
someone can tell me what to do. 

[ Snip errors ]

And this, is what i use for the main() code:

#include "include.h"

GtkWidget *magellan;    /* Main gnome application window */
GladeXML *xml;

int main(int argc,char *argv[])
        /* initialize gnome */

Looking at the errors you are trying to create a GnomeProgram (and I
assume your GladeXML file contains GNOME widgets) so you will need to
initialise GNOME.  Something like:

        GnomeProgram *program;

        program = gnome_program_init (PACKAGE, VERSION,
                                argc, argv,

Have a look at the docs:


        /* initialize glade for gnome */

You don't need this anymore, but having will not cause any harm.

        /* Load widgets from XML file in GladeXML objects */
        if(!(xml=glade_xml_new("../magellan.glade",NULL,NULL))) {
        g_warning(".glade not available");

        /* Autoconnect signals */

        /* Get our widget pointers from the XML object */

         /* We don't need the GladeXML objects anymore, so
        //destroy it to save some memory */


        return 0;

If you need more help then you'll have to supply more information.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]