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 756385 - No more content in Anjuta project wizard
No more content in Anjuta project wizard
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.18.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
: 756182 757798 (view as bug list)
Depends on:
Blocks: 756182
 
 
Reported: 2015-10-11 09:40 UTC by Sébastien Granjoux
Modified: 2015-11-23 18:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Modify test failing (1.65 KB, patch)
2015-10-26 21:00 UTC, Sébastien Granjoux
none Details | Review

Description Sébastien Granjoux 2015-10-11 09:40:28 UTC
The following change (6cc65260f4ba54ea0ca9f93068050435bd6b9f1a: GtkAssistant: Redo page margins) breaks Anjuta project wizard.

All content of the project wizard page is now missing.
Comment 1 Sébastien Granjoux 2015-10-11 09:41:33 UTC
See bug #756182
Comment 2 Matthias Clasen 2015-10-13 00:02:27 UTC
try with 3.18.2, please
Comment 3 Sébastien Granjoux 2015-10-13 19:25:26 UTC
(In reply to Matthias Clasen from comment #2)
> try with 3.18.2, please

It doesn't fix the issue but it's probably something similar. It looks like I'm not able to add some pages.
Comment 4 Matthias Clasen 2015-10-13 19:44:11 UTC
Where is the code that sets up the wizard ?
Comment 5 Sébastien Granjoux 2015-10-13 19:58:31 UTC
(In reply to Matthias Clasen from comment #4)
> Where is the code that sets up the wizard ?

It is in plugins/project-wizard/druid.c.

The "property" page are missing, it's a bit complex because the page are added dynamically. The next page is a dummy page. When we reach it, we check if there is a new page to display, if yes we add it afterward, switch to it an move the dummy page afterward. If it's the last page, we just add a summary page.
Comment 6 Matthias Clasen 2015-10-13 20:12:01 UTC
I think what anjuta does there falls into the unsupported category.

As far as I can make out, it pokes into the innards of one assistant to pick out pages and add them to another assistant ?!
Comment 7 Sébastien Granjoux 2015-10-13 21:05:45 UTC
(In reply to Matthias Clasen from comment #6)
> I think what anjuta does there falls into the unsupported category.

Then, is there a supported way to do that?


> As far as I can make out, it pokes into the innards of one assistant to pick
> out pages and add them to another assistant ?!

The assistant should have one project selection page at the beginning, one summary page at the end and in between a unknown number of property pages. So I have created a assistant with all needed pages and a single property page. When I need an additional page, as I cannot create just a page, I create a whole new assitant and get only the property page.

In my mind, it was a way to create a new page that is defined in a GtkBuilder file. Do you have another way to do that?
Comment 8 Matthias Clasen 2015-10-13 21:29:34 UTC
There's no need at all to pull the content for the new pages out of an existing wizard - just put the scrolledwindow or whatever is the topmost content widget into the .ui file as a freestanding object.
Comment 9 Matthias Clasen 2015-10-16 00:04:49 UTC
Please move the bug back if that is not working.
Comment 10 Sébastien Granjoux 2015-10-16 19:02:36 UTC
(In reply to Matthias Clasen from comment #9)
> Please move the bug back if that is not working.

I will try but I have not much time at the moment.
Comment 11 Sébastien Granjoux 2015-10-23 18:25:45 UTC
I have tried to move those pages as freestanding object and indeed it fixes the bug.

The drawback is that I cannot get the assistant page type anymore from the .ui file but it's not a big issue.
Comment 12 Sébastien Granjoux 2015-10-24 15:00:13 UTC
Another problem is that I move pages in the GtkAssistant, removing them and adding them later which trigger the same issue.
Comment 13 Sébastien Granjoux 2015-10-25 11:00:43 UTC
To summarize, I have fixed a part of the bug by moving the corresponding page content as freestanding object in the .ui file. So, I don't create anymore a dummy GtkAssistant object to steal some of its pages and add them to another GtkAssistant.


But, I have two pages (progress and error) that I can use at different steps of the GtkAssistant. In the code, I keep an additional reference to these pages. And to move such page, I remove it from the GtkAssistant and insert it at the new position.


This is not working anymore because when the new GtkBox object is removed from the GtkAssistant, all its children are destroyed. Previously, as I keep a reference on the page, the widget was removed without being destroyed. Now the new GtkBox has only a single reference so it is destroyed with all its children.


I think this is partially an issue in Gtk because now gtk_container_remove and gtk_assistant_remove_page not only remove but destroy the widget too. This could be avoided by adding a reference on the new GtkBox object but I don't see an easy way to do that.
Comment 14 Matthias Clasen 2015-10-26 13:25:35 UTC
I've added a test in testassistant which removes and re-adds pages - it seems to work fine. Maybe you can modify it to show the breakage you are seeing ?

https://git.gnome.org/browse/gtk+/commit/?id=8db30aa9a08d3ea682de404926e8b89cce4e08ac
Comment 15 Sébastien Granjoux 2015-10-26 21:00:40 UTC
Created attachment 314162 [details] [review]
Modify test failing

In Anjuta, I see that the problem comes from the fact that the assistant page is a container widget having its own children.

I have modified your test to add a GtkBox around the label on page 2. If I run the assistant without flipping the page everything is fine. If I flip the pages, the label of the page 2 doesn't appear any more.
Comment 16 Sébastien Granjoux 2015-10-30 21:09:17 UTC
Could you commit you patch https://git.gnome.org/browse/gtk+/commit/?id=32de7edf1dec5528b8d02cb765b2c76471f321c6 in the 3.18 branch too?

It solves all issues with the project wizard in Anjuta.
Comment 17 Sébastien Granjoux 2015-11-06 19:52:49 UTC
*** Bug 756182 has been marked as a duplicate of this bug. ***
Comment 18 Muflone 2015-11-08 01:22:17 UTC
Still an issue in Anjuta 3.18.2
Comment 19 Sébastien Granjoux 2015-11-08 08:14:34 UTC
(In reply to Muflone from comment #18)
> Still an issue in Anjuta 3.18.2

This is a bug in Gtk not in Anjuta so you need to Gtk for gtk-3-18 or master branch. It should be present in the next release of Gtk in the coming days.
Comment 20 Sébastien Granjoux 2015-11-09 19:25:38 UTC
*** Bug 757798 has been marked as a duplicate of this bug. ***
Comment 21 Timothy C 2015-11-10 01:00:44 UTC
For now, I recommend using Gnome-Builder until the bug in Gnome is fixed.
Comment 22 Timothy C 2015-11-10 01:12:03 UTC
Why hasn't the project website been updated since version 3.13?  The url is: http://anjuta.org/
Comment 23 Sébastien Granjoux 2015-11-22 07:55:13 UTC
This is fixed in Gtk 3.18.3.
Comment 24 Timothy C 2015-11-23 18:55:48 UTC
Great!  I'll update my Fedora VM.  I don't understand how this type of bug can go unnoticed during QA.