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 697765 - wizard: Make continue button sensitive *before* going to SETUP
wizard: Make continue button sensitive *before* going to SETUP
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: wizard
unspecified
Other All
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-04-11 01:36 UTC by Zeeshan Ali
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wizard: Make continue button sensitive *before* going to SETUP (979 bytes, patch)
2013-04-11 01:36 UTC, Zeeshan Ali
reviewed Details | Review
wizard: Don't make 'continue' sensitive after PREPARATION (920 bytes, patch)
2013-04-11 22:00 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2013-04-11 01:36:53 UTC
See patch
Comment 1 Zeeshan Ali 2013-04-11 01:36:56 UTC
Created attachment 241218 [details] [review]
wizard: Make continue button sensitive *before* going to SETUP

This fixes a regression from commit 5236c822 that made the continue
button be always sensitive on SETUP page even when there was user input
required.
Comment 2 Christophe Fergeau 2013-04-11 13:38:42 UTC
Review of attachment 241218 [details] [review]:

::: src/wizard.vala
@@ +306,2 @@
         next_button.sensitive = true;
+        page = WizardPage.SETUP;

Do we need to mark the button as sensitive at all?
I'd add a continue_button.sensitive = false; to setup() for good measure if that's the state we want at the beginning of this method.
Comment 3 Zeeshan Ali 2013-04-11 13:54:18 UTC
Review of attachment 241218 [details] [review]:

::: src/wizard.vala
@@ +306,2 @@
         next_button.sensitive = true;
+        page = WizardPage.SETUP;

* For the sake of completion/future-safety?
* we do continue_button.sensitive = false as part of 'page= SETUP' here. Without this change, we end-up changing it back to true again.
Comment 4 Christophe Fergeau 2013-04-11 14:39:30 UTC
Review of attachment 241218 [details] [review]:

::: src/wizard.vala
@@ +306,2 @@
         next_button.sensitive = true;
+        page = WizardPage.SETUP;

Hmm couldn't find anything setting it to false in wizard.vala :(
I think that if we group most of the button sensitivity code in the page setter, this makes things more self-contained and less error-prone, so I'd rather we don't keep an unused "next_button.sensitive = true;" here, especially as this already caused a bug. If there's a good reason to have it, fine.
Comment 5 Zeeshan Ali 2013-04-11 21:40:30 UTC
Review of attachment 241218 [details] [review]:

::: src/wizard.vala
@@ +306,2 @@
         next_button.sensitive = true;
+        page = WizardPage.SETUP;

Wizard.setup():

        vm_creator.install_media.bind_property ("ready-to-create",
                                                continue_button, "sensitive",
                                                BindingFlags.SYNC_CREATE);

The issue was not caused by this line itself but me screwing-up the order in my big changes. We can't put all the sensitivity setting code in prop setter cause some steps are async.
Comment 6 Zeeshan Ali 2013-04-11 22:00:28 UTC
Created attachment 241305 [details] [review]
wizard: Don't make 'continue' sensitive after PREPARATION

This fixes a regression from commit 5236c822 that made the continue
button be always sensitive on SETUP page even when there was user input
required.
Comment 7 Christophe Fergeau 2013-04-12 07:56:46 UTC
Review of attachment 241305 [details] [review]:

Still unsure what sets the sensitivity to FALSE in setup()...
Comment 8 Zeeshan Ali 2013-04-12 13:18:24 UTC
Review of attachment 241305 [details] [review]:

How so? I pointed you to the code in comment#5
Comment 9 Zeeshan Ali 2013-04-12 13:20:27 UTC
Attachment 241305 [details] pushed as 34a10dd - wizard: Don't make 'continue' sensitive after PREPARATION