开发者

Glade, GtkBuiler or Gtk unexpectedly swapped a signal handler

void
add_button_clicked(GtkButton * widget, GtkTreeView * treeview){
    printf("%s\n",G_OBJECT_TYPE_NAME(widget));
}   // Prints GtkTreeView

While the standard GtkButton:clicked signal is supposed to work like this (the widget开发者_C百科 itself followed by the user data) for some reason, the swapped signal handler has been called here and the two parameters are mixed up.

I could just shuffle the code around a bit to get past this but I would like to get to the bottom of why this is happening so I can fix/prevent it.

The glade swap checkbox is unchecked, and I didn't manually connect the signal anywhere, so I don't know why this is happening.

Edit: Ok, now it's happening to ALL my callbacks which is a big huge tremendous problem! Please help!

Edit: This "Feature" is apparently here so glade users can add a glade object to the callback and directly reference a gtk function so that they can for example hide a widget without having to write a single line of code. I'll roll with it.


Glade does this so that when you pass another object you can call a standard gtk function directly on it (Such as closing a window) without needing to write any code at all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜