diff options
author | wiktor w brodlo <wiktor@brodlo.net> | 2011-07-03 23:37:10 +0000 |
---|---|---|
committer | wiktor w brodlo <wiktor@brodlo.net> | 2011-07-03 23:37:10 +0000 |
commit | c17fa85feb9b5da645969a0fd96c3873e4e7c80b (patch) | |
tree | c64d54c7025332cc3ac0dc95127b5351acf16b37 /iw/profile_gui.py | |
parent | ui/mirrorselect.glade: forgot to save the intro_label (diff) | |
download | anaconda-c17fa85feb9b5da645969a0fd96c3873e4e7c80b.tar.gz anaconda-c17fa85feb9b5da645969a0fd96c3873e4e7c80b.tar.bz2 anaconda-c17fa85feb9b5da645969a0fd96c3873e4e7c80b.zip |
profile selection
Diffstat (limited to 'iw/profile_gui.py')
-rw-r--r-- | iw/profile_gui.py | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/iw/profile_gui.py b/iw/profile_gui.py new file mode 100644 index 0000000..79ed4a3 --- /dev/null +++ b/iw/profile_gui.py @@ -0,0 +1,64 @@ +# +# profile_gui.py: gui profile selection. +# +# Copyright (C) 2011 wiktor w brodlo +# Copyright (C) 2011 Gentoo Foundation +# +# 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/>. +# + +import string +import gtk +import gtk.glade +import gtk.gdk +import gobject +import pango +import sys +import gui +import subprocess + +from iw_gui import * + +from constants import * +import gettext +_ = lambda x: gettext.ldgettext("anaconda", x) + +class ProfileWindow(InstallWindow): + def getNext(self): + return None + + def getScreen(self, anaconda): + self.anaconda = anaconda + self.intf = anaconda.intf + + (self.xml, self.align) = gui.getGladeWidget("profile.glade", "profile_align") + + out = subprocess.check_output(["eselect", "profile", "list"]) + lines = out.split("\n") + del lines[0] + + profiles = [] + for line in lines: + s = line.split() + if s != []: + profiles.append(s[1]) + + box = self.xml.get_widget("profiles_box") + + for profile in profiles: + cb = gtk.CheckButton(label=profile) + box.pack_start(cb) + + return self.align + |