WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: sce-update should have option quit  (Read 3593 times)

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 338
sce-update should have option quit
« on: August 23, 2016, 03:06:22 AM »
Hello again! I am slowly getting back to dCore after a long time of absence. And I am still amazed about how well it performs even on an low-spec netbook. Just love the great concept!

One simple suggestion: when launching ''sce-update'' after having upgraded the initRD from a version dating back to february(!), I am presented a list of 40+ items. That is fine but I do not want to select them all but rather launch ''sce-update -a'' after some changes in the repo sources.

The only options I have is press N(ext) or P(revious) or "Enter to proceed". Sure, proceeding with nothing selected won't do much but experience teaches caution. For the comfort of the cautious and overly cautious I suggest adding a Q(uit) option to the dialogue. Priority niceness 19. :)

Suggested phrasing using two lines instead of one:
Code: [Select]
Enter selection ( # - # ) or
press Enter to proceed, (n)ext, (p)revious or (q)uit:

What do others think? I could hack it into a GitHub pull request in case there is some consensus.

Cheers!

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-update should have option quit
« Reply #1 on: August 23, 2016, 11:25:41 AM »
Ok, will be in next RC.

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 338
Re: sce-update should have option quit
« Reply #2 on: August 24, 2016, 12:58:00 AM »
Great! Looking forward to it. Thanks Jason!

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 338
Re: sce-update should have option quit
« Reply #3 on: August 29, 2016, 03:05:09 PM »
I see it included in the new release candidates, thanks! The command is ignored, however, if a user has already selected any extension to upgrade. I think that expected behavior would be to unconditionally quit, even if some selection is already made.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-update should have option quit
« Reply #4 on: August 29, 2016, 04:26:14 PM »
OK I will see if I can work it in.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-update should have option quit
« Reply #5 on: September 02, 2016, 05:28:21 PM »
The "q" quit option does not work with the select menu being used in a loop like some SCE tools use.  So now Ctrl-c is mentioned in the select menu as the quit function and that works as it kills the parent script and not just the select menu.  Sce-import still has the "q" quit function as it works in it's case.  In the newest RC.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: sce-update should have option quit
« Reply #6 on: September 02, 2016, 09:35:24 PM »
Can we remove the Ctrl-c dialogue and simply use this?
Code: [Select]
Enter selection ( 1 - 47 ), Enter to proceed or exit, (n)ext, (p)revious:


Even if items selected for update check, if user changes mind still gets this:
Code: [Select]
Xprogs
 
Press Enter to update check above SCE(s), (q)uit to exit: q

Just adding 'or exit' so it's bullet proof intuitive but avoids use of Ctrl-c dialogue. I plan to submit revamped UI updates, one goal will be to replace any Ctrl-c dialogues with a more eloquent (q)uit. As Ctrl-c is a built-in break, usually used for misbehaving programs, to me it's intentional use in a properly functioning script should be avoided.

Jason please don't issue new RC for this, just explaining my viewpoint. Eventually as time permits i will send udpates, thanks.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-update should have option quit
« Reply #7 on: September 03, 2016, 07:32:48 AM »
Yeah, I agree with the Ctrl-c thing and not promoting it, though a "q" in the middle of the menu function that is a loop will not work as in this case, unless I have a q choice do a 'kill parent process' thing which I don't think is a good idea to accommodate a quit function.  One was asked if they want to proceed or quit after the selection(s) are made and that is sufficient. 

Adding the Ctrl-c text required some awk newline code, but the changes are there in git so reverting to one line should be no issue.  Since you are going to submit updates and I am not planning changes aside from bug reports that may come up, I will wait for you to send in updates.  Thanks.

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 338
Re: sce-update should have option quit
« Reply #8 on: September 07, 2016, 06:17:47 AM »
Tested the current solution with Ctrl-C and it does what it should. I fully agree with Nitram that avoiding Ctrl-C would be nicer. I would prefer the proposed solution over the current one.

@Nitram: It would be great, if you could improve the UI further. Thanks for your efforts!