summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-07-10 23:43:17 +0000
committerMike Fulbright <msf@redhat.com>2002-07-10 23:43:17 +0000
commita53262440fd42f58d1147c0459e20a1cf9427572 (patch)
tree1025acc5452bec0330a092c06a9e6362ebbd02ab
parentc0ffcafbff28be2b55c66b77f6977176512b2e17 (diff)
downloadanaconda-a53262440fd42f58d1147c0459e20a1cf9427572.tar.gz
anaconda-a53262440fd42f58d1147c0459e20a1cf9427572.tar.xz
anaconda-a53262440fd42f58d1147c0459e20a1cf9427572.zip
add workstation customization screen
-rw-r--r--dispatch.py18
-rwxr-xr-xgui.py1
-rw-r--r--installclass.py16
-rw-r--r--iw/desktop_choice_gui.py67
-rw-r--r--text.py1
-rw-r--r--textw/desktop_choice_text.py52
6 files changed, 154 insertions, 1 deletions
diff --git a/dispatch.py b/dispatch.py
index 4bda60f9f..02f953ce7 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -49,6 +49,24 @@ from network import networkDeviceCheck
# in the second case, the function is called directly from the dispatcher
installSteps = [
+# ("readcomps", readPackages, ("intf", "method", "id")),
+# ("package-selection", ("id.comps", "dispatch")),
+# ("package-group-select-hack", packageGroupSelectHack, ("id.instClass", "id",)),
+# ("indivpackage", ("id.comps", "id.hdList")),
+# ("networkdevicecheck", networkDeviceCheck, ("id.network", "dispatch")),
+# ("network", ("id.network", "dispatch", "intf")),
+ ("installtype", ("dispatch", "id", "method", "intf")),
+ ("desktopchoice", ("intf", "dispatch")),
+ ("readcomps", readPackages, ("intf", "method", "id")),
+ ("findpackages", upgradeFindPackages, ("intf", "method", "id",
+ "instPath", "dir")),
+ ("package-selection", ("id.comps", "dispatch")),
+ ("package-group-select-hack", packageGroupSelectHack, ("id.instClass", "id",)),
+ ("indivpackage", ("id.comps", "id.hdList")),
+ ("partitionobjinit", partitionObjectsInitialize, ("id.diskset",
+ "id.partitions",
+ "dir", "intf")),
+ ("partition", ("id.fsset", "id.diskset", "id.partitions", "intf")),
("welcome", ("id.configFileData",)),
("betanag", betaNagScreen, ("intf", "dir")),
("language", ("intf", "id.instLanguage")),
diff --git a/gui.py b/gui.py
index a086d09ed..3ba1a2d14 100755
--- a/gui.py
+++ b/gui.py
@@ -55,6 +55,7 @@ stepToClass = {
"timezone" : ("timezone_gui", "TimezoneWindow"),
"accounts" : ("account_gui", "AccountWindow"),
"authentication" : ("auth_gui", "AuthWindow"),
+ "desktopchoice": ("desktop_choice_gui", "DesktopChoiceWindow"),
"package-selection" : ("package_gui", "PackageSelectionWindow"),
"indivpackage" : ("package_gui", "IndividualPackageSelectionWindow"),
"dependencies" : ("dependencies_gui", "UnresolvedDependenciesWindow"),
diff --git a/installclass.py b/installclass.py
index ae9af8093..6b2e97329 100644
--- a/installclass.py
+++ b/installclass.py
@@ -22,7 +22,21 @@ from instdata import InstallData
from partitioning import *
from rhpl.log import log
-from rhpl.translate import _
+from rhpl.translate import _, N_
+
+#
+# XXX constant here really should be in install method???
+#
+DEFAULT_DESKTOP_LABEL_1 = N_("The following software will be installed:")
+
+DEFAULT_DESKTOP_LABEL_2 = N_("These applications will allow you to browse the "
+ "Internet, send and receive email, and create and "
+ "edit documents on your %s system.\n\n"
+ "However %s ships with many more applications, and "
+ "you may customize the selection of software "
+ "installed if you want.")
+
+
class BaseInstallClass:
# default to not being hidden
diff --git a/iw/desktop_choice_gui.py b/iw/desktop_choice_gui.py
new file mode 100644
index 000000000..2895cfb73
--- /dev/null
+++ b/iw/desktop_choice_gui.py
@@ -0,0 +1,67 @@
+#
+# desktop_choice_gui.py: choose desktop
+#
+# Copyright 2002 Red Hat, Inc.
+#
+# This software may be freely redistributed under the terms of the GNU
+# library public license.
+#
+# You should have received a copy of the GNU Library Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+import gtk
+import gobject
+import string
+import gui
+from iw_gui import *
+from rhpl.translate import _, N_
+from installclass import DEFAULT_DESKTOP_LABEL_1, DEFAULT_DESKTOP_LABEL_2
+from constants import productName
+from flags import flags
+
+class DesktopChoiceWindow (InstallWindow):
+
+ windowTitle = N_("Workstation Defaults")
+ htmlTag = "wsdefaults"
+
+ def __init__ (self, ics):
+ InstallWindow.__init__ (self, ics)
+ ics.setGrabNext (1)
+
+ def getNext(self):
+ if self.customize.get_active():
+ self.dispatch.skipStep("package-selection", skip = 0)
+ else:
+ self.dispatch.skipStep("package-selection")
+
+ return None
+
+ # WelcomeWindow tag="wel"
+ def getScreen (self, intf, dispatch):
+
+ self.intf = intf
+ self.dispatch = dispatch
+
+ table = gtk.Table()
+ table.set_row_spacings(5)
+ table.set_border_width(5)
+
+ label1 = DEFAULT_DESKTOP_LABEL_1
+ label2 = "\tGNOME Desktop\t\t\tNautilus file manager\n"+"\tMozilla web browser\t\tEvolution mail client\n"+"\tCD authoring software\t\tMultimedia applications\n"+"\tOpen Office(tm) office suite"
+ label3 = DEFAULT_DESKTOP_LABEL_2 % (productName, productName)
+
+ label = gui.WrappingLabel(label1+"\n\n"+label2+"\n\n"+label3)
+ table.attach(label, 0, 1, 0, 1)
+
+ self.customize = gtk.CheckButton(_("I would like to choose additional software"))
+ table.attach(self.customize, 0, 1, 1, 2, ypadding=15)
+
+ custom = not self.dispatch.stepInSkipList("package-selection")
+ self.customize.set_active(custom)
+
+ al = gtk.Alignment(0.5, 0.5)
+ al.add(table)
+ return al
+
diff --git a/text.py b/text.py
index 693276a11..3a128687b 100644
--- a/text.py
+++ b/text.py
@@ -62,6 +62,7 @@ stepToClasses = {
"timezone" : ("timezone_text", "TimezoneWindow"),
"accounts" : ("userauth_text", ("RootPasswordWindow", "UsersWindow")),
"authentication" : ("userauth_text", ("AuthConfigWindow")),
+ "desktopchoice": ("desktop_choice_text", "DesktopChoiceWindow"),
"package-selection" : ("packages_text", "PackageGroupWindow"),
"indivpackage" : ("packages_text", ("IndividualPackageWindow")),
"dependencies" : ("packages_text", "PackageDepWindow"),
diff --git a/textw/desktop_choice_text.py b/textw/desktop_choice_text.py
new file mode 100644
index 000000000..e1947a2fc
--- /dev/null
+++ b/textw/desktop_choice_text.py
@@ -0,0 +1,52 @@
+#
+# desktop_choice_text.py: choose desktop
+#
+# Copyright 2002 Red Hat, Inc.
+#
+# This software may be freely redistributed under the terms of the GNU
+# library public license.
+#
+# You should have received a copy of the GNU Library Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+from snack import *
+from constants_text import *
+from rhpl.translate import _
+from constants import productName
+from installclass import DEFAULT_DESKTOP_LABEL_1, DEFAULT_DESKTOP_LABEL_2
+
+class DesktopChoiceWindow:
+ def __call__(self, screen, intf, dispatch):
+
+ bb = ButtonBar (screen, (TEXT_OK_BUTTON, TEXT_BACK_BUTTON))
+
+ toplevel = GridFormHelp (screen, _("Workstation Defaults"),
+ "wsdefaults", 1, 5)
+
+ label1 = DEFAULT_DESKTOP_LABEL_1
+ label2 = " GNOME Desktop shell Nautilus file manager\n"+" Mozilla web browser Evolution mail client\n"+" CD authoring software Multimedia applications\n"+" Open Office(tm) office suite"
+
+ label3 = DEFAULT_DESKTOP_LABEL_2 % (productName, productName)
+
+ toplevel.add (TextboxReflowed(55, label1+"\n\n"+label2+"\n\n"+label3), 0, 0, (0, 0, 0, 1))
+ custom = not dispatch.stepInSkipList("package-selection")
+ customize = Checkbox (_("Customize software selection"), custom)
+ toplevel.add (customize, 0, 3, (0, 0, 0, 1))
+ toplevel.add (bb, 0, 4, (0, 0, 0, 0), growx = 1)
+
+ rc = toplevel.run()
+ if rc == TEXT_BACK_CHECK:
+ screen.popWindow()
+ return INSTALL_BACK
+
+ if customize.selected():
+ dispatch.skipStep("package-selection", skip = 0)
+ else:
+ dispatch.skipStep("package-selection")
+
+ screen.popWindow()
+
+ return INSTALL_OK
+