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 593722 - Glade adds a new page to each GtkAssistant after each save/open
Glade adds a new page to each GtkAssistant after each save/open
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: general
3.6.x
Other All
: Normal major
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
: 594678 (view as bug list)
Depends on:
Blocks: 641141
 
 
Reported: 2009-08-31 21:22 UTC by Steven T. Snyder
Modified: 2013-05-20 12:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix an unnecessary call of glade_gtk_assistant_set_property (1.39 KB, patch)
2010-05-24 03:48 UTC, Lincoln de Sousa
none Details | Review

Description Steven T. Snyder 2009-08-31 21:22:06 UTC
If a GtkAssistant widget is added to a new file, and the file is saved, the next time it is opened the GtkAssistant widget will have one more page added at the beginning than it had before. A page is only added at the first save. The file has to be closed and reopened to make the bug happened again.

Steps to recreate this bug:

1) Open Glade 3.6.7.

2) Use the default options (GtkBuilder, object names unique within the project, image resources loaded from the project directory, toolkit version 2.16 required). Click close.

3) Click the assistant button (the last button under "Toplevels").

4) Note that the assistant has "Number of Pages" set to 3, and that the assistant does actually have 3 pages: Introduction, Content, Confirmation.

5) Go to File>Save. Type "assistant" as the name and press Save.

6) Click File>Close.

7) Click File>Open. Select assistant.glade.

8) Note that the assistant now has a blank page at the beginning, in addition to the pages it had before, and that "Number of Pages" has increased by 1.

9) Click File>Save. Repeat steps 6-8. The GtkAssistant continues to grow in size.

Since GtkAssistant pages also cannot be deleted (see Bug 500463), this makes it pretty much impossible to use the GtkAssistant widget in Glade.
Comment 1 Robert Ancell 2009-09-02 05:36:54 UTC
This is being caused by GtkAssistant requiring >0 pages (see n-pages setting in plugins/gtk+/gtk+.xml.in) - A placeholder page is being created when the GtkAssistant is loaded and then the pages in the .glade are appended.
Comment 2 Tristan Van Berkom 2009-09-09 20:19:12 UTC
Seems bug 594678 describes a change in GTK+ which introduced this.
Comment 3 Tristan Van Berkom 2009-09-12 04:56:53 UTC
*** Bug 594678 has been marked as a duplicate of this bug. ***
Comment 4 Lincoln de Sousa 2010-05-24 03:37:53 UTC
After some time reading glade code, I guess the problem is a bit different.

It is because glade_gtk_assistant_set_property() is called before glade_gtk_assistant_parse_finished(). When _set_property() is called, the number of pages is always zero, so it gets incremented to 1.

I don't know glade source code in depth enough to write a descent patch but I'll attach an ugly piece of code that corrects this problem.
Comment 5 Lincoln de Sousa 2010-05-24 03:48:40 UTC
Created attachment 161823 [details] [review]
Fix an unnecessary call of glade_gtk_assistant_set_property
Comment 6 Pablo Castellano (IRC: pablog) 2010-08-29 17:25:16 UTC
Any progress on it? I cannot test the patch now but it looks good.
Comment 7 Geert Janssens 2011-05-21 12:30:23 UTC
This is not only a problem on Windows. I experience this on Fedora (14) as well.

By the way, to my inexperienced eyes, this patch looks ok as well.
Comment 8 Tristan Van Berkom 2013-05-20 12:33:51 UTC
This has been fixed a while ago, Juan Pablo improved GtkAssistant support a bit.