GNOME Bugzilla – Bug 156412
Notebook: pages get renamed when adding children, children selection broken
Last modified: 2004-12-22 21:47:04 UTC
- Create a notebook - Add a child on page one - Add a child on page two Notice that page two is now called page one, - Add a child on page three Notice that page three is now called page two and that page two is now once again page two. - Select any page Notice that the only selectable child is the last one added (In this example, the child on page three is selectable in pages one, two and three) Note that placeholders are still available. Note that widgets are still available for selection through the widget tree.
Im current doing some hacking on glade3's GtkNotebook support, I'll have a look into it.
Ok I'm preparing a patch that fixes most of these problems. Still stuggling with the bug how if you click on any child it will not be selected, only the last will be selected. The selection is drawn on the correct widget being shown etc but the properties dialog shows the wrong widget. Very strange. Will continue to look into it further. - Shane
The problem where the wrong widget properties are edited is caused by a bug in glade_widget_retrieve_from_position() or one of its child functions. When the user clicks the GtkNotebook child widget, glade_widget_button_press() is called. It then tries to use glade_widget_retrieve_from_position() to get the GladeWidget that was clicked but it returns the wrong one. To demonstrate, replacing: glade_widget = glade_widget_retrieve_from_position (widget, (int) (x + 0.5), (int) (y + 0.5)); widget = glade_widget_get_widget (glade_widget); with: glade_widget = glade_widget_get_from_gtk_widget (widget); yeilds the correct result. Therefore there is either a bug in glade_widget_retrieve_from_position(), glade_widget_find_deepest_child_at_position(), or glade_widget_find_inside_container() OR these are not needed at all. I'm not sure which, if anyone has any ideas please let me know!! -Shane
Created attachment 33308 [details] [review] PATCH to fix
The patch I have attached should fix all these problems. Can someone please review and possibly commit?
Committed along with patch in 157289