Bug 558900

Summary: YaST Gtk Wizard/dialog forgets(?) default button
Product: [openSUSE] openSUSE 11.2 Reporter: Katarina Machalkova <kmachalkova>
Component: YaST2Assignee: Forgotten User h13THG8RK1 <forgotten_h13THG8RK1>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Minor    
Priority: P5 - None CC: forgotten_h13THG8RK1
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 11.2   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: testcase

Description Katarina Machalkova 2009-11-27 16:31:55 UTC
Created attachment 329824 [details]
testcase

Default button in YaST dialog is a button that is activated whenever Enter button is pressed in that dialog (it is the button with `opt(`default) property, or - if no such button is specified - next/ok Wizard button). 

I'm attaching a small testcase demonstrating certain weirdness of this behaviour when Gtk UI is used. How to duplicate

1. Type something into the text field
2. Press Enter - a small win will pop up and close in a few secs
3. Type something into the text field again
4. Press Enter again
Comment 1 Katarina Machalkova 2009-11-27 16:38:07 UTC
What happens in Qt UI:

* Button labeled "Default Button" is activated each time 

What happens in Gtk UI:

* "Default Button" is activated only after the first Enter being pressed (2.)
* Next time (4.), it is "Next" button that is activated and the dialog is closed

Oh, and I missed this step in the description above:
0. Run the testcase '/sbin/yast2 ./test.ycp --gtk'

(I'm deliberately excluding curses UI from testing, as it is broken beyond repair when it comes to button defaultness)
Comment 2 Katarina Machalkova 2009-11-27 16:42:14 UTC
 ... and what I also did not mention yet (it is maybe the root of all evil here): 

If the small feedback window does *not* pop up after activating "Default Button" - that is, if Popup::ShowFeedback() and Popup::ClearFeedback() is not there - everything works as expected. Hence the summary mentions "forgetting" the default button
Comment 3 Forgotten User h13THG8RK1 2009-12-01 03:01:20 UTC
Well spotted. The way GTK handles such default buttons is weird, and indeed it does lose the information. SVN should work perfectly now.