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 594678 - GtkBuilder garbles restoration of GtkAssistant (maybe)
GtkBuilder garbles restoration of GtkAssistant (maybe)
Status: VERIFIED DUPLICATE of bug 593722
Product: gtk+
Classification: Platform
Component: Class: GtkBuilder
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: GtkBuilder maintainers
GtkBuilder maintainers
Depends on:
Blocks:
 
 
Reported: 2009-09-09 18:00 UTC by Joshua N Pritikin
Modified: 2009-09-12 09:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This is GtkBuilder XML (4.96 KB, text/plain)
2009-09-09 18:00 UTC, Joshua N Pritikin
Details

Description Joshua N Pritikin 2009-09-09 18:00:26 UTC
Created attachment 142814 [details]
This is GtkBuilder XML

See the attached XML. This works fine with libgtk 2.16.1-0ubuntu2 and glade
3.6.7. It shows 3 pages as expected. However, with libgtk 2.17.10-0ubuntu1,
glade 3.6.7-1ubuntu1 claims there are 4 pages and shows a blank page for the
first page. It looks like an off-by-one programming error to me. I am testing
Ubuntu Karmic alpha 5.

Whose bug is this? Can you reproduce it? Do I need to file another bug report
with Ubuntu?
Comment 1 Joshua N Pritikin 2009-09-10 04:10:58 UTC
FYI, I don't have the resources to bisect the cause of this bug. I get about 16k/s download speed here in India. Even if I slurped the GIT repo, it would probably take my slow Dual CPU T2330 1.60GHz laptop about an hour to compile and test a checkout. Surely there are others who can do this with more temporal efficiently.
Comment 2 Matthias Clasen 2009-09-12 03:05:16 UTC
Hmm, not sure what is going on here. I see the same problem with 2.16.4. 
But your xml file works fine in GtkBuilder itself, so I'd tend to say this is a glade problem
Comment 3 Joshua N Pritikin 2009-09-12 03:21:17 UTC
I originally found this problem in a pygtk application. When I ran my application with gtk 2.16, no problem. When I ran the same code with gtk 2.17.10, GtkAssistant misbehaved. Note that glade is not involved here at all except in the role of creating the GtkBuilder XML.

How did you establish that "your xml file works fine in GtkBuilder itself"? I came to the opposite conclusion, that glade is fine and GtkBuilder is broken.
Comment 4 Matthias Clasen 2009-09-12 04:16:21 UTC
I wrote a minimal app that loads and displays it just fine.
Comment 5 Tristan Van Berkom 2009-09-12 04:56:53 UTC

*** This bug has been marked as a duplicate of bug 593722 ***
Comment 6 Joshua N Pritikin 2009-09-12 09:09:29 UTC
OK, I figured it out. Here is a trivial script to reproduce the problem:

#!/usr/bin/env python

import pygtk
import gtk

builder = gtk.Builder()
builder.add_from_file('./lib/timeclock/ui/add_wizard.ui')
win = builder.get_object('assistant1')
print win.get_current_page()
#win.set_current_page(0)     # This creates a new page on 2.17 but not on 2.16
win.show()
print win.get_current_page()
gtk.main()

I'm not sure which behavior is correct, but the work-around is trivial (just set_current_page after show()).

Feel free to add back the RESOLVED status after contemplating this discovery.