custom widget
- From: Mark Richardson <markmapo yahoo com>
- To: gtk-devel-list gnome org
- Subject: custom widget
- Date: Tue, 26 Sep 2006 19:08:21 -0700 (PDT)
Sorry about posting in the gtk dev area, but this is borderline app dev/gtk dev.
Anyway, I'm making a custom widget, and when I try to create a signal...
signals[MOVE_CURSOR]=g_signal_new("move_cursor", G_OBJECT_CLASS_TYPE(gobject_class), G_SIGNAL_RUN_LAS | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkLabel2Class, move_cursor), NULL, NULL, _gtk_marshal_VOID__ENUM_INT_BOOLEAN, G_TYPE_NONE, 3, GTK_TYPE_MOVEMENT_STEP, G_TYPE_INT, G_TYPE_BOOLEAN)
I get the message..
(CustomWidget:3960): Glib-GObject-WARNING **: cannot register existing type 'GtkMovementStep'
so digging into the source, I find out that if I make a call to gtk_movement_step_get_type(), I will get this warning every time.
I found the code in gtktypebuiltins.c for gtk_movement_step_get_type(), and it seems that the etype is always 0. So it keeps trying
g_enum_register_static (g_intern_static_string("GtkMovementStep"), values)
Which generates the message.
I'm having lots of problems porting my old custom widgets (from gtk 2.8 - maybe 2.4 - don't really remember) to gtk 2.10 because of all of the private functions (performing an nm on the library shows that the function is local and not global). I also can't find any good custom widget examples that are friendly with 2.10 (except for the gtkdial in the examples). If anyone can help me with this, I would gladly post my 4 custom widgets up for examples for others (once I get them working). I tried taking the gtklabel widget and renaming it and all the functions to gtklabel2 - so as to simulate a correctly written widget for 2.10. I get so many errors with this, so I must not be doing something right.
Thanks,
Mark
PS - I try not to
bother ya'all, but I've been working on this for over a month now.
Do you Yahoo!?
Everyone is raving about the
all-new Yahoo! Mail.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]