[Uludag-commits] r17577 - in branches/yali4/yali4: . gui

uludag-commits at pardus.org.tr uludag-commits at pardus.org.tr
4 Nis 2008 Cum 16:21:57 EEST


Author: gokmen.goksel
Date: Fri Apr  4 16:21:56 2008
New Revision: 17577

Modified:
   branches/yali4/yali4/bootloader.py
   branches/yali4/yali4/gui/DiskWidgets.py
   branches/yali4/yali4/gui/ScrBootloader.py
   branches/yali4/yali4/gui/ScrDateTime.py
   branches/yali4/yali4/gui/ScrPartitionManual.py
   branches/yali4/yali4/gui/YaliWindow.py
   branches/yali4/yali4/storage.py
Log:
 * sparsum comitto

Modified: branches/yali4/yali4/bootloader.py
=================================================================
--- branches/yali4/yali4/bootloader.py	(original)
+++ branches/yali4/yali4/bootloader.py	Fri Apr  4 16:21:56 2008
@@ -193,12 +193,13 @@
 
     def install_grub(self, grub_install_root=None):
         """ Install GRUB to the given device or partition """
-        # grub installation is always hd0 (http://liste.pardus.org.tr/gelistirici/2007-March/005725.html)
-        # if not explicitly defined...
 
         if not grub_install_root.startswith("/dev/"):
             grub_install_root = "/dev/%s" % grub_install_root
 
+        grub_install_root = str(filter(lambda u: not u.isdigit(),
+                                       grub_install_root))
+
         cmd = "%s --root-directory=%s %s" % (yali4.sysutils.find_executable("grub-install"),
                                              consts.target_dir,
                                              grub_install_root)

Modified: branches/yali4/yali4/gui/DiskWidgets.py
=================================================================
--- branches/yali4/yali4/gui/DiskWidgets.py	(original)
+++ branches/yali4/yali4/gui/DiskWidgets.py	Fri Apr  4 16:21:56 2008
@@ -42,6 +42,7 @@
         self.resize(QSize(QRect(0,0,600,80).size()).expandedTo(self.minimumSizeHint()))
         self.setAutoFillBackground(False)
         self.diskCount = 1
+        self.updateEnabled = True
         self.setStyleSheet("""
             QTabWidget::pane { border-top: 2px solid #FFFFFF; }
             QTabWidget::tab-bar { left: 5px; }
@@ -87,8 +88,10 @@
 
         self.initDevices()
 
-    def resizeEvent(self,event):
-        self.update()
+    def resizeEvent(self, event):
+        if self.updateEnabled:
+            self.update()
+            self.updateEnabled = False
 
     ##
     # GUI Operations

Modified: branches/yali4/yali4/gui/ScrBootloader.py
=================================================================
--- branches/yali4/yali4/gui/ScrBootloader.py	(original)
+++ branches/yali4/yali4/gui/ScrBootloader.py	Fri Apr  4 16:21:56 2008
@@ -100,6 +100,10 @@
         self.connect(self.ui.device_list, SIGNAL("clicked()"),
                      self.slotSelect)
 
+    def shown(self):
+        self.orderedDiskList = yali4.storage.getOrderedDiskList()
+        ctx.debugger.log("Disks BIOS Boot order : %s " % ','.join(self.orderedDiskList))
+
     def backCheck(self):
         if ctx.autoInstall:
             # we need to go partition auto screen, not manual ;)
@@ -234,7 +238,6 @@
             ctx.installData.bootLoaderDev = basename(self.device.getPath())
         else:
             if len(yali4.storage.devices) > 1:
-                self.orderedDiskList = yali4.storage.getOrderedDiskList()
                 ctx.installData.bootLoaderDev = basename(self.orderedDiskList[0])
             else:
                 ctx.installData.bootLoaderDev = str(basename(root_part_req.partition().getPath()))

Modified: branches/yali4/yali4/gui/ScrDateTime.py
=================================================================
--- branches/yali4/yali4/gui/ScrDateTime.py	(original)
+++ branches/yali4/yali4/gui/ScrDateTime.py	Fri Apr  4 16:21:56 2008
@@ -107,4 +107,4 @@
         # Store time zone selection we will set it in processPending actions.
         ctx.installData.timezone = self.ui.timeZoneList.currentItem().text()
         ctx.debugger.log("Time zone selected as %s " % ctx.installData.timezone)
-
+        return True

Modified: branches/yali4/yali4/gui/ScrPartitionManual.py
=================================================================
--- branches/yali4/yali4/gui/ScrPartitionManual.py	(original)
+++ branches/yali4/yali4/gui/ScrPartitionManual.py	Fri Apr  4 16:21:56 2008
@@ -80,7 +80,7 @@
         ctx.mainScreen.disableNext()
 
     def update(self):
-        self.diskList.update()
+        self.diskList.updateEnabled = True
 
     ##
     # do the work and run requested actions on partitions.

Modified: branches/yali4/yali4/gui/YaliWindow.py
=================================================================
--- branches/yali4/yali4/gui/YaliWindow.py	(original)
+++ branches/yali4/yali4/gui/YaliWindow.py	Fri Apr  4 16:21:56 2008
@@ -59,6 +59,8 @@
             self.helpContent.hide()
         else:
             self.helpContent.show()
+        _w = self.mainStack.currentWidget()
+        _w.update()
 
     # show/hide debug window
     def toggleDebug(self):
@@ -84,9 +86,9 @@
     def slotNext(self,dryRun=False):
         if not dryRun:
             _w = self.mainStack.currentWidget()
-            _w.execute()
-        self.stackMove(self.getCur(self.moveInc))
-        self.moveInc = 1
+            if _w.execute():
+                self.stackMove(self.getCur(self.moveInc))
+                self.moveInc = 1
 
     # execute previous step
     def slotBack(self):
@@ -105,6 +107,7 @@
         self.helpContent.setText(_w.help)
         # shown functions contain necessary instructions before
         # showing a stack ( updating gui, disabling some buttons etc. )
+        _w.update()
         _w.shown()
 
     # create all widgets and add inside stack

Modified: branches/yali4/yali4/storage.py
=================================================================
--- branches/yali4/yali4/storage.py	(original)
+++ branches/yali4/yali4/storage.py	Fri Apr  4 16:21:56 2008
@@ -543,6 +543,7 @@
     # Check for sysfs. Only works for >2.6 kernels.
     if not os.path.exists("/sys/bus"):
         raise DeviceError, "sysfs not found!"
+
     # Check for /proc/partitions
     if not os.path.exists("/proc/partitions"):
         raise DeviceError, "/proc/partitions not found!"


Uludag-commits mesaj listesiyle ilgili daha fazla bilgi