Bug 334766

Summary: software repositories main dialog: cannot close
Product: [openSUSE] openSUSE 10.3 Reporter: macias - <bluedzins>
Component: YaST2Assignee: Ladislav Slezák <lslezak>
Status: RESOLVED DUPLICATE QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: benji
Version: Final   
Target Milestone: ---   
Hardware: i586   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description macias - 2007-10-18 08:27:09 UTC
Try to click on [x] widget. Nothing happens.
Comment 1 Benjamin Weber 2007-10-18 08:43:00 UTC
The abort button will still work.

This code was originally using Wizard::UserInput it would appear, which is broken and returns `back for the close button. Now that UI::UserInput is used instead it needs to handle `cancel for close.

--- /usr/share/YaST2/clients/repositories.ycp.orig      2007-10-18 09:34:24.000000000 +0100
+++ /usr/share/YaST2/clients/repositories.ycp   2007-10-18 09:34:43.000000000 +0100
@@ -676,8 +676,8 @@
             exit = true;
           }
         }
-       // Wizard::UserInput returns `back instead of `cancel when window is closed by WM
-        else if (input == `abort || input == `back)
+       // We're using UI::UserInput now, so get `cancel for close, not `back
+        else if (input == `abort || input == `back || input == `cancel)
         {
            // no change, do not confirm exit
            if (sourceStatesOut == sourceStatesIn)
Comment 2 Ladislav Slezák 2007-10-18 16:35:49 UTC
Benji, thanks for the patch!
Comment 3 Ladislav Slezák 2007-10-26 11:37:02 UTC
(The duplication is in the opposite direction, but I already have fixed the second report.)

*** This bug has been marked as a duplicate of bug 335472 ***