Re: Custom widget headache



On Wed, 31 May 2006 16:33:16 +0200, David NeÄas (Yeti) <yeti physics muni cz> wrote:

OK, According to the GtkDial example at

  http://www.gtk.org/tutorial/

I changed over to the g_type system. Actually there wasn't much to change except in the
cw_area_get_type() function.

Alas, I still get exactly the same output. I don't get it. Am I right in assuming that at the given point in my program the error can only be in the functions:

        cw_area_new()
        cw_area_get_type()
        cw_area_class_init()
        cw_area_init()

and in the struct definitions (BTW I don't like to use leading underscores for the struct tags because they invade implementation namespace). The only important thing appears to me that the first member of the struct is the appropriate parent; in this case GtkWidget. Or is there something else to watch out for?

        struct CwArea_t {
                GtkWidget widget;
        ...
        };

        struct CwAreaClass_t {
                GtkWidgetClass parent_class;
        };

?

The way I understand the type system, this is all the application has seen by the end of the call to g_type_register_static().

Thanks,
--Daniel



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