Bug 397393

Summary: ncurses packager: OK button doesn't have focus by default.
Product: [openSUSE] openSUSE 11.0 Reporter: Lukas Ocilka <locilka>
Component: YaST2Assignee: Stefan Hundhammer <shundhammer>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None    
Version: RC 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Patch for NCPopupInfo class

Description Lukas Ocilka 2008-06-05 09:25:47 UTC
By default, every single pop-up (?) that appears in in ncurses packager has its focus on the presented text instead of having it on the default button.

-----------------------------------
┌─────────────────────────────────┐
│All package dependencies are OK. │
│                                 │
└─────────────────────────────────┘
               [OK]                
-----------------------------------

You have to press [Tab] first and then [Enter].
Comment 1 Stefan Hundhammer 2008-06-05 09:29:38 UTC
That's not incactive. It doesn't have the focus. But that's something different.

A UI::SetFocus() will help here, maybe also giving that button `opt(`default).
Comment 2 Lukas Ocilka 2008-06-05 09:37:25 UTC
OK, "inactive" would mean "disabled" in this case, thanks for changing the summary ;)
Comment 3 Katarina Machalkova 2008-06-23 16:24:57 UTC
Created attachment 223806 [details]
Patch for NCPopupInfo class

So I added these two functions to NCPopupInfo class so the developer can pick which button to focus (as the buttons themselves are - quite logically - class private variables) once the popup dialog is created.

I was thinking about focusing OK button by default, but at the end I'd prefer having both functions as it offers more flexibility. It may be sometimes useful to focus other than OK button (e.g. cancelling cancel ;-) etc.)
Comment 4 Katarina Machalkova 2008-06-23 16:25:53 UTC
Please add the patch to y2-ncurses if you find it useful and pass back to me then, I'll update ncurses-pkg and make it depend on the new version
Comment 5 Stefan Hundhammer 2008-06-24 09:43:51 UTC
Applied patch.