[PATCH f14-branch master 2/3] Save the partition type selection when moving back (#635778)

[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#635778
---
 pyanaconda/__init__.py         |    2 ++
 pyanaconda/iw/autopart_type.py |   12 ++++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/__init__.py b/pyanaconda/__init__.py
index 5c07edc..c52e4f7 100644
--- a/pyanaconda/__init__.py
+++ b/pyanaconda/__init__.py
@@ -86,6 +86,8 @@ class Anaconda(object):
         self.upgradeSwapInfo = None
         self._users = None
         self.mehConfig = 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/pyanaconda/iw/autopart_type.py b/pyanaconda/iw/autopart_type.py
index fee55ba..e8af347 100644
--- a/pyanaconda/iw/autopart_type.py
+++ b/pyanaconda/iw/autopart_type.py
@@ -195,6 +195,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:
@@ -217,6 +223,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.2.3

_______________________________________________
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