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 664292 - A few fixes for wizard
A few fixes for wizard
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: installer
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-11-17 18:41 UTC by Zeeshan Ali
Modified: 2016-03-31 13:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Reset wizard's source widget after user hits 'Create' (1.42 KB, patch)
2011-11-17 18:41 UTC, Zeeshan Ali
needs-work Details | Review
Only entertain URI commandline argument once (1.50 KB, patch)
2011-11-17 18:41 UTC, Zeeshan Ali
none Details | Review
Only entertain URI commandline argument once (1.24 KB, patch)
2011-11-18 01:59 UTC, Zeeshan Ali
committed Details | Review
Reset wizard's source widget after user hits 'Create' (808 bytes, patch)
2011-11-18 02:00 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2011-11-17 18:41:36 UTC
A few fixes for wizard.
Comment 1 Zeeshan Ali 2011-11-17 18:41:38 UTC
Created attachment 201610 [details] [review]
Reset wizard's source widget after user hits 'Create'
Comment 2 Zeeshan Ali 2011-11-17 18:41:41 UTC
Created attachment 201611 [details] [review]
Only entertain URI commandline argument once
Comment 3 Marc-Andre Lureau 2011-11-17 23:38:54 UTC
Review of attachment 201611 [details] [review]:

Can app.uri be cleared instead of adding first_launch bool?
Comment 4 Marc-Andre Lureau 2011-11-17 23:38:55 UTC
Review of attachment 201611 [details] [review]:

Can app.uri be cleared instead of adding first_launch bool?
Comment 5 Marc-Andre Lureau 2011-11-17 23:41:52 UTC
Review of attachment 201610 [details] [review]:

::: src/wizard-source.vala
@@ +34,3 @@
         get { return url_entry.get_text (); }
+        set {
+            if (value != null)

it's not supposed to be a nullable, I would prefer the empty string which avoid double checks of null & "". You can just assume it's empty or not.

::: src/wizard.vala
@@ +131,3 @@
             install_media = null;
             resources = null;
+            wizard_source.uri = null;

just = ""  is fine then

@@ +132,3 @@
             resources = null;
+            wizard_source.uri = null;
+            wizard_source.page = SourcePage.MAIN;

this should be handled already automatically when you go back to the wizard, we don't need to do it twice. I am affraid it might glitch for a few ms (which you may not notice on fast machine/cases).
Comment 6 Zeeshan Ali 2011-11-18 01:56:46 UTC
(In reply to comment #5)
> @@ +132,3 @@
>              resources = null;
> +            wizard_source.uri = null;
> +            wizard_source.page = SourcePage.MAIN;
> 
> this should be handled already automatically when you go back to the wizard, 

Well, apparently its not. :( The wizard_source stays in URL page once you use that.
Comment 7 Zeeshan Ali 2011-11-18 01:59:39 UTC
Created attachment 201633 [details] [review]
Only entertain URI commandline argument once
Comment 8 Zeeshan Ali 2011-11-18 02:00:30 UTC
Created attachment 201634 [details] [review]
Reset wizard's source widget after user hits 'Create'
Comment 9 Marc-Andre Lureau 2011-11-18 13:52:18 UTC
Review of attachment 201633 [details] [review]:

::: src/wizard.vala
@@ +436,3 @@
                 wizard_source.page = SourcePage.URL;
                 wizard_source.uri = app.uri;
+                app.uri = null;

can you explain why it should be nullable? I told you why it was easier to have an empty string.
Comment 10 Marc-Andre Lureau 2011-11-18 13:53:51 UTC
Review of attachment 201633 [details] [review]:

::: src/wizard.vala
@@ +436,3 @@
                 wizard_source.page = SourcePage.URL;
                 wizard_source.uri = app.uri;
+                app.uri = null;

oh, sorry it's not the same property. ok, that makes sense to have it nullable here.
Comment 11 Marc-Andre Lureau 2011-11-18 13:54:46 UTC
Review of attachment 201634 [details] [review]:

ack
Comment 12 Zeeshan Ali 2011-11-18 16:12:46 UTC
Attachment 201633 [details] pushed as 8f0c80e - Only entertain URI commandline argument once
Attachment 201634 [details] pushed as bd20ce4 - Reset wizard's source widget after user hits 'Create'
Comment 13 Zeeshan Ali 2011-11-21 18:30:28 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > @@ +132,3 @@
> >              resources = null;
> > +            wizard_source.uri = null;
> > +            wizard_source.page = SourcePage.MAIN;
> > 
> > this should be handled already automatically when you go back to the wizard, 
> 
> Well, apparently its not. :( The wizard_source stays in URL page once you use
> that.

This is still the case btw.