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 529595 - GtkAssistant (wizard) children are missing COMPLETE property
GtkAssistant (wizard) children are missing COMPLETE property
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: general
3.4.x
Other All
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-23 18:59 UTC by nowak2000
Modified: 2010-08-30 09:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description nowak2000 2008-04-23 18:59:05 UTC
Please describe the problem:
To enable Forward button on GtkAssistant widget the current tab has to be marked as "complete". Glade doesn't allow setting the property and removes it if it was placed in the XML file manually.

Enabling "complete" property should put in the output file this:
<property name="complete">True</property>

Runtime equivalent is set_page_complete(tab, True).

Steps to reproduce:
1. Create an empty project.
2. Use a default GtkAssistant. 
3. Run the UI. Forward button is inactive.

Actual results:
Now you can't enable the forward button from glade.

Expected results:
It should be configurable.

Does this happen every time?
Yes.

Other information:
Comment 1 nowak2000 2008-04-27 18:46:37 UTC
To enable the COMPLETE option you need to modify "gtk+.xml" or similar file, and change a boolean flag there.
Comment 2 Pablo Castellano (IRC: pablog) 2010-08-29 17:10:30 UTC
Today I have had the same issue.

I think that nowak2000 means the line
<property id="complete" disabled="True"/>
in /usr/share/glade3/catalogs/gtk+.xml

Why is it disabled by default?
Comment 3 Tristan Van Berkom 2010-08-29 18:58:41 UTC
The "complete" property is disabled because afaics it should not be
configurable at application build time... the "complete" property is 
supposed to be set from your application at runtime (a page is never
"complete" until the user interacts with the assistant page's content
and at least provides an answer for the current page's question).

If you save your Glade file and Glade allows you to set
the "complete" property to TRUE... then the user of the finished
application will be allowed to navigate through pages without
filling in the content of the current assistant page (kindof 
defeats the purpose of having an assistant widget in the first place).

... From a quick boot up of Glade I can see that at least inside
Glade's runtime (in the Glade workspace) you can navigate through
pages (the pages have complete=TRUE as a convenience exception to
let you navigate the widget inside the workspace.. just so you
can add options to all the pages from Glade).
Comment 4 Pablo Castellano (IRC: pablog) 2010-08-30 01:59:50 UTC
Hi Tristan. I disagree with you but let's discuss it :)

(In reply to comment #3)
> The "complete" property is disabled because afaics it should not be
> configurable at application build time... the "complete" property is 
> supposed to be set from your application at runtime (a page is never
> "complete" until the user interacts with the assistant page's content
> and at least provides an answer for the current page's question).

In my case, I don't need any action to be performed in the "Introduction page". I just need to print a message to the user that explains what's the wizard about. So in this case, the page can be "complete" even if the user hasn't interacted. May be more cases for sure.
 
> If you save your Glade file and Glade allows you to set
> the "complete" property to TRUE... then the user of the finished
> application will be allowed to navigate through pages without
> filling in the content of the current assistant page (kindof 
> defeats the purpose of having an assistant widget in the first place).

That's not true if I have understood you correctly. I have tested it and it's possible to define "complete" just one page (you cannot define the pages of a gtkassistant "complete" globally as I could test). I did it adding
<property name="complete">True</property> inside <packing> of the first <child> of gtkassistant.
So.. yes, navigating through the pages without interacting is senseless and it's not the behaviour that I'm looking for. I just want one page to be complete by default and the glade file allows it.
Well... to clarify things I'm talking about the GtkBuilder file format in every moment. Does it change anything?

What do you think?
My point of view is that glade3 shouldn't forbid doing something that can be done editing the final file by hand? And that can be an useful behaviour.
Comment 5 Tristan Van Berkom 2010-08-30 05:47:47 UTC
(In reply to comment #4)
> Hi Tristan. I disagree with you but let's discuss it :)
> 
> (In reply to comment #3)
> > The "complete" property is disabled because afaics it should not be
> > configurable at application build time... the "complete" property is 
> > supposed to be set from your application at runtime (a page is never
> > "complete" until the user interacts with the assistant page's content
> > and at least provides an answer for the current page's question).
> 
> In my case, I don't need any action to be performed in the "Introduction page".
> I just need to print a message to the user that explains what's the wizard
> about. So in this case, the page can be "complete" even if the user hasn't
> interacted. May be more cases for sure.
> 
> > If you save your Glade file and Glade allows you to set
> > the "complete" property to TRUE... then the user of the finished
> > application will be allowed to navigate through pages without
> > filling in the content of the current assistant page (kindof 
> > defeats the purpose of having an assistant widget in the first place).
> 
> That's not true if I have understood you correctly. I have tested it and it's
> possible to define "complete" just one page (you cannot define the pages of a
> gtkassistant "complete" globally as I could test). I did it adding
> <property name="complete">True</property> inside <packing> of the first <child>
> of gtkassistant.
> So.. yes, navigating through the pages without interacting is senseless and
> it's not the behaviour that I'm looking for. I just want one page to be
> complete by default and the glade file allows it.
> Well... to clarify things I'm talking about the GtkBuilder file format in every
> moment. Does it change anything?

No.. but lets only talk about GtkBuilder... I dont even know if
GtkAssistant is included in deprecated libglade anyway.

> 
> What do you think?
> My point of view is that glade3 shouldn't forbid doing something that can be
> done editing the final file by hand? And that can be an useful behaviour.

Right, maybe I answered too fast (my impression was that the reporter 
needed to flip through the pages in the Glade runtime or had misunderstood
the usage of GtkAssistant).

The use case of having an introductory (intentionally empty) page is
however a good argument to expose this property.

I exposed the property in master with the following overridden name/tooltip:
  Name:    "Initially Complete">
  Tooltip: "Whether this page will initially be marked as complete 
            regardless of user input."
Comment 6 Pablo Castellano (IRC: pablog) 2010-08-30 09:03:30 UTC
Great job! Thanks