After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 156412 - Notebook: pages get renamed when adding children, children selection broken
Notebook: pages get renamed when adding children, children selection broken
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks: 157473
 
 
Reported: 2004-10-25 17:28 UTC by Tristan Van Berkom
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
PATCH to fix (6.23 KB, patch)
2004-11-01 12:59 UTC, Shane Butler
none Details | Review

Description Tristan Van Berkom 2004-10-25 17:28:50 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.
Comment 1 Shane Butler 2004-10-26 00:53:48 UTC
Im current doing some hacking on glade3's GtkNotebook support, I'll have a look
into it.
Comment 2 Shane Butler 2004-10-29 01:37:38 UTC
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
Comment 3 Shane Butler 2004-10-31 03:03:14 UTC
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
Comment 4 Shane Butler 2004-11-01 12:59:13 UTC
Created attachment 33308 [details] [review]
PATCH to fix
Comment 5 Shane Butler 2004-11-01 13:01:23 UTC
The patch I have attached should fix all these problems. Can someone please
review and possibly commit?
Comment 6 David Hoover 2004-11-10 05:14:03 UTC
Committed along with patch in 157289