Re: good idea?



I use a list of `screen_creation' function along with
strings which represent the glade/gtkrc so it looks kinda like
this (pseudo)

screens = {
 { screen1_create, "screen1.glade", "screen1.gtkrc" }
...
}

for ( ... screens ...) {
        xml = that_glade_xml_new_function(screens[i].glade);
        display_func[i] = screens[i].create(xml);
        gtk_rc_parse(screens[i].gtkrc);
}


But I guess it all depends on what you want to do.
Its a little overkill if you're writeing a desktop
calculator or some other toy ;)

        -Tristan

Jacob Perkins wrote:

Can anyone tell if this is a good idea, and if not give some
recommendations:
I'm doing most of my interface with glade+libglade.  I also need to be
passing around a context.  So, I've created a FooWidget, which
'inherits' from a GtkObject, and contains the GladeXML pointer, and a
context pointer.  My windows mostly behave the same, so I also created a
FooWindow, which inherits from FooWidget, has a close signal, and sets
callbacks such as display toolbar/statusbar.  This setup seems ok to me,
but I'm fairly new to gtk app devel, so any tips would be appreciated.
Thanks

  ------------------------------------------------------------------------
                       Name: signature.asc
   signature.asc       Type: application/pgp-signature
                Description: This is a digitally signed message part



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