GNOME Bugzilla – Bug 594678
GtkBuilder garbles restoration of GtkAssistant (maybe)
Last modified: 2009-09-12 09:09:29 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?
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.
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
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.
I wrote a minimal app that loads and displays it just fine.
*** This bug has been marked as a duplicate of bug 593722 ***
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.