GNOME Bugzilla – Bug 697765
wizard: Make continue button sensitive *before* going to SETUP
Last modified: 2016-03-31 13:22:07 UTC
See patch
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.
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.
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.
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.
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.
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.
Review of attachment 241305 [details] [review]: Still unsure what sets the sensitivity to FALSE in setup()...
Review of attachment 241305 [details] [review]: How so? I pointed you to the code in comment#5
Attachment 241305 [details] pushed as 34a10dd - wizard: Don't make 'continue' sensitive after PREPARATION