[PATCH rhel6-branch 2/3] Save the partition type selection when moving back (#595659)

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

 



In order to properly rescan the storage systems the GUI partition
type selection should only apply to dialogs AFTER autopart. Save
the selection when moving back and recall when moving forward again.

Related: rhbz#595659
---
 anaconda            |    2 ++
 iw/autopart_type.py |   12 ++++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/anaconda b/anaconda
index bde63bf..581ece0 100755
--- a/anaconda
+++ b/anaconda
@@ -506,6 +506,8 @@ class Anaconda(object):
         self.proxy = None
         self.proxyUsername = None
         self.proxyPassword = None
+        self.clearPartTypeSelection = None      # User's GUI selection
+        self.clearPartTypeSystem = None         # System's selection
 
         # *sigh* we still need to be able to write this out
         self.xdriver = None
diff --git a/iw/autopart_type.py b/iw/autopart_type.py
index 9134e68..509d7c2 100644
--- a/iw/autopart_type.py
+++ b/iw/autopart_type.py
@@ -193,6 +193,12 @@ class PartitionTypeWindow(InstallWindow):
 
         return None
 
+    def getPrev(self):
+        # Save the user's selection and restore system selection
+        if self.storage.clearPartType is not None:
+            self.anaconda.clearPartTypeSelection = self.storage.clearPartType
+        self.storage.clearPartType = self.anaconda.clearPartTypeSystem
+
     def typeChanged(self, *args):
         if self.buttonGroup.getCurrent() == "custom":
             if not self.prevrev:
@@ -215,6 +221,12 @@ class PartitionTypeWindow(InstallWindow):
         self.intf = anaconda.intf
         self.dispatch = anaconda.dispatch
 
+        if self.anaconda.dir == DISPATCH_FORWARD:
+            # Save system's partition type setting and restore user's
+            self.anaconda.clearPartTypeSystem = self.storage.clearPartType
+            if self.anaconda.clearPartTypeSelection is not None:
+                self.storage.clearPartType = self.anaconda.clearPartTypeSelection
+
         (self.xml, vbox) = gui.getGladeWidget("autopart.glade", "parttypeTable")
         self.encryptButton = self.xml.get_widget("encryptButton")
         self.reviewButton = self.xml.get_widget("reviewButton")
-- 
1.7.0.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[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