def __call__(self, screen, anaconda):
        self.screen = screen
        self.dispatch = anaconda.dispatch
        self.bl = anaconda.id.bootloader

        newToLibata = self._ideToLibata(anaconda.rootPath)
        (self.type, self.bootDev) = \
                    checkbootloader.getBootloaderTypeAndBoot(anaconda.rootPath, storage=anaconda.id.storage)

        blradio = RadioGroup()

        (update, nobl) = (0, 0)
        if self.dispatch.stepInSkipList("instbootloader"):
            nobl = 1
        elif not (newToLibata or self.type is None or self.bootDev is None):
            update = 1

        if newToLibata or self.type is None or self.bootDev is None:
            if newToLibata:
                t = TextboxReflowed(53,
                    _("Due to system changes, your boot loader "
                      "configuration can not be automatically updated."))
            else:
                t = TextboxReflowed(53,
                  _("The installer is unable to detect the boot loader "
                    "currently in use on your system."))
            

            self.update_radio = blradio.add(_("Update boot loader configuration"),
                                            "update", update)
            self.update_radio.w.checkboxSetFlags(FLAG_DISABLED, FLAGS_SET)
            nobl = 1
        else:
            t = TextboxReflowed(53,
                                _("The installer has detected the %(type)s "
                                  "boot loader currently installed on "
                                  "%(bootDev)s.")
                                % {'type': self.type, 'bootDev': self.bootDev})

            self.update_radio = blradio.add(_("Update boot loader configuration"),
                                            "update", update)

        self.nobl_radio = blradio.add(_("Skip boot loader updating"),
                                      "nobl", nobl)

        buttons = ButtonBar(screen, [TEXT_OK_BUTTON, TEXT_BACK_BUTTON])

        grid = GridFormHelp(screen, _("Upgrade Boot Loader Configuration"),
                            "bl-upgrade", 1, 5)

        grid.add(t, 0, 0, (0,0,0,1))
        grid.add(self.update_radio, 0, 1, (0,0,0,0))
        grid.add(self.nobl_radio, 0, 2, (0,0,0,0))
        grid.add(buttons, 0, 3, growx = 1)


        while 1:
            result = grid.run()

            button = buttons.buttonPressed(result)

            if button == TEXT_BACK_CHECK:
                screen.popWindow()
                return INSTALL_BACK        

            if blradio.getSelection() == "nobl":                           
                self.dispatch.skipStep("bootloadersetup", skip = 1)
                self.dispatch.skipStep("bootloader", skip = 1)
                self.dispatch.skipStep("bootloaderadvanced", skip = 1)
                self.dispatch.skipStep("instbootloader", skip = 1)
            else:
                self.dispatch.skipStep("bootloadersetup", skip = 0)
                self.dispatch.skipStep("bootloader", skip = 1)
                self.dispatch.skipStep("bootloaderadvanced", skip = 1)
                self.dispatch.skipStep("instbootloader", skip = 0)
                self.bl.doUpgradeOnly = 1

                if self.type == "GRUB":
                    self.bl.useGrubVal = 1
                else:
                    self.bl.useGrubVal = 0
                self.bl.setDevice(devicePathToName(self.bootDev))



            screen.popWindow()
            return INSTALL_OK
def writeBootloader(anaconda):
    def dosync():
        isys.sync()
        isys.sync()
        isys.sync()

    if anaconda.bootloader.defaultDevice == -1:
        return

    if anaconda.bootloader.doUpgradeOnly:
        (bootType, theDev) = checkbootloader.getBootloaderTypeAndBoot(anaconda.rootPath, storage=anaconda.storage)
        
        anaconda.bootloader.doUpgradeonly = 1
        if bootType == "GRUB":
            if theDev.startswith('/dev/md'):
                theDev = fixedMdraidGrubTarget(anaconda,
                                               devicePathToName(theDev))
            anaconda.bootloader.useGrubVal = 1
            anaconda.bootloader.setDevice(devicePathToName(theDev))
        else:
            anaconda.bootloader.doUpgradeOnly = 0    

    w = anaconda.intf.waitWindow(_("Bootloader"), _("Installing bootloader."))

    kernelList = []
    otherList = []
    # getDefault needs to return a device, but that's too invasive for now.
    rootDev = anaconda.storage.rootDevice

    if not anaconda.bootloader.images.getDefault():
        defaultDev = None
    else:
        defaultDev = anaconda.storage.devicetree.getDeviceByName(anaconda.bootloader.images.getDefault())

    kernelLabel = None
    kernelLongLabel = None

    for (dev, (label, longlabel, type)) in anaconda.bootloader.images.getImages().items():
        if (rootDev is None and kernelLabel is None) or (dev == rootDev.name):
	    kernelLabel = label
            kernelLongLabel = longlabel
	elif (not defaultDev and not dev) or (defaultDev and dev == defaultDev.name):
	    otherList = [(label, longlabel, dev)] + otherList
	else:
	    otherList.append((label, longlabel, dev))

    if kernelLabel is None:
        log.error("unable to find default image, bailing")
        w.pop()
        return

    plainLabelUsed = 0
    defkern = "kernel"
    for (version, arch, nick) in \
            anaconda.backend.kernelVersionList(anaconda.rootPath):
	if plainLabelUsed:
            kernelList.append(("%s-%s" %(kernelLabel, nick),
                               "%s-%s" %(kernelLongLabel, nick),
                               version))
	else:
	    kernelList.append((kernelLabel, kernelLongLabel, version))
            if nick != "base":
                defkern = "kernel-%s" %(nick,)
	    plainLabelUsed = 1

    f = open(anaconda.rootPath + "/etc/sysconfig/kernel", "w+")
    f.write("# UPDATEDEFAULT specifies if new-kernel-pkg should make\n"
            "# new kernels the default\n")
    # only update the default if we're setting the default to linux (#156678)
    if (not defaultDev and not rootDev) or (defaultDev and rootDev.name == defaultDev.name):
        f.write("UPDATEDEFAULT=yes\n")
    else:
        f.write("UPDATEDEFAULT=no\n")        
    f.write("\n")
    f.write("# DEFAULTKERNEL specifies the default kernel package type\n")
    f.write("DEFAULTKERNEL=%s\n" %(defkern,))
    f.close()

    dosync()
    try:
        rc = anaconda.bootloader.write(anaconda.rootPath, anaconda.bootloader,
                                       kernelList, otherList, defaultDev)
        w.pop()

        if rc and anaconda.intf:
            anaconda.intf.messageWindow(_("Warning"),
                               _("There was an error installing the bootloader.  "
                                 "The system may not be bootable."))
    except booty.BootyNoKernelWarning:
        w.pop()
        if anaconda.intf:
            anaconda.intf.messageWindow(_("Warning"),
                               _("No kernel packages were installed on the "
                                 "system.  Bootloader configuration "
                                 "will not be changed."))

    dosync()
    def __call__(self, screen, anaconda):
        self.screen = screen
        self.dispatch = anaconda.dispatch
        self.bl = anaconda.id.bootloader

        newToLibata = self._ideToLibata(anaconda.rootPath)
        (self.type, self.bootDev) = \
                    checkbootloader.getBootloaderTypeAndBoot(anaconda.rootPath, storage=anaconda.id.storage)

        blradio = RadioGroup()

        (update, nobl) = (0, 0)
        if self.dispatch.stepInSkipList("instbootloader"):
            nobl = 1
        elif not (newToLibata or self.type is None or self.bootDev is None):
            update = 1

        if newToLibata or self.type is None or self.bootDev is None:
            if newToLibata:
                t = TextboxReflowed(
                    53,
                    _("Due to system changes, your boot loader "
                      "configuration can not be automatically updated."))
            else:
                t = TextboxReflowed(
                    53,
                    _("The installer is unable to detect the boot loader "
                      "currently in use on your system."))

            self.update_radio = blradio.add(
                _("Update boot loader configuration"), "update", update)
            self.update_radio.w.checkboxSetFlags(FLAG_DISABLED, FLAGS_SET)
            nobl = 1
        else:
            t = TextboxReflowed(
                53,
                _("The installer has detected the %(type)s "
                  "boot loader currently installed on "
                  "%(bootDev)s.") % {
                      'type': self.type,
                      'bootDev': self.bootDev
                  })

            self.update_radio = blradio.add(
                _("Update boot loader configuration"), "update", update)

        self.nobl_radio = blradio.add(_("Skip boot loader updating"), "nobl",
                                      nobl)

        buttons = ButtonBar(screen, [TEXT_OK_BUTTON, TEXT_BACK_BUTTON])

        grid = GridFormHelp(screen, _("Upgrade Boot Loader Configuration"),
                            "bl-upgrade", 1, 5)

        grid.add(t, 0, 0, (0, 0, 0, 1))
        grid.add(self.update_radio, 0, 1, (0, 0, 0, 0))
        grid.add(self.nobl_radio, 0, 2, (0, 0, 0, 0))
        grid.add(buttons, 0, 3, growx=1)

        while 1:
            result = grid.run()

            button = buttons.buttonPressed(result)

            if button == TEXT_BACK_CHECK:
                screen.popWindow()
                return INSTALL_BACK

            if blradio.getSelection() == "nobl":
                self.dispatch.skipStep("bootloadersetup", skip=1)
                self.dispatch.skipStep("bootloader", skip=1)
                self.dispatch.skipStep("bootloaderadvanced", skip=1)
                self.dispatch.skipStep("instbootloader", skip=1)
            else:
                self.dispatch.skipStep("bootloadersetup", skip=0)
                self.dispatch.skipStep("bootloader", skip=1)
                self.dispatch.skipStep("bootloaderadvanced", skip=1)
                self.dispatch.skipStep("instbootloader", skip=0)
                self.bl.doUpgradeOnly = 1

                if self.type == "GRUB":
                    self.bl.useGrubVal = 1
                else:
                    self.bl.useGrubVal = 0
                self.bl.setDevice(devicePathToName(self.bootDev))

            screen.popWindow()
            return INSTALL_OK
Exemple #4
0
    def getScreen(self, anaconda):
        self.dispatch = anaconda.dispatch
        self.bl = anaconda.bootloader

        newToLibata = self._newToLibata(anaconda.rootPath)

        (self.type, self.bootDev) = \
                    checkbootloader.getBootloaderTypeAndBoot(anaconda.rootPath, storage=anaconda.storage)

        self.update_radio = gtk.RadioButton(
            None, _("_Update boot loader configuration"))
        updatestr = _("This will update your current boot loader.")

        if newToLibata or (self.type is None or self.bootDev is None):
            if newToLibata:
                current = _("Due to system changes, your boot loader "
                            "configuration can not be automatically updated.")
            else:
                current = _(
                    "The installer is unable to detect the boot loader "
                    "currently in use on your system.")
            self.update_label = gtk.Label("%s" % (updatestr, ))
            self.update_radio.set_sensitive(False)
            self.update_label.set_sensitive(False)
            update = 0
        else:
            current = _("The installer has detected the %(type)s boot loader "
                        "currently installed on %(bootDev)s.") \
                      % {'type': self.type, 'bootDev': self.bootDev}
            self.update_label = gtk.Label(
                "%s  %s" % (updatestr, _("This is the recommended option.")))
            self.update_radio.set_active(False)
            update = 1

        self.newbl_radio = gtk.RadioButton(
            self.update_radio, _("_Create new boot loader "
                                 "configuration"))
        self.newbl_label = gtk.Label(
            _("This option creates a "
              "new boot loader configuration.  If "
              "you wish to switch boot loaders, you "
              "should choose this."))

        self.newbl_radio.set_active(False)
        self.nobl_radio = gtk.RadioButton(self.update_radio,
                                          _("_Skip boot loader updating"))
        self.nobl_label = gtk.Label(
            _("This option makes no changes to boot "
              "loader configuration.  If you are "
              "using a third party boot loader, you "
              "should choose this."))
        self.nobl_radio.set_active(False)

        for label in [self.update_label, self.nobl_label, self.newbl_label]:
            label.set_alignment(0.8, 0)
            label.set_size_request(275, -1)
            label.set_line_wrap(True)

        str = _("What would you like to do?")
        # if they have one, the default is to update, otherwise the
        # default is to not touch anything
        if update == 1:
            default = self.update_radio
        elif newToLibata:
            default = self.newbl_radio
        else:
            default = self.nobl_radio

        if not self.dispatch.stepInSkipList("bootloader"):
            self.newbl_radio.set_active(True)
        elif self.dispatch.stepInSkipList("instbootloader"):
            self.nobl_radio.set_active(True)
        else:
            default.set_active(True)

        box = gtk.VBox(False, 5)

        label = gtk.Label(current)
        label.set_line_wrap(True)
        label.set_alignment(0.5, 0.0)
        label.set_size_request(300, -1)
        label2 = gtk.Label(str)
        label2.set_line_wrap(True)
        label2.set_alignment(0.5, 0.0)
        label2.set_size_request(300, -1)

        box.pack_start(label, False)
        box.pack_start(label2, False, padding=10)

        box.pack_start(self.update_radio, False)
        box.pack_start(self.update_label, False)
        box.pack_start(self.nobl_radio, False)
        box.pack_start(self.nobl_label, False)
        box.pack_start(self.newbl_radio, False)
        box.pack_start(self.newbl_label, False)

        a = gtk.Alignment(0.2, 0.1)
        a.add(box)

        return a
Exemple #5
0
def writeBootloader(anaconda):
    def dosync():
        isys.sync()
        isys.sync()
        isys.sync()

    if anaconda.id.bootloader.defaultDevice == -1:
        return

    # Append extra bootloader args that the install class provides, but do not
    # append them if they duplicate ones already there.  So, args provided by
    # the bootloader kickstart command take precedence over internal ones.
    for extraArg in anaconda.id.instClass.bootloaderExtraArgs:
        if '=' in extraArg:
            extra = extraArg.split('=')[0]
        else:
            extra = extraArg

        # We have to do it this way to catch both standalone arguments and
        # those that take a value.
        found = False
        for arg in anaconda.id.bootloader.args.appendArgs:
            if extra == arg or arg.startswith(extra+"="):
                found = True
                break

        if not found:
            anaconda.id.bootloader.args.append(extraArg)

    if anaconda.id.bootloader.doUpgradeOnly:
        (bootType, theDev) = checkbootloader.getBootloaderTypeAndBoot(anaconda.rootPath, storage=anaconda.id.storage)
        
        anaconda.id.bootloader.doUpgradeonly = 1
        if bootType == "GRUB":
            if theDev.startswith('/dev/md'):
                theDev = fixedMdraidGrubTarget(anaconda,
                                               devicePathToName(theDev))
            anaconda.id.bootloader.useGrubVal = 1
            anaconda.id.bootloader.setDevice(devicePathToName(theDev))
        else:
            anaconda.id.bootloader.doUpgradeOnly = 0    

    """w = anaconda.intf.waitWindow(_("Bootloader"), _("Installing bootloader."))"""
    w = anaconda.intf.waitWindow(_("Bootloader"), _(u"正在装载引导程序..."))

    kernelList = []
    otherList = []
    # getDefault needs to return a device, but that's too invasive for now.
    rootDev = anaconda.id.storage.rootDevice

    if not anaconda.id.bootloader.images.getDefault():
        defaultDev = None
    else:
        defaultDev = anaconda.id.storage.devicetree.getDeviceByName(anaconda.id.bootloader.images.getDefault())

    kernelLabel = None
    kernelLongLabel = None

    for (dev, (label, longlabel, type)) in anaconda.id.bootloader.images.getImages().items():
        if (rootDev is None and kernelLabel is None) or (dev == rootDev.name):
	    kernelLabel = label
            kernelLongLabel = longlabel
	elif (not defaultDev and not dev) or (defaultDev and dev == defaultDev.name):
	    otherList = [(label, longlabel, dev)] + otherList
	else:
	    otherList.append((label, longlabel, dev))

    if kernelLabel is None:
        log.error("unable to find default image, bailing")
        w.pop()
        return

    defkern = "kernel"
    for (version, arch, nick) in \
            anaconda.backend.kernelVersionList(anaconda.rootPath):
        if nick != 'base':
            defkern = "kernel-%s" %(nick,)
            kernelList.append(("%s-%s" %(kernelLabel, nick),
                               "%s-%s" %(kernelLongLabel, nick),
                               version))
        else:
            kernelList.append((kernelLabel, kernelLongLabel, version))

    f = open(anaconda.rootPath + "/etc/sysconfig/kernel", "w+")
    f.write("# UPDATEDEFAULT specifies if new-kernel-pkg should make\n"
            "# new kernels the default\n")
    # only update the default if we're setting the default to linux (#156678)
    if (not defaultDev and not rootDev) or (defaultDev and rootDev.name == defaultDev.name):
        f.write("UPDATEDEFAULT=yes\n")
    else:
        f.write("UPDATEDEFAULT=no\n")        
    f.write("\n")
    f.write("# DEFAULTKERNEL specifies the default kernel package type\n")
    f.write("DEFAULTKERNEL=%s\n" %(defkern,))
    f.close()

    dosync()
    try:
        rc = anaconda.id.bootloader.write(anaconda.rootPath, anaconda.id.bootloader,
                                          kernelList, otherList, defaultDev)
        w.pop()

        if rc and anaconda.intf:
            anaconda.intf.messageWindow(_("Warning"),
                               _("There was an error installing the bootloader.  "
                                 "The system may not be bootable."))
    except booty.BootyNoKernelWarning:
        w.pop()
        if anaconda.intf:
            anaconda.intf.messageWindow(_("Warning"),
                               _("No kernel packages were installed on the "
                                 "system.  Bootloader configuration "
                                 "will not be changed."))

    dosync()
Exemple #6
0
def writeBootloader(anaconda):
    def dosync():
        isys.sync()
        isys.sync()
        isys.sync()

    if anaconda.id.bootloader.defaultDevice == -1:
        return

    # Append extra bootloader args that the install class provides, but do not
    # append them if they duplicate ones already there.  So, args provided by
    # the bootloader kickstart command take precedence over internal ones.
    for extraArg in anaconda.id.instClass.bootloaderExtraArgs:
        if '=' in extraArg:
            extra = extraArg.split('=')[0]
        else:
            extra = extraArg

        # We have to do it this way to catch both standalone arguments and
        # those that take a value.
        found = False
        for arg in anaconda.id.bootloader.args.appendArgs:
            if extra == arg or arg.startswith(extra + "="):
                found = True
                break

        if not found:
            anaconda.id.bootloader.args.append(extraArg)

    if anaconda.id.bootloader.doUpgradeOnly:
        (bootType, theDev) = checkbootloader.getBootloaderTypeAndBoot(
            anaconda.rootPath, storage=anaconda.id.storage)

        if bootType == "GRUB":
            if theDev.startswith('/dev/md'):
                theDev = fixedMdraidGrubTarget(anaconda,
                                               devicePathToName(theDev))
            anaconda.id.bootloader.useGrubVal = 1
            anaconda.id.bootloader.setDevice(devicePathToName(theDev))
        elif bootType == "ZIPL":
            anaconda.id.bootloader.images.setup(anaconda.id.storage)
        else:
            anaconda.id.bootloader.doUpgradeOnly = 0
            anaconda.id.bootloader.images.setup(anaconda.id.storage)

    w = anaconda.intf.waitWindow(_("Bootloader"), _("Installing bootloader."))

    kernelList = []
    otherList = []
    # getDefault needs to return a device, but that's too invasive for now.
    rootDev = anaconda.id.storage.rootDevice

    if not anaconda.id.bootloader.images.getDefault():
        defaultDev = None
    else:
        defaultDev = anaconda.id.storage.devicetree.getDeviceByName(
            anaconda.id.bootloader.images.getDefault())

    kernelLabel = None
    kernelLongLabel = None

    for (dev, (label, longlabel,
               type)) in anaconda.id.bootloader.images.getImages().items():
        if (rootDev is None and kernelLabel is None) or (dev == rootDev.name):
            kernelLabel = label
            kernelLongLabel = longlabel
        elif (not defaultDev and not dev) or (defaultDev
                                              and dev == defaultDev.name):
            otherList = [(label, longlabel, dev)] + otherList
        else:
            otherList.append((label, longlabel, dev))

    if kernelLabel is None:
        log.error("unable to find default image, bailing")
        w.pop()
        return

    defkern = "kernel"
    for (version, arch, nick) in \
            anaconda.backend.kernelVersionList(anaconda.rootPath):
        if nick != 'base':
            if nick != 'kdump':
                defkern = "kernel-%s" % (nick, )
            kernelList.append(("%s-%s" % (kernelLabel, nick),
                               "%s-%s" % (kernelLongLabel, nick), version))
        else:
            kernelList.append((kernelLabel, kernelLongLabel, version))

    f = open(anaconda.rootPath + "/etc/sysconfig/kernel", "w+")
    f.write("# UPDATEDEFAULT specifies if new-kernel-pkg should make\n"
            "# new kernels the default\n")
    # only update the default if we're setting the default to linux (#156678)
    if (not defaultDev
            and not rootDev) or (defaultDev
                                 and rootDev.name == defaultDev.name):
        f.write("UPDATEDEFAULT=yes\n")
    else:
        f.write("UPDATEDEFAULT=no\n")
    f.write("\n")
    f.write("# DEFAULTKERNEL specifies the default kernel package type\n")
    f.write("DEFAULTKERNEL=%s\n" % (defkern, ))
    if anaconda.id.bootloader.trusted_boot:
        f.write("# HYPERVISOR specifies the default multiboot kernel\n")
        f.write("HYPERVISOR=/boot/tboot.gz\n")
        f.write("HYPERVISOR_ARGS=logging=vga,serial,memory\n")
    f.close()

    dosync()
    try:
        rc = anaconda.id.bootloader.write(anaconda.rootPath,
                                          anaconda.id.bootloader, kernelList,
                                          otherList, defaultDev)
        w.pop()

        if rc and anaconda.intf:
            anaconda.intf.messageWindow(
                _("Warning"),
                _("There was an error installing the bootloader.  "
                  "The system may not be bootable."))
    except booty.BootyNoKernelWarning:
        w.pop()
        if anaconda.intf:
            anaconda.intf.messageWindow(
                _("Warning"),
                _("No kernel packages were installed on the "
                  "system.  Bootloader configuration "
                  "will not be changed."))
    except RuntimeError:
        w.pop()
        if anaconda.intf:
            anaconda.intf.messageWindow(
                _("Warning"),
                _("There was an error installing the bootloader.  "
                  "The system may not be bootable"))

    dosync()
    def getScreen(self, anaconda):
        self.dispatch = anaconda.dispatch
        self.bl = anaconda.bootloader

        newToLibata = self._newToLibata(anaconda.rootPath)

        (self.type, self.bootDev) = \
                    checkbootloader.getBootloaderTypeAndBoot(anaconda.rootPath, storage=anaconda.storage)

        self.update_radio = gtk.RadioButton(None, _("_Update boot loader configuration"))
        updatestr = _("This will update your current boot loader.")

        if newToLibata or (self.type is None or self.bootDev is None):
            if newToLibata:
                current = _("Due to system changes, your boot loader "
                            "configuration can not be automatically updated.")
            else:
                current = _("The installer is unable to detect the boot loader "
                            "currently in use on your system.")
            self.update_label = gtk.Label("%s" % (updatestr,))
            self.update_radio.set_sensitive(False)
            self.update_label.set_sensitive(False)
            update = 0
        else:
            current = _("The installer has detected the %(type)s boot loader "
                        "currently installed on %(bootDev)s.") \
                      % {'type': self.type, 'bootDev': self.bootDev}
            self.update_label = gtk.Label("%s  %s" % (updatestr,
                                         _("This is the recommended option.")))
            self.update_radio.set_active(False)
            update = 1

        self.newbl_radio = gtk.RadioButton(self.update_radio,
                                          _("_Create new boot loader "
                                            "configuration"))
        self.newbl_label = gtk.Label(_("This option creates a "
                                      "new boot loader configuration.  If "
                                      "you wish to switch boot loaders, you "
                                      "should choose this."))

        self.newbl_radio.set_active(False)
        self.nobl_radio = gtk.RadioButton(self.update_radio,
                                         _("_Skip boot loader updating"))
        self.nobl_label = gtk.Label(_("This option makes no changes to boot "
                                     "loader configuration.  If you are "
                                     "using a third party boot loader, you "
                                     "should choose this."))
        self.nobl_radio.set_active(False)

        for label in [self.update_label, self.nobl_label, self.newbl_label]:
            label.set_alignment(0.8, 0)
            label.set_size_request(275, -1)
            label.set_line_wrap(True)

        str = _("What would you like to do?")
        # if they have one, the default is to update, otherwise the
        # default is to not touch anything
        if update == 1:
            default = self.update_radio
        elif newToLibata:
            default = self.newbl_radio
        else:
            default = self.nobl_radio

        if not self.dispatch.stepInSkipList("bootloader"):
            self.newbl_radio.set_active(True)
        elif self.dispatch.stepInSkipList("instbootloader"):
            self.nobl_radio.set_active(True)
        else:
            default.set_active(True)

        box = gtk.VBox(False, 5)

        label = gtk.Label(current)
        label.set_line_wrap(True)
        label.set_alignment(0.5, 0.0)
        label.set_size_request(300, -1)
        label2 = gtk.Label(str)
        label2.set_line_wrap(True)
        label2.set_alignment(0.5, 0.0)
        label2.set_size_request(300, -1)

        box.pack_start(label, False)
        box.pack_start(label2, False, padding = 10)

        box.pack_start(self.update_radio, False)
        box.pack_start(self.update_label, False)
        box.pack_start(self.nobl_radio, False)
        box.pack_start(self.nobl_label, False)
        box.pack_start(self.newbl_radio, False)
        box.pack_start(self.newbl_label, False)

        a = gtk.Alignment(0.2, 0.1)
        a.add(box)

        return a