summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2006-01-30 19:57:48 +0000
committerJeremy Katz <katzj@redhat.com>2006-01-30 19:57:48 +0000
commit5633643773aba178c08ab37393fffd1ca6e2489a (patch)
tree035d4bfc59216d447dc8c7c2d264768d7352da00 /iw
parent98ee2557a3a2c36ad347d667880332752420be9c (diff)
downloadanaconda-5633643773aba178c08ab37393fffd1ca6e2489a.tar.gz
anaconda-5633643773aba178c08ab37393fffd1ca6e2489a.tar.xz
anaconda-5633643773aba178c08ab37393fffd1ca6e2489a.zip
2006-01-30 Jeremy Katz <katzj@redhat.com>
* iw/package_gui.py: Back from the dead, this wasn't meant to go. * iw/simple_pkgselect.py: This was * gui.py: Adjust.
Diffstat (limited to 'iw')
-rw-r--r--iw/package_gui.py30
-rw-r--r--iw/simple_pkgselect.py74
2 files changed, 30 insertions, 74 deletions
diff --git a/iw/package_gui.py b/iw/package_gui.py
new file mode 100644
index 000000000..800d8568e
--- /dev/null
+++ b/iw/package_gui.py
@@ -0,0 +1,30 @@
+#
+# package_gui.py: package group selection screen
+#
+# Jeremy Katz <katzj@redhat.com>
+#
+# Copyright 2005 Red Hat, Inc.
+#
+# This software may be freely redistributed under the terms of the GNU
+# general public license.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+# FIXME: group selection isn't currently backend independent
+from GroupSelector import GroupSelector
+
+import gui
+from iw_gui import *
+from rhpl.translate import _, N_
+
+class GroupSelectionWindow (InstallWindow):
+ def getScreen(self, backend, intf):
+ self.backend = backend
+ self.intf = intf
+ self.grpsel = GroupSelector(self.backend.ayum, gui.findGladeFile,
+ gui.addFrame)
+ self.grpsel.doRefresh()
+ return self.grpsel.vbox
diff --git a/iw/simple_pkgselect.py b/iw/simple_pkgselect.py
deleted file mode 100644
index bf3500a0e..000000000
--- a/iw/simple_pkgselect.py
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# simple_pkgselect - Simple package selection UI
-#
-# Jeremy Katz <katzj@redhat.com>
-# Copyright 2005 Red Hat, Inc.
-#
-# Only shows groups and allows selecting them. None of the real
-# "interesting" pieces of package selection are present
-# Mostly here as a placeholder until we write the real code
-#
-# This software may be freely redistributed under the terms of the GNU
-# general public license.
-#
-# You should have received a copy of the GNU General 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 gui
-import copy
-from iw_gui import *
-from rhpl.translate import _, N_
-
-import checklist
-
-
-class GroupSelectionWindow (InstallWindow):
- def getNext(self):
- for row in self.cl.store:
- (on, grp) = (row[0], row[1])
- if on and grp not in self.instgrps:
- self.backend.selectGroup(grp)
- elif not on and grp in self.instgrps:
- self.backend.deselectGroup(grp)
-
- def getScreen(self, backend, intf):
- self.backend = backend
- self.intf = intf
- self.instgrps = copy.copy(backend.anaconda_grouplist)
-
- box = gtk.VBox(False)
- box.set_border_width(6)
-
- txt = gui.WrappingLabel("Please select the package groups you "
- "would like to have installed.\n\n"
- "Note that this is a temporary interface "
- "as we work on hooking things up, so please "
- "don't file bugs related directly to it.")
- box.pack_start(txt, False)
-
-
- sw = gtk.ScrolledWindow()
- sw.set_border_width(6)
- sw.set_policy (gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
- sw.set_shadow_type(gtk.SHADOW_IN)
- box.pack_start(sw)
-
- self.cl = checklist.CheckList(columns = 1)
-
- # FIXME: this is very yum backend specific...
- groups = backend.ayum.groupInfo.visible_groups
- groups.sort()
-
- for g in groups:
- self.cl.append_row([g], g in backend.anaconda_grouplist)
-
- sw.add(self.cl)
-
- return box
-
-