[PATCH] clean up some dialogs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Change some dialogs to error dialogs, with proper icons, and replace
'OK' with 'Reboot' (oooh, HIGgy).

Also marks with FIXME those that reference 'Press 'OK'', as we don't
want to change strings now.

Noticed the following different versions of the text in anaconda:

Press 'OK'
Press OK
Press the OK button
Press <Enter>
Press <return>

and some of the 'reboot now' dialogs already have a custom
button of 'Exit' as opposed to 'Reboot' (didn't change those.)

Passes pychecker. It occurs to me that perhaps we need
intf.warningWindow and intf.errorWindow.

Bill
Index: autopart.py
===================================================================
RCS file: /usr/local/CVS/anaconda/autopart.py,v
retrieving revision 1.174
diff -u -r1.174 autopart.py
--- autopart.py	9 Nov 2005 21:16:57 -0000	1.174
+++ autopart.py	30 Jan 2006 21:09:05 -0000
@@ -1264,6 +1264,7 @@
             # get the preexisting partition they want to use
             req = partitions.getRequestByDeviceName(request.device)
             if not req or not req.type or req.type != REQUEST_PREEXIST:
+                # FIXME - custom_buttoms=Reboot, remove 'Press OK...'
                 intf.messageWindow(_("Requested Partition Does Not Exist"),
                                    _("Unable to locate partition %s to use "
                                      "for %s.\n\n"
@@ -1292,6 +1293,7 @@
               request.preexist == 1):
             req = partitions.getRequestByDeviceName(request.device)
             if not req or req.preexist == 0:
+                # FIXME - custom_buttoms=Reboot, remove 'Press OK...'
                  intf.messageWindow(_("Requested Raid Device Does Not Exist"),
                                     _("Unable to locate raid device %s to use "
                                       "for %s.\n\n"
@@ -1324,6 +1326,7 @@
             # get the preexisting partition they want to use
             req = partitions.getRequestByVolumeGroupName(request.volumeGroupName)
             if not req or req.preexist == 0 or req.format == 1:
+                 # FIXME - custom_buttoms=Reboot, remove 'Press OK...'
                  intf.messageWindow(_("Requested Volume Group Does Not Exist"),
                                     _("Unable to locate volume group %s to use "
                                       "for %s.\n\n"
@@ -1362,6 +1365,7 @@
             # get the preexisting partition they want to use
             req = partitions.getRequestByLogicalVolumeName(request.logicalVolumeName)
             if not req or req.preexist == 0:
+                # FIXME - custom_buttoms=Reboot, remove 'Press OK...'
                 intf.messageWindow(_("Requested Logical Volume Does Not Exist"),
                                    _("Unable to locate logical volume %s to use "
                                      "for %s.\n\n"
@@ -1477,6 +1481,7 @@
     for req in partitions.requests:
         errors = req.sanityCheckRequest(partitions)
         if errors:
+            # FIXME - custom_buttoms=Reboot, remove 'Press OK...'
             intf.messageWindow(_("Automatic Partitioning Errors"),
                                _("The following errors occurred with your "
                                  "partitioning:\n\n%s\n\n"
@@ -1538,7 +1543,9 @@
 	#
 	if isKickstart:
 	    intf.messageWindow(_("Unrecoverable Error"),
-			       _("Your system will now be rebooted."))
+			       _("Your system will now be rebooted."),
+			       type="custom", custom_icon="error",
+			       custom_buttons=[_("_Reboot"),])
 	    sys.exit(0)
         return DISPATCH_BACK
 
Index: fsset.py
===================================================================
RCS file: /usr/local/CVS/anaconda/fsset.py,v
retrieving revision 1.263
diff -u -r1.263 fsset.py
--- fsset.py	19 Dec 2005 22:11:08 -0000	1.263
+++ fsset.py	30 Jan 2006 21:09:05 -0000
@@ -1400,13 +1400,16 @@
                 formatted.append(entry)
             except SystemError:
                 if self.messageWindow:
+                    # FIXME: Remove 'Press <Enter>'...?
                     self.messageWindow(_("Error"),
                                        _("An error occurred trying to "
                                          "initialize swap on device %s.  This "
                                          "problem is serious, and the install "
                                          "cannot continue.\n\n"
                                          "Press <Enter> to reboot your system.")
-                                       % (entry.device.getDevice(),))
+                                       % (entry.device.getDevice(),),
+                                       type="custom", custom_icon="error",
+                                       custom_buttons=[_("_Reboot"),])
                 sys.exit(0)
 
         for entry in formatted:
@@ -1437,6 +1440,7 @@
                     self.mountcount = self.mountcount + 1
                 except SystemError, (num, msg):
                     if self.messageWindow:
+                        # FIXME - custom_buttons=Reboot, remove 'Press OK...'
                         if upgrading:
                             self.messageWindow(_("Error"),
                                                _("Error enabling swap device "
@@ -1506,7 +1510,9 @@
 					     "not recommend you use this device."
 					     "\n\n"
 					     "Press <Enter> to reboot your system") %
-					   (entry.device.getDevice(),))
+					   (entry.device.getDevice(),),
+                                           type="custom", custom_icon="error",
+                                           custom_buttons=[_("_Reboot"),])
 		    sys.exit(0)
 		
             except SystemError:
@@ -1517,7 +1523,9 @@
                                          "serious, and the install cannot "
                                          "continue.\n\n"
                                          "Press <Enter> to reboot your system.")
-                                       % (entry.device.getDevice(),))
+                                       % (entry.device.getDevice(),),
+                                       type="custom", custom_icon="error",
+                                       custom_buttons=[_("_Reboot"),])
                 sys.exit(0)
 
     def createLogicalVolumes (self, chroot='/'):
@@ -1552,7 +1560,9 @@
                                          "serious, and the install cannot "
                                          "continue.\n\n"
                                          "Press <Enter> to reboot your system.")
-                                       % (entry.device.getDevice(),))
+                                       % (entry.device.getDevice(),),
+                                       type="custom", custom_icon="error",
+                                       custom_buttons=[_("_Reboot"),])
                 sys.exit(0)
 
         for entry in formatted:
@@ -1602,7 +1612,9 @@
                                          "serious, and the install cannot "
                                          "continue.\n\n"
                                          "Press <Enter> to reboot your system.")
-                                       % (entry.device.getDevice(),))
+                                       % (entry.device.getDevice(),),
+                                       type="custom", custom_icon="error",
+                                       custom_buttons=[_("_Reboot"),])
                 sys.exit(0)
 
         self.migratedfs = 1
@@ -1625,7 +1637,10 @@
                                              "This is a fatal error and the "
                                              "install cannot continue.\n\n"
                                              "Press <Enter> to reboot your "
-                                             "system.") % (entry.mountpoint,))
+                                             "system.") % (entry.mountpoint,),
+                                             type="custom", custom_icon="error",
+                                             custom_buttons=[_("_Reboot"),])
+
                     else:
                         self.messageWindow(_("Invalid mount point"),
                                            _("An error occurred when trying "
@@ -1634,12 +1649,15 @@
                                              "cannot continue.\n\n"
                                              "Press <Enter> to reboot your "
                                              "system.") % (entry.mountpoint,
-                                                           msg))
+                                                           msg),
+                                             type="custom", custom_icon="error",
+                                             custom_buttons=[_("_Reboot"),])
                 sys.exit(0)
             except SystemError, (num, msg):
                 if raiseErrors:
                     raise SystemError, (num, msg)
                 if self.messageWindow:
+                    # FIXME - custom_buttoms=Reboot, remove 'Press OK...'
                     self.messageWindow(_("Error"), 
                                        _("Error mounting device %s as %s: "
                                          "%s\n\n"
@@ -1658,6 +1676,7 @@
         # it's a logical volume so that mkinitrd can create the initrd.
         root = self.getEntryByMountPoint("/")
         if not root:
+            # FIXME - custom_buttoms=Reboot, remove 'Press OK...'
             if self.messageWindow:
                 self.messageWindow(_("Error"),
                                    _("Error finding / entry.\n\n"
Index: gui.py
===================================================================
RCS file: /usr/local/CVS/anaconda/gui.py,v
retrieving revision 1.440
diff -u -r1.440 gui.py
--- gui.py	30 Jan 2006 19:57:48 -0000	1.440
+++ gui.py	30 Jan 2006 21:09:05 -0000
@@ -1279,7 +1279,7 @@
                                    _("An error occurred when attempting "
                                      "to load an installer interface "
                                      "component.\n\nclassName = %s") % (className,),
-                                    type="custom", custom_icon="warning",
+                                    type="custom", custom_icon="error",
                                     custom_buttons=[_("_Exit"),
                                                     _("_Retry")])
                 if not win.getrc():
Index: kickstart.py
===================================================================
RCS file: /usr/local/CVS/anaconda/kickstart.py,v
retrieving revision 1.309
diff -u -r1.309 kickstart.py
--- kickstart.py	26 Jan 2006 02:25:16 -0000	1.309
+++ kickstart.py	30 Jan 2006 21:09:05 -0000
@@ -68,6 +68,7 @@
 
             if self.errorOnFail:
                 if intf != None:
+                    # FIXME - custom_buttoms=Reboot, remove Press OK....
                     intf.messageWindow(_("Scriptlet Failure"),
                                        _("There was an error running the "
                                          "scriptlet.  You may examine the "
Index: partedUtils.py
===================================================================
RCS file: /usr/local/CVS/anaconda/partedUtils.py,v
retrieving revision 1.84
diff -u -r1.84 partedUtils.py
--- partedUtils.py	26 Jan 2006 22:56:28 -0000	1.84
+++ partedUtils.py	30 Jan 2006 21:09:05 -0000
@@ -1081,7 +1081,9 @@
                                _("An error has occurred - no valid devices were "
                                  "found on which to create new file systems. "
                                  "Please check your hardware for the cause "
-                                 "of this problem."))
+                                 "of this problem."),
+                                 type="custom", custom_icon="error",
+                                 custom_buttons=[_("_Reboot"),])
             sys.exit(0)
 
     
Index: upgrade.py
===================================================================
RCS file: /usr/local/CVS/anaconda/upgrade.py,v
retrieving revision 1.154
diff -u -r1.154 upgrade.py
--- upgrade.py	30 Jan 2006 20:17:00 -0000	1.154
+++ upgrade.py	30 Jan 2006 21:09:05 -0000
@@ -131,7 +131,9 @@
                              "were not unmounted cleanly.  Please boot your "
                              "Linux installation, let the file systems be "
                              "checked and shut down cleanly to upgrade.\n"
-                             "%s" %(getDirtyDevString(dirtyDevs),)))
+                             "%s" %(getDirtyDevString(dirtyDevs),)),
+                             type="custom", custom_icon="error",
+                             custom_buttons=[_("_Reboot"),])
 	sys.exit(0)
     elif warnDirty and dirtyDevs != []:
         rc = intf.messageWindow(_("Dirty File Systems"),
@@ -275,14 +277,18 @@
 	    intf.messageWindow(_("Mount failed"),
 		_("One or more of the file systems listed in the "
 		  "/etc/fstab on your Linux system cannot be mounted. "
-		  "Please fix this problem and try to upgrade again."))
+		  "Please fix this problem and try to upgrade again."),
+                  type="custom", custom_icon="error",
+                  custom_buttons=[_("_Reboot"),])
 	    sys.exit(0)
         except RuntimeError, msg:
             intf.messageWindow(_("Mount failed"),
 		_("One or more of the file systems listed in the "
                   "/etc/fstab of your Linux system are inconsistent and "
                   "cannot be mounted.  Please fix this problem and try to "
-                  "upgrade again."))
+                  "upgrade again."),
+                  type="custom", custom_icon="error",
+                  custom_buttons=[_("_Reboot"),])
             sys.exit(0)
 
 	checkLinks = ( '/etc', '/var', '/var/lib', '/var/lib/rpm',
@@ -302,7 +308,9 @@
 			"symbolic links and restart the upgrade.\n\n")
 	    for n in badLinks:
 		message = message + '\t' + n + '\n'
-	    intf.messageWindow(_("Absolute Symlinks"), message)
+	    intf.messageWindow(_("Absolute Symlinks"), message,
+                               type="custom", custom_icon="error",
+                               custom_buttons=[_("_Reboot"),])
 	    sys.exit(0)
 
         # fix for 80446
@@ -319,7 +327,9 @@
                         "as symbolic links and restart the upgrade.\n\n")
             for n in badLinks:
                 message = message + '\t' + n + '\n'
-	    intf.messageWindow(_("Invalid Directories"), message)
+	    intf.messageWindow(_("Invalid Directories"), message,
+                               type="custom", custom_icon="error",
+                               custom_buttons=[_("_Reboot"),])
 	    sys.exit(0)
            
         bindMountDevDirectory(instPath)
@@ -375,7 +385,9 @@
                              "systems with a pre-rpm 4.x database. "
                              "Please install the errata rpm packages "
                              "for your release as described in the release "
-                             "notes and then run the upgrade procedure."))
+                             "notes and then run the upgrade procedure."),
+                             type="custom", custom_icon="error",
+                             custom_buttons=[_("_Reboot"),])
         sys.exit(0)
         
     else:
@@ -399,7 +411,9 @@
 	win.pop()
 	intf.messageWindow(_("Error"),
                            _("An error occurred when finding the packages to "
-                             "upgrade."))
+                             "upgrade."),
+                          type="custom", custom_icon="error",
+                          custom_buttons=[_("_Reboot"),])
 	sys.exit(0)
 	    
     # unselect all packages
Index: yuminstall.py
===================================================================
RCS file: /usr/local/CVS/anaconda/yuminstall.py,v
retrieving revision 1.103
diff -u -r1.103 yuminstall.py
--- yuminstall.py	30 Jan 2006 19:39:32 -0000	1.103
+++ yuminstall.py	30 Jan 2006 21:09:05 -0000
@@ -450,7 +450,9 @@
                                ("There was an error running your transaction, "
                                 "probably a disk space problem.  For now, "
                                 "exiting on this although we should diagnose "
-                                "and then let you go back."))
+                                "and then let you go back."),
+                                type="custom", custom_icon="error",
+                                custom_buttons=[_("_Reboot"),])
             sys.exit(1)
 
     def doCacheSetup(self):

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux