Re: [PATCH 14/14] Add an interface to select the fancy filtering UI vs. the regular one.

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

 



Ack,

Although I would like to note, that we may turn this into a generic normal / advanced
screen, and for example for the normal install also skip the package selection screen
(and maybe hide the custom and review partitioning options from the part_type screen).

I think this would be nice to do, but I might be alone in this :)

Regards,

Hans



On 12/01/2009 09:15 PM, Chris Lumens wrote:
Most Fedora users don't need to see the advanced filtering UI with all its
multipath tabs and advanced storage buttons and search interfaces.  So,
provide an introductory screen that allows skipping all that stuff.
---
  iw/filter_type.py |   80 +++++++++++++++++++++++++++++++++++++++++++++++++++++
  kickstart.py      |    2 +-
  text.py           |    1 +
  upgrade.py        |    1 +
  4 files changed, 83 insertions(+), 1 deletions(-)
  create mode 100644 iw/filter_type.py

diff --git a/iw/filter_type.py b/iw/filter_type.py
new file mode 100644
index 0000000..6e17f8b
--- /dev/null
+++ b/iw/filter_type.py
@@ -0,0 +1,80 @@
+#
+# Copyright (C) 2009  Red Hat, Inc.  All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see<http://www.gnu.org/licenses/>.
+#
+# Author(s): Chris Lumens<clumens@xxxxxxxxxx>
+#
+
+import gtk
+import gobject
+import math
+
+from constants import *
+import gui
+from partition_ui_helpers_gui import *
+from pixmapRadioButtonGroup_gui import pixmapRadioButtonGroup
+
+from iw_gui import *
+from flags import flags
+from storage.deviceaction import *
+
+import gettext
+_ = lambda x: gettext.ldgettext("anaconda", x)
+
+class FilterTypeWindow(InstallWindow):
+    def __init__(self, ics):
+        InstallWindow.__init__(self, ics)
+        ics.setTitle("Filter Type")
+        ics.setNextEnabled(True)
+
+    def getNext(self):
+        if self.buttonGroup.getCurrent() == "simple":
+            self.anaconda.id.simpleFilter = True
+        else:
+            self.anaconda.id.simpleFilter = False
+
+        return None
+
+    def getScreen(self, anaconda):
+        self.anaconda = anaconda
+        self.intf = anaconda.intf
+
+        vbox = gtk.VBox()
+        label = gtk.Label(_("What type of devices will your installation "
+                            "involve?"))
+        label.set_alignment(0.0, 0.0)
+        vbox.pack_start(label, expand=False, fill=False)
+
+        self.buttonGroup = pixmapRadioButtonGroup()
+        self.buttonGroup.addEntry("simple", _("Basic Storage Devices"),
+                                  descr=_("Installs or upgrades to typical types "
+                                          "of storage devices.  If you're not sure "
+                                          "which option is right for you, this is "
+                                          "probably it."))
+        self.buttonGroup.addEntry("complex", _("Specialized Storage Devices"),
+                                  descr=_("Installs or upgrades to devices such as "
+                                          "Storage Area Networks (SANs) or mainframe "
+                                          "attached disks (DASD), usually in an "
+                                          "enterprise environment"))
+
+        widget = self.buttonGroup.render()
+        vbox.pack_start(widget, expand=True, fill=True)
+
+        if self.anaconda.id.simpleFilter == True:
+            self.buttonGroup.setCurrent("simple")
+        else:
+            self.buttonGroup.setCurrent("complex")
+
+        return vbox
diff --git a/kickstart.py b/kickstart.py
index ee8a735..a80a5d7 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -334,7 +334,7 @@ class IgnoreDisk(commands.ignoredisk.F8_IgnoreDisk):
      def execute(self, anaconda):
          anaconda.id.storage.ignoredDisks = self.ignoredisk
          anaconda.id.storage.exclusiveDisks = self.onlyuse
-        self.handler.skipSteps.extend(["filter"])
+        self.handler.skipSteps.extend(["filter", "filtertype"])

  class IscsiData(commands.iscsi.F10_IscsiData):
      def execute(self, anaconda):
diff --git a/text.py b/text.py
index 12eabbb..b626fbd 100644
--- a/text.py
+++ b/text.py
@@ -549,6 +549,7 @@ class InstallInterface:
          self.screen.finish()

      def setSteps(self, anaconda):
+        anaconda.dispatch.skipStep("filtertype")
          anaconda.dispatch.skipStep("filter")
          anaconda.dispatch.skipStep("cleardisksel")
          anaconda.dispatch.skipStep("basepkgsel")
diff --git a/upgrade.py b/upgrade.py
index ede3de5..0e0d990 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -281,6 +281,7 @@ def setSteps(anaconda):
                  "language",
                  "keyboard",
                  "welcome",
+                "filtertype",
                  "filter",
                  "cleardisksel",
                  "installtype",

_______________________________________________
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