Reputation:
I have a Glade GUI description file with a GtkTreeView
in a GtkHBox
in a window; and there's a handler for the row_activated
signal. Now, Glade has automatically set the "events" property (inherited from GtkWidget
) of that treeview to some value (GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
). And there are two strange things with this:
I have yet to test this with a newer GTK version, but the question is already there: exactly what is the purpose for this events
property? And why does Glade automatically and unnecessarily set it to some value? Does this have some side effects I'm not aware of?
Upvotes: 0
Views: 311
Reputation: 26556
It's a bug in glade, it always sets the event property of widgets it create. It has no notion of the default value of a property so it always sets it.
Upvotes: 1
Reputation:
me.yahoo.com/a/kUQ7zeQ: but even if I set the property to an empty string as mentioned, the row_activated
handler is still called when I double-click on a row (or press Enter or Space). So the treeview still gets events...
Upvotes: 0
Reputation: 1
Doesn't this mask indicate the events you're willing to receive? In this case, you'll probably want to receive notification that the user has clicked or double-clicked an item in the GtkTreeView, and you'll want to register callbacks to handle these events.
Upvotes: 0