~ubuntu-branches/ubuntu/utopic/system-config-kickstart/utopic

« back to all changes in this revision

Viewing changes to src/bootloader.py

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2005-04-04 15:16:36 UTC
  • Revision ID: james.westby@ubuntu.com-20050404151636-gn0gdb1guqohkdcs
Tags: 2.5.20-0ubuntu10
* Add basic package group selection, just ubuntu-desktop and
  kubuntu-desktop for now (closes: #8467).
* Make "Install Everything" checkbox invisible.
* Replace gtk.FALSE and gtk.TRUE with False and True respectively.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
##
27
27
## I18N
28
28
## 
29
 
from rhpl.translate import _, N_
30
 
import rhpl.translate as translate
 
29
import gettext
31
30
domain = 'system-config-kickstart'
32
 
translate.textdomain (domain)
 
31
gettext.bindtextdomain(domain, '/usr/share/locale')
 
32
gettext.textdomain(domain)
 
33
_ = gettext.gettext
33
34
gtk.glade.bindtextdomain(domain)
34
35
 
35
36
import kickstartGui
71
72
        self.grub_password_hbox.set_sensitive(self.grub_password_checkbutton.get_active())
72
73
 
73
74
    def platformTypeChanged(self, platform):
74
 
        if platform != "x86, AMD64, or Intel EM64T":
 
75
        if platform != "x86" and platform != "AMD64 or Intel EM64T":
75
76
            self.bootloader_vbox.hide()
76
77
            self.bootloader_label.set_text(_("Bootloader options are not applicable to "
77
78
                                             "the %s platform" % platform))
95
96
            if length > 0:
96
97
                buf = buf + "--append " + params + " "
97
98
 
98
 
            if self.grub_password_checkbutton.get_active() == gtk.TRUE:
 
99
            if self.grub_password_checkbutton.get_active() == True:
99
100
                gp = string.strip (self.grub_password_entry.get_text())
100
101
                cp = string.strip (self.grub_password_confirm.get_text())
101
102
                length = len(gp)
116
117
                        dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_WARNING, gtk.BUTTONS_OK,
117
118
                                                (_("Grub passwords do not match.  Please try again.")))
118
119
                        dlg.set_position(gtk.WIN_POS_CENTER)
119
 
                        dlg.set_modal(gtk.TRUE)
 
120
                        dlg.set_modal(True)
120
121
                        dlg.set_icon(kickstartGui.iconPixbuf)
121
122
                        dlg.run()
122
123
                        dlg.destroy()
143
144
        for item in list:
144
145
            if item[:11] == "--location=":
145
146
                if item[11:] == "none":
146
 
                    self.no_bootloader_radio.set_active(gtk.TRUE)
 
147
                    self.no_bootloader_radio.set_active(True)
147
148
                elif item[11:] == "mbr":
148
 
                    self.mbr_radiobutton.set_active(gtk.TRUE)
 
149
                    self.mbr_radiobutton.set_active(True)
149
150
                elif item[11:] == "partition":
150
 
                    self.firstsector_radiobutton.set_active(gtk.TRUE)
 
151
                    self.firstsector_radiobutton.set_active(True)
151
152
 
152
153
            if item[:10] == "--password":
153
154
                self.grub_password_entry.set_text(item[10:])
157
158
            self.parameters_entry.set_text(list[list.index(item)])
158
159
 
159
160
        if "--md5pass" in list:
160
 
            self.grub_password_encrypt_checkbutton.set_active(gtk.TRUE)
 
161
            self.grub_password_encrypt_checkbutton.set_active(True)
161
162
 
162
163
        if "--upgrade" in list:
163
 
            self.upgrade_bootloader_radio.set_active(gtk.TRUE)
 
164
            self.upgrade_bootloader_radio.set_active(True)
164
165