def getScreen(self, anaconda): self.intf = anaconda.intf self.anaconda = anaconda self.hostname = network.getDefaultHostname(anaconda) # load the UI (self.xml, self.align) = gui.getGladeWidget("network.glade", "network_align") self.icon = self.xml.get_widget("icon") self.hostnameEntry = self.xml.get_widget("hostnameEntry") self.hostnameEntry.set_text(self.hostname) # pressing Enter in confirm == clicking Next self.hostnameEntry.connect("activate", lambda w: self.ics.setGrabNext(1)) # load the icon gui.readImageFromFile("network.png", image=self.icon) self.firewallCb = self.xml.get_widget("firewall_check") self.firewallCb.set_active(self.anaconda.network.useFirewall) from sabayon import Entropy from sabayon.const import FIREWALL_PACKAGE if not Entropy().is_installed(FIREWALL_PACKAGE): self.firewallCb.set_visible(False) return self.align
def getScreen(self, anaconda): self.intf = anaconda.intf self.anaconda = anaconda self.hostname = network.getDefaultHostname(anaconda) # load the UI (self.xml, self.align) = gui.getGladeWidget("network.glade", "network_align") self.icon = self.xml.get_widget("icon") self.hostnameEntry = self.xml.get_widget("hostnameEntry") self.hostnameEntry.set_text(self.hostname) self.netconfButton = self.xml.get_widget("netconfButton") self.netconfButton.connect("clicked", self._setupNetwork) if len(self.anaconda.id.network.netdevices) == 0: self.netconfButton.set_sensitive(False) # pressing Enter in confirm == clicking Next self.hostnameEntry.connect("activate", lambda w: self.ics.setGrabNext(1)) # load the icon gui.readImageFromFile("network.png", image=self.icon) return self.align
def getScreen(self, anaconda): self.intf = anaconda.intf self.anaconda = anaconda self.hostname = network.getDefaultHostname(anaconda) # load the UI (self.xml, self.align) = gui.getGladeWidget("network.glade", "network_align") self.icon = self.xml.get_widget("icon") self.hostnameEntry = self.xml.get_widget("hostnameEntry") self.hostnameEntry.set_text(self.hostname) self.netconfButton = self.xml.get_widget("netconfButton") self.netconfButton.connect("clicked", self._netconfButton_clicked) if len(self.anaconda.id.network.netdevices) == 0: self.netconfButton.set_sensitive(False) # pressing Enter in confirm == clicking Next self.hostnameEntry.connect("activate", lambda w: self.ics.setGrabNext(1)) # load the icon gui.readImageFromFile("network.png", image=self.icon) return self.align
def getScreen(self, anaconda): self.anaconda = anaconda self.intf = anaconda.intf (self.xml, self.align) = gui.getGladeWidget("user.glade", "account_align") self.icon = self.xml.get_widget("icon") self.capslock = self.xml.get_widget("capslock") self.pwlabel = self.xml.get_widget("pwlabel") self.pw = self.xml.get_widget("pw") self.username = self.xml.get_widget("username") self.fullname = self.xml.get_widget("fullname") self.confirmlabel = self.xml.get_widget("confirmlabel") self.confirm = self.xml.get_widget("confirm") self.usernamelabel = self.xml.get_widget("usernamelabel") self.fullnamelabel = self.xml.get_widget("fullnamelabel") # load the icon gui.readImageFromFile("root-password.png", image=self.icon) # connect hotkeys self.pwlabel.set_text_with_mnemonic(_("_Password:"******"_Confirm:")) self.confirmlabel.set_mnemonic_widget(self.confirm) self.usernamelabel.set_text_with_mnemonic(_("_Username:"******"_Full name:")) self.fullnamelabel.set_mnemonic_widget(self.fullname) # watch for Caps Lock so we can warn the user self.intf.icw.window.connect( "key-release-event", lambda w, e: self.handleCapsLockRelease(w, e, self.capslock)) # we might have a root password already live_user_data = self.anaconda.users.otherUsers.get(LIVE_USER, {}) self.pw.set_text(live_user_data.get('password', '')) self.confirm.set_text(live_user_data.get('password', '')) self.username.set_text(live_user_data.get('username', '')) self.fullname.set_text(live_user_data.get('fullname', '')) # pressing Enter in confirm == clicking Next vbox = self.xml.get_widget("account_box") self.confirm.connect("activate", lambda widget, vbox=vbox: self.ics.setGrabNext(1)) # set initial caps lock label text self.setCapsLockLabel() return self.align
def getScreen(self, anaconda): self.intf = anaconda.intf self.anaconda = anaconda self.hostname = network.getDefaultHostname(anaconda) # load the UI (self.xml, self.align) = gui.getGladeWidget("network_euca.glade", "network_align") self.icon = self.xml.get_widget("icon") self.hostnameEntry = self.xml.get_widget("hostnameEntry") self.hostnameEntry.set_text(self.hostname) self.netconfButton = self.xml.get_widget("netconfButton") self.netconfButton.connect("clicked", self._netconfButton_clicked) if len(self.anaconda.id.network.netdevices) == 0: self.netconfButton.set_sensitive(False) # pressing Enter in confirm == clicking Next self.hostnameEntry.connect("activate", lambda w: self.ics.setGrabNext(1)) self.netifCombo = self.xml.get_widget("netifcombo") cell = gtk.CellRendererText() self.ipaddr = self.xml.get_widget("ipaddr") self.netmask = self.xml.get_widget("netmask") self.defaultgw = self.xml.get_widget("defaultgw") self.netifCombo.set_model(gtk.ListStore(gobject.TYPE_STRING)) self.netifCombo.pack_start(cell) self.netifCombo.add_attribute(cell, 'text', 0) for dev in anaconda.id.network.netdevices.keys(): self.netifCombo.append_text(dev) self.netifCombo.set_active(0) self.netifCombo.connect("changed", self._netifCombo_changed) self.dhcpCombo = self.xml.get_widget("dhcpcombo") self.dhcpCombo.connect("changed", self._dhcpCombo_changed) self.dnsserver = self.xml.get_widget("dnsserver") # load current network settings self._netifCombo_changed() # Only reset to Static mode when we are going forward. # A little hacky, but good enough for now. if anaconda.dir == DISPATCH_FORWARD: self.dhcpCombo.set_active(0) self._dhcpCombo_changed() # load the icon gui.readImageFromFile("network.png", image=self.icon) return self.align
def getScreen(self, anaconda): self.anaconda = anaconda self.intf = anaconda.intf (self.xml, self.align) = gui.getGladeWidget("user.glade", "account_align") self.icon = self.xml.get_widget("icon") self.capslock = self.xml.get_widget("capslock") self.pwlabel = self.xml.get_widget("pwlabel") self.pw = self.xml.get_widget("pw") self.username = self.xml.get_widget("username") self.fullname = self.xml.get_widget("fullname") self.confirmlabel = self.xml.get_widget("confirmlabel") self.confirm = self.xml.get_widget("confirm") self.usernamelabel = self.xml.get_widget("usernamelabel") self.fullnamelabel = self.xml.get_widget("fullnamelabel") # load the icon gui.readImageFromFile("root-password.png", image=self.icon) # connect hotkeys self.pwlabel.set_text_with_mnemonic(_("_Password:"******"_Confirm:")) self.confirmlabel.set_mnemonic_widget(self.confirm) self.usernamelabel.set_text_with_mnemonic(_("_Username:"******"_Full name:")) self.fullnamelabel.set_mnemonic_widget(self.fullname) # watch for Caps Lock so we can warn the user self.intf.icw.window.connect("key-release-event", lambda w, e: self.handleCapsLockRelease(w, e, self.capslock)) # we might have a root password already live_user_data = self.anaconda.users.otherUsers.get(LIVE_USER, {}) self.pw.set_text(live_user_data.get('password', '')) self.confirm.set_text(live_user_data.get('password', '')) self.username.set_text(live_user_data.get('username', '')) self.fullname.set_text(live_user_data.get('fullname', '')) # pressing Enter in confirm == clicking Next vbox = self.xml.get_widget("account_box") self.confirm.connect("activate", lambda widget, vbox=vbox: self.ics.setGrabNext(1)) # set initial caps lock label text self.setCapsLockLabel() return self.align
def getScreen (self, anaconda): hbox = gtk.HBox (False, 5) pix = gui.readImageFromFile ("done.png") if pix: a = gtk.Alignment () a.add (pix) a.set (0.5, 0.5, 1.0, 1.0) a.set_size_request(200, -1) hbox.pack_start (a, False, False, 36) bootstr = "" if rhpl.getArch() in ['s390', 's390x']: floppystr = "" if not anaconda.canReIPL: self.rebootButton.set_label(_("Shutdown")) if not anaconda.reIPLMessage is None: floppystr = anaconda.reIPLMessage else: floppystr = _("Remove any media used during the installation " "process and press the \"Reboot\" button to " "reboot your system." "\n\n") txt = _("Congratulations, the installation is complete.\n\n" "%s%s") %(floppystr, bootstr) label = gui.WrappingLabel(txt) hbox.pack_start (label, True, True) gtk.gdk.beep() return hbox
def getScreen(self, labelText, longText): hbox = gtk.HBox(True, 5) box = gtk.VBox(False, 5) pix = gui.readImageFromFile("about-to-install.png") if pix: a = gtk.Alignment() a.add(pix) a.set(0.5, 0.5, 1.0, 1.0) hbox.pack_start(a, False) label = gtk.Label(labelText) label.set_line_wrap(True) label.set_size_request(190, -1) label2 = gtk.Label(longText) label2.set_line_wrap(True) label2.set_size_request(190, -1) box.pack_start(label, False) box.pack_start(label2, False) box.set_border_width(5) a = gtk.Alignment() a.add(box) a.set(0.5, 0.5, 0.0, 0.0) hbox.pack_start(a) return hbox
def getScreen (self, anaconda): pix = gui.readImageFromFile("splash.png", dither=False) box = gtk.EventBox () box.add (pix) #(self.xml, box) = gui.getGladeWidget("install_type.glade", "hbox1") return box
def getScreen (self, labelText, longText): hbox = gtk.HBox (True, 5) box = gtk.VBox (False, 5) pix = gui.readImageFromFile ("about-to-install.png") if pix: a = gtk.Alignment () a.add (pix) a.set (0.5, 0.5, 1.0, 1.0) hbox.pack_start (a, False) label = gtk.Label (labelText) label.set_line_wrap (True) label.set_size_request(190, -1) label2 = gtk.Label (longText) label2.set_line_wrap (True) label2.set_size_request(190, -1) box.pack_start (label, False) box.pack_start (label2, False) box.set_border_width (5) a = gtk.Alignment () a.add (box) a.set (0.5, 0.5, 0.0, 0.0) hbox.pack_start (a) return hbox
def createUpgradeOption(self): r = pixmapRadioButtonGroup() r.addEntry(REINSTALL_STR, _("Fresh Installation"), pixmap=gui.readImageFromFile("install.png"), descr=_("Choose this option to install a fresh copy of %s " "on your system. Existing software and data may " "be overwritten depending on your configuration " "choices.") % productName) r.addEntry(UPGRADE_STR, _("Bootloader Recovery"), pixmap=gui.readImageFromFile("upgrade.png"), descr=_("Choose this option if you would like to recover " "your existing %s system bootloader. This option will " "preserve the existing data on your storage " "device(s).") % productName) return r
def createUpgradeOption(self): r = pixmapRadioButtonGroup() r.addEntry(REINSTALL_STR, _("_Install %s") %(productName,), pixmap=gui.readImageFromFile("install.png"), descr=_("Choose this option to freshly install your system. " "Existing software and data may be overwritten " "depending on your configuration choices.")) r.addEntry(UPGRADE_STR, _("_Upgrade an existing installation"), pixmap=gui.readImageFromFile("upgrade.png"), descr=_("Choose this option if you would like " "to upgrade your existing %s system. " "This option will preserve the " "existing data on your drives.") %(productName,)) return r
def getScreen(self, mouse): self.mouse = mouse self.flags = flags self.ignoreEvents = 0 self.mice = mouse.mouseModels self.serialDevice = None currentDev = mouse.getDevice() currentMouse, emulate3 = mouse.getMouse() # populate the big widgets with the available selections self.setupMice() self.setupDeviceList() self.emulate3 = gtk.CheckButton(_("_Emulate 3 buttons")) self.setCurrent(currentDev, currentMouse, emulate3) # set up the box for this screen box = gtk.VBox(False, 5) box.set_border_width(5) # top header, includes graphic and instructions hbox = gtk.HBox(False, 5) pix = gui.readImageFromFile("gnome-mouse.png") if pix: a = gtk.Alignment() a.add(pix) a.set(0.0, 0.0, 0.0, 0.0) hbox.pack_start(a, False) label = gui.MnemonicLabel( _("Select the appropriate mouse for the system.")) label.set_line_wrap(True) label.set_size_request(350, -1) hbox.pack_start(label, False) box.pack_start(hbox, False) # next is the mouse tree sw = gtk.ScrolledWindow() sw.set_shadow_type(gtk.SHADOW_IN) sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) sw.add(self.mouseview) box.pack_start(sw) label.set_mnemonic_widget(self.mouseview) gui.setupTreeViewFixupIdleHandler(self.mouseview, self.mousestore) # then the port list serial_sw = gtk.ScrolledWindow() serial_sw.set_shadow_type(gtk.SHADOW_IN) serial_sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_NEVER) serial_sw.add(self.devview) box.pack_start(serial_sw, False) # finally the emulate 3 buttons box.pack_start(self.emulate3, False) return box
def getScreen(self, mouse): self.mouse = mouse self.flags = flags self.ignoreEvents = 0 self.mice = mouse.mouseModels self.serialDevice = None currentDev = mouse.getDevice() currentMouse, emulate3 = mouse.getMouse() # populate the big widgets with the available selections self.setupMice() self.setupDeviceList() self.emulate3 = gtk.CheckButton(_("_Emulate 3 buttons")) self.setCurrent(currentDev, currentMouse, emulate3) # set up the box for this screen box = gtk.VBox(False, 5) box.set_border_width(5) # top header, includes graphic and instructions hbox = gtk.HBox(False, 5) pix = gui.readImageFromFile ("gnome-mouse.png") if pix: a = gtk.Alignment() a.add(pix) a.set(0.0, 0.0, 0.0, 0.0) hbox.pack_start(a, False) label = gui.MnemonicLabel(_("Select the appropriate mouse for the system.")) label.set_line_wrap(True) label.set_size_request(350, -1) hbox.pack_start(label, False) box.pack_start(hbox, False) # next is the mouse tree sw = gtk.ScrolledWindow() sw.set_shadow_type(gtk.SHADOW_IN) sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) sw.add(self.mouseview) box.pack_start(sw) label.set_mnemonic_widget(self.mouseview) gui.setupTreeViewFixupIdleHandler(self.mouseview, self.mousestore) # then the port list serial_sw = gtk.ScrolledWindow() serial_sw.set_shadow_type(gtk.SHADOW_IN) serial_sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_NEVER) serial_sw.add(self.devview) box.pack_start(serial_sw, False) # finally the emulate 3 buttons box.pack_start(self.emulate3, False) return box
def createUpgradeOption(self): r = pixmapRadioButtonGroup() r.addEntry(REINSTALL_STR, _("_Install %s") % (productName, ), pixmap=gui.readImageFromFile("install.png"), descr=_( "Choose this option to freshly install your system. " "Existing software and data may be overwritten " "depending on your configuration choices.")) r.addEntry(UPGRADE_STR, _("_Upgrade an existing installation"), pixmap=gui.readImageFromFile("upgrade.png"), descr=_("Choose this option if you would like " "to upgrade your existing %s system. " "This option will preserve the " "existing data on your drives.") % (productName, )) return r
def getScreen(self, anaconda): self.rootPassword = anaconda.id.rootPassword self.intf = anaconda.intf (self.xml, self.align) = gui.getGladeWidget("account.glade", "account_align") self.icon = self.xml.get_widget("icon") self.capslock = self.xml.get_widget("capslock") self.pwlabel = self.xml.get_widget("pwlabel") self.pw = self.xml.get_widget("pw") self.confirmlabel = self.xml.get_widget("confirmlabel") self.confirm = self.xml.get_widget("confirm") # load the icon gui.readImageFromFile("root-password.png", image=self.icon) # connect hotkeys self.pwlabel.set_text_with_mnemonic(_("Root _Password:"******"_Confirm:")) self.confirmlabel.set_mnemonic_widget(self.confirm) # watch for Caps Lock so we can warn the user self.intf.icw.window.connect("key-release-event", lambda w, e: self.handleCapsLockRelease(w, e, self.capslock)) # we might have a root password already if not self.rootPassword['isCrypted']: self.pw.set_text(self.rootPassword['password']) self.confirm.set_text(self.rootPassword['password']) else: self.pw.set_text("xxxxxxxx") self.confirm.set_text("xxxxxxxx") # pressing Enter in confirm == clicking Next vbox = self.xml.get_widget("account_box") self.confirm.connect("activate", lambda widget, vbox=vbox: self.ics.setGrabNext(1)) # set initial caps lock label text self.setCapsLockLabel() return self.align
def createUpgradeOption(self): r = pixmapRadioButtonGroup() r.addEntry(REINSTALL_STR, _("Fresh Installation"), pixmap=gui.readImageFromFile("install.png"), descr=_("Choose this option to install a fresh copy of %s " "on your system. Existing software and data may " "be overwritten depending on your configuration " "choices.") % productName) r.addEntry(UPGRADE_STR, _("Upgrade an Existing Installation"), pixmap=gui.readImageFromFile("upgrade.png"), descr=_("Choose this option if you would like to upgrade " "your existing %s system. This option will " "preserve the existing data on your storage " "device(s).") % productName) return r
def getScreen(self, anaconda): self.rootPassword = anaconda.id.rootPassword self.intf = anaconda.intf (self.xml, self.align) = gui.getGladeWidget("account.glade", "account_align") self.icon = self.xml.get_widget("icon") self.capslock = self.xml.get_widget("capslock") self.pwlabel = self.xml.get_widget("pwlabel") self.pw = self.xml.get_widget("pw") self.confirmlabel = self.xml.get_widget("confirmlabel") self.confirm = self.xml.get_widget("confirm") # load the icon gui.readImageFromFile("root-password.png", image=self.icon) # connect hotkeys self.pwlabel.set_text_with_mnemonic(_("Root _Password:"******"_Confirm:")) self.confirmlabel.set_mnemonic_widget(self.confirm) # watch for Caps Lock so we can warn the user self.intf.icw.window.connect("key-release-event", lambda w, e: self.handleCapsLockRelease(w, e, self.capslock)) # we might have a root password already if not self.rootPassword['isCrypted']: self.pw.set_text(self.rootPassword['password']) self.confirm.set_text(self.rootPassword['password']) # pressing Enter in confirm == clicking Next vbox = self.xml.get_widget("account_box") self.confirm.connect("activate", lambda widget, vbox=vbox: self.ics.setGrabNext(1)) # set initial caps lock label text self.setCapsLockLabel() return self.align
def getScreen (self, anaconda): self.anaconda = anaconda # this is a bit ugly... but scale the image if we're not at 800x600 (w, h) = self.ics.cw.window.get_size() if w >= 800: height = None width = None else: width = 500 height = 258 pix = gui.readImageFromFile("splash.png", width, height, dither=False) box = gtk.EventBox () box.add (pix) return box
def setPackage(self, header): if len(self.pixmaps): # set to switch every N seconds if self.pixtimer is None or self.pixtimer.elapsed() > 30: if self.pixtimer is None: self.pixtimer = timer.Timer() num = self.pixcurnum if num >= len(self.pixmaps): num = 0 self.wrappedpixlist = 1 pix = gui.readImageFromFile (self.pixmaps[num], 500, 325) if pix: if self.adpix: self.adbox.remove (self.adpix) pix.set_alignment (0.5, 0.5) self.adbox.add (pix) self.adpix = pix else: log.warning("couldn't get a pix") self.adbox.show_all() self.pixcurnum = num + 1 # take screenshot if desired if flags.autoscreenshot and not self.wrappedpixlist: # let things settle down graphically?? processEvents() time.sleep(5) takeScreenShot() self.pixtimer.reset() size = size_string(header[rpm.RPMTAG_SIZE]) pkgstr = _("Installing %s-%s-%s.%s (%s)") %(header[rpm.RPMTAG_NAME], header[rpm.RPMTAG_VERSION], header[rpm.RPMTAG_RELEASE], header[rpm.RPMTAG_ARCH], size) self.curPackage["package"].set_text (pkgstr) self.curPackage["package"].set_ellipsize (pango.ELLIPSIZE_END) summary = header[rpm.RPMTAG_SUMMARY] if (summary == None): summary = "(none)" self.curPackage["summary"].set_text (summary) self.curPackage["summary"].set_ellipsize (pango.ELLIPSIZE_END)
def setPackage(self, header): if len(self.pixmaps): # set to switch every N seconds if self.pixtimer is None or self.pixtimer.elapsed() > 30: if self.pixtimer is None: self.pixtimer = timer.Timer() num = self.pixcurnum if num >= len(self.pixmaps): num = 0 self.wrappedpixlist = 1 pix = gui.readImageFromFile(self.pixmaps[num], 500, 325) if pix: if self.adpix: self.adbox.remove(self.adpix) pix.set_alignment(0.5, 0.5) self.adbox.add(pix) self.adpix = pix else: log.warning("couldn't get a pix") self.adbox.show_all() self.pixcurnum = num + 1 # take screenshot if desired if flags.autoscreenshot and not self.wrappedpixlist: # let things settle down graphically?? processEvents() time.sleep(5) takeScreenShot() self.pixtimer.reset() size = size_string(header[rpm.RPMTAG_SIZE]) pkgstr = _("Installing %s-%s-%s.%s (%s)") % ( header[rpm.RPMTAG_NAME], header[rpm.RPMTAG_VERSION], header[rpm.RPMTAG_RELEASE], header[rpm.RPMTAG_ARCH], size) self.curPackage["package"].set_text(pkgstr) self.curPackage["package"].set_ellipsize(pango.ELLIPSIZE_END) summary = header[rpm.RPMTAG_SUMMARY] if (summary == None): summary = "(none)" self.curPackage["summary"].set_text(summary) self.curPackage["summary"].set_ellipsize(pango.ELLIPSIZE_END)
def getScreen(self, anaconda): hbox = gtk.HBox(False, 5) pix = gui.readImageFromFile("done.png") if pix: a = gtk.Alignment() a.add(pix) a.set(0.5, 0.5, 1.0, 1.0) a.set_size_request(200, -1) hbox.pack_start(a, False, False, 36) if isinstance(anaconda.platform, platform.S390): txt = _("Congratulations, your %s installation is complete.\n\n" ) % (productName, ) if not anaconda.canReIPL: self.rebootButton.set_label(_("Shutdown")) txt = txt + _("Please shutdown to use the installed system.\n") else: txt = txt + _("Please reboot to use the installed system.\n") if not anaconda.reIPLMessage is None: txt = txt + "\n" + anaconda.reIPLMessage + "\n\n" txt = txt + _( "Note that updates may be available to ensure the proper " "functioning of your system and installation of these " "updates is recommended after the reboot.") else: txt = _( "Congratulations, your %s installation is complete.\n\n" "Please reboot to use the installed system. " "Note that updates may be available to ensure the proper " "functioning of your system and installation of these " "updates is recommended after the reboot.") % (productName, ) label = gui.WrappingLabel(txt) label.set_size_request(250, -1) hbox.pack_start(label, True, True) gtk.gdk.beep() return hbox
def createMenu(self): self.menu = gtk.Menu() # Add a blank column at the (current) end of the view. This column # exists only so we can have a header to click on and display the # drop down allowing column configuration. menuCol = gtk.TreeViewColumn("") menuCol.set_clickable(True) menuCol.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) menuCol.set_fixed_width(30) menuCol.connect("clicked", lambda col, menu: menu.popup(None, None, None, 0, 0), self.menu) image = gui.readImageFromFile("filter-menu.png") image.show_all() menuCol.set_widget(image) # Make sure the menu column gets added after all other columns so it # will be on the far right edge. self.view.connect("show", lambda x: self.view.append_column(menuCol))
def getScreen (self, anaconda): hbox = gtk.HBox (False, 5) pix = gui.readImageFromFile ("done.png") if pix: a = gtk.Alignment () a.add (pix) a.set (0.5, 0.5, 1.0, 1.0) a.set_size_request(200, -1) hbox.pack_start (a, False, False, 36) import pyanaconda.platform as platform if isinstance(anaconda.platform, platform.S390): txt = _("Congratulations, your %s installation is complete.\n\n") % (productName,) if not anaconda.canReIPL: self.rebootButton.set_label(_("Shutdown")) txt = txt + _("Please shutdown to use the installed system.\n") else: txt = txt + _("Please reboot to use the installed system.\n") if not anaconda.reIPLMessage is None: txt = txt + "\n" + anaconda.reIPLMessage + "\n\n" txt = txt + _("Note that updates may be available to ensure the proper " "functioning of your system and installation of these " "updates is recommended after the reboot.") else: txt = _("Congratulations, your %s installation is complete.\n\n" "Please reboot to use the installed system. " "Note that updates may be available to ensure the proper " "functioning of your system and installation of these " "updates is recommended after the reboot.") %(productName,) label = gui.WrappingLabel(txt) label.set_size_request(250, -1) hbox.pack_start (label, True, True) gtk.gdk.beep() return hbox
def getScreen (self, anaconda): self.intf = anaconda.intf if anaconda.dir == DISPATCH_BACK: self.intf.icw.prevClicked() return self.pixmaps = self._getRnotes() # Create vbox to contain components of UI vbox = gtk.VBox (False, 12) # Create rnote area self.adpix = None self.adbox = None pix = gui.readImageFromFile(self.pixmaps[0]) if pix: frame = gtk.Frame() frame.set_shadow_type(gtk.SHADOW_NONE) box = gtk.EventBox() self.adpix = pix box.add(self.adpix) self.adbox = box frame.add(box) vbox.pack_start(frame, True, True) self.progress = gtk.ProgressBar() vbox.pack_start(self.progress, False, False) self.infolabel = gui.WrappingLabel("") self.infolabel.set_alignment(0,0) vbox.pack_start(self.infolabel, False, False) # All done with creating components of UI self.intf.setPackageProgressWindow(self) self.intf.setInstallProgressClass(self) vbox.set_border_width(6) return vbox
def getScreen (self, anaconda): self.intf = anaconda.intf if anaconda.dir == DISPATCH_BACK: self.intf.icw.prevClicked() return self.pixmaps = self._getRnotes() # Create vbox to contain components of UI vbox = gtk.VBox (False, 12) # Create rnote area self.adpix = None self.adbox = None pix = gui.readImageFromFile ("progress_first.png") if pix: frame = gtk.Frame() frame.set_shadow_type(gtk.SHADOW_NONE) box = gtk.EventBox() self.adpix = pix box.add(self.adpix) self.adbox = box frame.add(box) vbox.pack_start(frame, False) self.progress = gtk.ProgressBar() vbox.pack_start(self.progress, False) self.infolabel = gui.WrappingLabel("") self.infolabel.set_alignment(0,0) vbox.pack_start(self.infolabel) # All done with creating components of UI self.intf.setPackageProgressWindow(self) anaconda.id.setInstallProgressClass(self) vbox.set_border_width(6) return vbox
def getScreen(self, anaconda): self.anaconda = anaconda self.storage = anaconda.id.storage self.intf = anaconda.intf self.dispatch = anaconda.dispatch if self.anaconda.dir == DISPATCH_FORWARD: # Save system's partition type setting and restore user's self.anaconda.clearPartTypeSystem = self.storage.clearPartType if self.anaconda.clearPartTypeSelection is not None: self.storage.clearPartType = self.anaconda.clearPartTypeSelection (self.xml, vbox) = gui.getGladeWidget("autopart.glade", "parttypeTable") self.encryptButton = self.xml.get_widget("encryptButton") self.reviewButton = self.xml.get_widget("reviewButton") self.table = self.xml.get_widget("parttypeTable") self.prevrev = None self.reviewButton.set_active(not self.dispatch.stepInSkipList("partition")) self.encryptButton.set_active(self.storage.encryptedAutoPart) self.buttonGroup = pixmapRadioButtonGroup() self.buttonGroup.addEntry("all", _("Use All Space"), pixmap=gui.readImageFromFile("partscheme-all.png"), descr=_("Removes all partitions on the selected " "device(s). This includes partitions " "created by other operating systems.\n\n" "<b>Tip:</b> This option will remove " "data from the selected device(s). Make " "sure you have backups.")) self.buttonGroup.addEntry("replace", _("Replace Existing Linux System(s)"), pixmap=gui.readImageFromFile("partscheme-replace.png"), descr=_("Removes only Linux partitions (created from " "a previous Linux installation). This does " "not remove other partitions you may have " "on your storage device(s) (such as VFAT or " "FAT32).\n\n" "<b>Tip:</b> This option will remove " "data from the selected device(s). Make " "sure you have backups.")) self.buttonGroup.addEntry("shrink", _("Shrink Current System"), pixmap=gui.readImageFromFile("partscheme-shrink.png"), descr=_("Shrinks existing partitions to create free " "space for the default layout.")) self.buttonGroup.addEntry("freespace", _("Use Free Space"), pixmap=gui.readImageFromFile("partscheme-freespace.png"), descr=_("Retains your current data and partitions and " "uses only the unpartitioned space on the " "selected device(s), assuming you have enough " "free space available.")) self.buttonGroup.addEntry("custom", _("Create Custom Layout"), pixmap=gui.readImageFromFile("partscheme-custom.png"), descr=_("Manually create your own custom layout on " "the selected device(s) using our partitioning " "tool.")) self.buttonGroup.setToggleCallback(self.typeChanged) widget = self.buttonGroup.render() self.table.attach(widget, 0, 1, 1, 2) # if not set in ks, use UI default if self.storage.clearPartChoice: self.buttonGroup.setCurrent(self.storage.clearPartChoice) else: if self.storage.clearPartType is None or self.storage.clearPartType == CLEARPART_TYPE_LINUX: self.buttonGroup.setCurrent("replace") elif self.storage.clearPartType == CLEARPART_TYPE_NONE: self.buttonGroup.setCurrent("freespace") elif self.storage.clearPartType == CLEARPART_TYPE_ALL: self.buttonGroup.setCurrent("all") if self.buttonGroup.getCurrent() == "custom": # make sure reviewButton is active and not sensitive if self.prevrev == None: self.prevrev = self.reviewButton.get_active() self.reviewButton.set_active(True) self.reviewButton.set_sensitive(False) self.encryptButton.set_sensitive(False) return vbox
def getScreen(self, anaconda): import glob self.intf = anaconda.intf if anaconda.dir == DISPATCH_BACK: self.intf.icw.prevClicked() return files = [] # XXX this ought to search the lang path like everything else if (os.environ.has_key('LANG')): try: shortlang = string.split(os.environ['LANG'], '_')[0] longlang = string.split(os.environ['LANG'], '.')[0] except: shortlang = '' longlang = os.environ['LANG'] else: shortlang = '' longlang = '' paths = ("/tmp/product/pixmaps/rnotes/%s/*.png" % (shortlang, ), "/tmp/product/pixmaps/rnotes/%s/*.png" % (longlang, ), "/tmp/product/pixmaps/rnotes/*.png", "/usr/share/anaconda/pixmaps/rnotes/%s/*.png" % (shortlang, ), "/usr/share/anaconda/pixmaps/rnotes/%s/*.png" % (longlang, ), "/usr/share/anaconda/pixmaps/rnotes/*.png") for path in paths: pixmaps = glob.glob(path) if len(pixmaps) > 0: break if len(pixmaps) > 0: files = pixmaps else: files = ["progress_first.png"] #--Need to merge with if statement above...don't show ads in lowres if self.intf.runres != '800x600': files = ["progress_first-lowres.png"] # sort the list of filenames files.sort() pixmaps = [] for pixmap in files: if string.find(pixmap, "progress_first.png") < 0: pixmaps.append(pixmap[string.find(pixmap, "rnotes/"):]) self.pixmaps = pixmaps self.pixtimer = None self.pixcurnum = 0 self.wrappedpixlist = 0 self.lastTimeEstimate = None self.initialTimeEstimate = None self.estimateHistory = [] # self.timeLog = open("/tmp/timelog", "w") # Create vbox to contain components of UI vbox = gtk.VBox(False, 10) # Create rnote area pix = gui.readImageFromFile("progress_first.png") if pix: frame = gtk.Frame() frame.set_shadow_type(gtk.SHADOW_NONE) box = gtk.EventBox() self.adpix = pix box.add(self.adpix) self.adbox = box frame.add(box) vbox.pack_start(frame) # Create progress bars for package and total progress self.progress = gtk.ProgressBar() self.totalProgress = gtk.ProgressBar() progressTable = gtk.Table(2, 2, False) progressTable.attach(self.totalProgress, 1, 2, 0, 1, xpadding=0, ypadding=2) vbox.pack_start(progressTable, False) # create a table to display time remaining and package info infoTable = gtk.Table(3, 2, False) # remaining time self.remainingTimeLabel = gtk.Label("") self.remainingTimeLabel.set_alignment(1.0, 0.5) infoTable.attach(self.remainingTimeLabel, 1, 2, 0, 1) # current package info self.curPackage = {"package": _("Package"), "summary": _("Summary")} i = 0 for key in ("package", "summary"): label = gtk.Label("") label.set_alignment(0, 0) label.set_line_wrap(True) if key == "summary": label.set_text("\n\n") label.set_size_request(525, 35) fillopts = gtk.EXPAND | gtk.FILL else: fillopts = gtk.FILL self.curPackage[key] = label infoTable.attach(label, 0, 1, i, i + 1, gtk.FILL, fillopts) i = i + 1 vbox.pack_start(infoTable, False) # some sort of table for status statusflag = 0 if anaconda.methodstr.startswith( "http://") or anaconda.methodstr.startswith("ftp://"): statusflag = 1 if statusflag: statusTable = gtk.Table(2, 2, False) self.pkgstatus = gtk.Label("") statusTable.attach(gtk.Label(_("")), 0, 1, 0, 1, gtk.SHRINK) statusTable.attach(self.pkgstatus, 1, 2, 0, 1, gtk.FILL, gtk.FILL, ypadding=2) vbox.pack_start(statusTable, False, False) else: self.pkgstatus = None # All done with creating components of UI self.intf.setPackageProgressWindow(self) anaconda.id.setInstallProgressClass(self) vbox.set_border_width(5) return vbox
def getScreen(self, anaconda): pix = gui.readImageFromFile("splash.png", dither=False) box = gtk.EventBox() box.add(pix) return box
def getScreen (self, anaconda): self.running = 0 mainBox = gtk.VBox (False, 10) hbox = gtk.HBox(False, 5) pix = gui.readImageFromFile ("gnome-globe.png") if pix: a = gtk.Alignment () a.add (pix) hbox.pack_start (a, False) label = gtk.Label (_("What language would you like to use during the " "installation process?")) label.set_line_wrap (True) label.set_size_request(350, -1) hbox.pack_start(label, False) self.instLang = anaconda.id.instLanguage self.listStore = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) for locale in self.instLang.available(): iter = self.listStore.append() nick = self.instLang.getNickByName(locale) lang = '%s (<span lang="%s">%s</span>)' % ( _(locale), "%s" % (nick.split('.')[0],), self.instLang.getNativeLangName(locale)) self.listStore.set_value(iter, 0, lang) self.listStore.set_value(iter, 1, locale) self.listStore.set_value(iter, 2, _(locale)) self.listStore.set_sort_column_id(2, gtk.SORT_ASCENDING) self.listView = gtk.TreeView(self.listStore) col = gtk.TreeViewColumn(None, gtk.CellRendererText(), markup=0) self.listView.append_column(col) self.listView.set_property("headers-visible", False) current = self.instLang.getLangNameByNick(self.instLang.getCurrent()) iter = self.listStore.get_iter_first() while iter: if self.listStore.get_value(iter, 1) == current: selection = self.listView.get_selection() selection.unselect_all() selection.select_iter(iter) break iter = self.listStore.iter_next(iter) self.listView.connect("size-allocate", self.listScroll) sw = gtk.ScrolledWindow () sw.set_border_width (5) sw.set_shadow_type(gtk.SHADOW_IN) sw.set_policy (gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) sw.add (self.listView) setupTreeViewFixupIdleHandler(self.listView, self.listStore) mainBox.pack_start (hbox, False, False, 10) mainBox.pack_start (sw, True, True) self.running = 1 return mainBox
def getScreen(self, anaconda): self.running = 0 mainBox = gtk.VBox(False, 10) hbox = gtk.HBox(False, 5) pix = gui.readImageFromFile("config-language.png") if pix: a = gtk.Alignment() a.add(pix) hbox.pack_start(a, False) label = gtk.Label( _("What language would you like to use during the " "installation process?")) label.set_line_wrap(True) label.set_size_request(350, -1) hbox.pack_start(label, False) self.instLang = anaconda.id.instLanguage self.listStore = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) for locale in self.instLang.available(): iter = self.listStore.append() nick = self.instLang.getLangByName(locale) lang = '%s (<span lang="%s">%s</span>)' % (_(locale), "%s" % ( nick.split('.')[0], ), self.instLang.getNativeLangName(locale)) self.listStore.set_value(iter, 0, lang) self.listStore.set_value(iter, 1, locale) self.listStore.set_value(iter, 2, _(locale)) self.listStore.set_sort_column_id(2, gtk.SORT_ASCENDING) self.listView = gtk.TreeView(self.listStore) col = gtk.TreeViewColumn(None, gtk.CellRendererText(), markup=0) self.listView.append_column(col) self.listView.set_property("headers-visible", False) current = self.instLang.getLangName(self.instLang.instLang) iter = self.listStore.get_iter_first() while iter: if self.listStore.get_value(iter, 1) == current: selection = self.listView.get_selection() selection.unselect_all() selection.select_iter(iter) break iter = self.listStore.iter_next(iter) self.listView.connect("size-allocate", self.listScroll) sw = gtk.ScrolledWindow() sw.set_border_width(5) sw.set_shadow_type(gtk.SHADOW_IN) sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) sw.add(self.listView) setupTreeViewFixupIdleHandler(self.listView, self.listStore) mainBox.pack_start(hbox, False, False, 10) mainBox.pack_start(sw, True, True) self.running = 1 return mainBox
def getScreen(self, anaconda): self.anaconda = anaconda pix = gui.readImageFromFile("splash.png") box = gtk.EventBox() box.add(pix) return box
def getScreen (self, anaconda): pix = gui.readImageFromFile("splash.png", dither=False) box = gtk.EventBox () box.add (pix) return box
def getScreen (self, anaconda): self.anaconda = anaconda pix = gui.readImageFromFile("splash.png") box = gtk.EventBox () box.add (pix) return box
def getScreen (self, anaconda): self.running = 0 mainBox = gtk.VBox (False, 10) hbox = gtk.HBox(False, 5) pix = gui.readImageFromFile ("config-language.png") if pix: a = gtk.Alignment () a.add (pix) hbox.pack_start (a, False) label = gtk.Label (_("What language would you like to use during the " "installation process?")) label.set_line_wrap (True) label.set_size_request(350, -1) hbox.pack_start(label, False) self.instLang = anaconda.instLanguage self.listStore = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) for locale in self.instLang.available(): iter = self.listStore.append() nick = self.instLang.getLangByName(locale) lang = '%s (<span lang="%s">%s</span>)' % ( _(locale), "%s" % (nick.split('.')[0],), self.instLang.getNativeLangName(locale)) self.listStore.set_value(iter, 0, lang) self.listStore.set_value(iter, 1, locale) self.listStore.set_value(iter, 2, _(locale)) self.listStore.set_sort_column_id(2, gtk.SORT_ASCENDING) self.listView = gtk.TreeView(self.listStore) col = gtk.TreeViewColumn(None, gtk.CellRendererText(), markup=0) self.listView.append_column(col) self.listView.set_property("headers-visible", False) current = self.instLang.getLangName(self.instLang.instLang) iter = self.listStore.get_iter_first() while iter: if self.listStore.get_value(iter, 1) == current: selection = self.listView.get_selection() selection.unselect_all() selection.select_iter(iter) break iter = self.listStore.iter_next(iter) self.listView.connect("size-allocate", self.listScroll) sw = gtk.ScrolledWindow () sw.set_border_width (5) sw.set_shadow_type(gtk.SHADOW_IN) sw.set_policy (gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) sw.add (self.listView) setupTreeViewFixupIdleHandler(self.listView, self.listStore) mainBox.pack_start (hbox, False, False, 10) mainBox.pack_start (sw, True, True) # Sabayon and RogentOS language packs options # See Sabayon bug 2518 self.fullLangSupport = anaconda.instLanguage.fullLanguageSupport self.asianLangSupport = anaconda.instLanguage.asianLanguageSupport fullLangSupportCb = gtk.CheckButton( _("Full language support (download extra language packs)")) asianLangSupportCb = gtk.CheckButton( _("Asian fonts support (IME, download extra fonts)")) fullLangSupportCb.set_active(self.fullLangSupport) fullLangSupportCb.connect("toggled", self._fullLangSupportCb, anaconda) asianLangSupportCb.set_active(self.asianLangSupport) asianLangSupportCb.connect("toggled", self._asianLangSupportCb, anaconda) optsVbox = gtk.VBox(False, 1) optsVbox.pack_start(fullLangSupportCb) optsVbox.pack_start(asianLangSupportCb) mainBox.pack_start(optsVbox, False, False) self.running = 1 return mainBox
def getScreen (self, anaconda): self.rootPassword = anaconda.id.rootPassword self.intf = anaconda.intf self.passwords = {} box = gtk.VBox () box.set_border_width(5) hbox = gtk.HBox() pix = gui.readImageFromFile ("root-password.png") if pix: hbox.pack_start (pix, False) label = gui.WrappingLabel (_("The root account is used for " "administering the system. Enter " "a password for the root user.")) label.set_line_wrap(True) label.set_size_request(350, -1) label.set_alignment(0.0, 0.5) hbox.pack_start(label, False) box.pack_start(hbox, False) self.forward = lambda widget, box=box: box.emit('focus', gtk.DIR_TAB_FORWARD) table = gtk.Table (2, 2) table.set_size_request(365, -1) table.set_row_spacings (5) table.set_col_spacings (5) pass1 = gui.MnemonicLabel (_("Root _Password: "******"_Confirm: ")) pass2.set_alignment (0.0, 0.5) table.attach (pass2, 0, 1, 1, 2, gtk.FILL, 0, 10) self.pw = gtk.Entry (128) pass1.set_mnemonic_widget(self.pw) self.pw.connect ("activate", self.forward) self.pw.connect ("map-event", self.setFocus) self.pw.set_visibility (False) self.confirm = gtk.Entry (128) pass2.set_mnemonic_widget(self.confirm) self.confirm.connect ("activate", self.forward) self.confirm.set_visibility (False) table.attach (self.pw, 1, 2, 0, 1, gtk.FILL|gtk.EXPAND, 5) table.attach (self.confirm, 1, 2, 1, 2, gtk.FILL|gtk.EXPAND, 5) hbox = gtk.HBox() hbox.pack_start(table, False) box.pack_start (hbox, False) # root password statusbar self.rootStatus = gtk.Label ("") wrapper = gtk.HBox(0, False) wrapper.pack_start (self.rootStatus) box.pack_start (wrapper, False) if not self.rootPassword["isCrypted"]: self.pw.set_text(self.rootPassword["password"]) self.confirm.set_text(self.rootPassword["password"]) else: self.pw.set_text("xxxxxxxx") self.confirm.set_text("xxxxxxxx") return box
def getScreen (self, anaconda): import glob self.intf = anaconda.intf if anaconda.dir == DISPATCH_BACK: self.intf.icw.prevClicked() return files = [] # XXX this ought to search the lang path like everything else if (os.environ.has_key('LANG')): try: shortlang = string.split(os.environ['LANG'], '_')[0] longlang = string.split(os.environ['LANG'], '.')[0] except: shortlang = '' longlang = os.environ['LANG'] else: shortlang = '' longlang = '' paths = ("/tmp/product/pixmaps/rnotes/%s/*.png" %(shortlang,), "/tmp/product/pixmaps/rnotes/%s/*.png" %(longlang,), "/tmp/product/pixmaps/rnotes/*.png", "/usr/share/anaconda/pixmaps/rnotes/%s/*.png" %(shortlang,), "/usr/share/anaconda/pixmaps/rnotes/%s/*.png" %(longlang,), "/usr/share/anaconda/pixmaps/rnotes/*.png") for path in paths: pixmaps = glob.glob(path) if len(pixmaps) > 0: break if len(pixmaps) > 0: files = pixmaps else: files = ["progress_first.png"] #--Need to merge with if statement above...don't show ads in lowres if self.intf.runres != '800x600': files = ["progress_first-lowres.png"] # sort the list of filenames files.sort() pixmaps = [] for pixmap in files: if string.find (pixmap, "progress_first.png") < 0: pixmaps.append(pixmap[string.find(pixmap, "rnotes/"):]) self.pixmaps = pixmaps self.pixtimer = None self.pixcurnum = 0 self.wrappedpixlist = 0 self.lastTimeEstimate = None self.initialTimeEstimate = None self.estimateHistory = [] # self.timeLog = open("/tmp/timelog", "w") # Create vbox to contain components of UI vbox = gtk.VBox (False, 10) # Create rnote area pix = gui.readImageFromFile ("progress_first.png") if pix: frame = gtk.Frame() frame.set_shadow_type(gtk.SHADOW_NONE) box = gtk.EventBox() self.adpix = pix box.add(self.adpix) self.adbox = box frame.add (box) vbox.pack_start(frame); # Create progress bars for package and total progress self.progress = gtk.ProgressBar () self.totalProgress = gtk.ProgressBar () progressTable = gtk.Table (2, 2, False) progressTable.attach (self.totalProgress, 1, 2, 0, 1, xpadding=0, ypadding=2) vbox.pack_start (progressTable, False) # create a table to display time remaining and package info infoTable = gtk.Table (3, 2, False) # remaining time self.remainingTimeLabel = gtk.Label ("") self.remainingTimeLabel.set_alignment (1.0, 0.5) infoTable.attach (self.remainingTimeLabel, 1, 2, 0, 1) # current package info self.curPackage = { "package" : _("Package"), "summary" : _("Summary") } i = 0 for key in ("package", "summary"): label = gtk.Label ("") label.set_alignment (0, 0) label.set_line_wrap (True) if key == "summary": label.set_text ("\n\n") label.set_size_request(525, 35) fillopts = gtk.EXPAND|gtk.FILL else: fillopts = gtk.FILL self.curPackage[key] = label infoTable.attach (label, 0, 1, i, i+1, gtk.FILL, fillopts) i = i + 1 vbox.pack_start (infoTable, False) # some sort of table for status statusflag = 0 if anaconda.methodstr.startswith("http://") or anaconda.methodstr.startswith("ftp://"): statusflag = 1 if statusflag: statusTable = gtk.Table (2, 2, False) self.pkgstatus = gtk.Label("") statusTable.attach (gtk.Label(_("Status: ")), 0, 1, 0, 1, gtk.SHRINK) statusTable.attach (self.pkgstatus, 1, 2, 0, 1, gtk.FILL, gtk.FILL, ypadding=2) vbox.pack_start (statusTable, False, False) else: self.pkgstatus = None # All done with creating components of UI self.intf.setPackageProgressWindow (self) anaconda.id.setInstallProgressClass(self) vbox.set_border_width (5) return vbox
def getScreen(self, anaconda): self.anaconda = anaconda self.storage = anaconda.id.storage self.intf = anaconda.intf self.dispatch = anaconda.dispatch if self.anaconda.dir == DISPATCH_FORWARD: # Save system's partition type setting and restore user's self.anaconda.clearPartTypeSystem = self.storage.clearPartType if self.anaconda.clearPartTypeSelection is not None: self.storage.clearPartType = self.anaconda.clearPartTypeSelection (self.xml, vbox) = gui.getGladeWidget("autopart.glade", "parttypeTable") self.encryptButton = self.xml.get_widget("encryptButton") self.reviewButton = self.xml.get_widget("reviewButton") self.table = self.xml.get_widget("parttypeTable") self.prevrev = None self.reviewButton.set_active( not self.dispatch.stepInSkipList("partition")) self.encryptButton.set_active(self.storage.encryptedAutoPart) self.buttonGroup = pixmapRadioButtonGroup() self.buttonGroup.addEntry( "all", _("Use All Space"), pixmap=gui.readImageFromFile("partscheme-all.png"), descr=_("Removes all partitions on the selected " "device(s). This includes partitions " "created by other operating systems.\n\n" "<b>Tip:</b> This option will remove " "data from the selected device(s). Make " "sure you have backups.")) self.buttonGroup.addEntry( "replace", _("Replace Existing Linux System(s)"), pixmap=gui.readImageFromFile("partscheme-replace.png"), descr=_("Removes only Linux partitions (created from " "a previous Linux installation). This does " "not remove other partitions you may have " "on your storage device(s) (such as VFAT or " "FAT32).\n\n" "<b>Tip:</b> This option will remove " "data from the selected device(s). Make " "sure you have backups.")) self.buttonGroup.addEntry( "shrink", _("Shrink Current System"), pixmap=gui.readImageFromFile("partscheme-shrink.png"), descr=_("Shrinks existing partitions to create free " "space for the default layout.")) self.buttonGroup.addEntry( "freespace", _("Use Free Space"), pixmap=gui.readImageFromFile("partscheme-freespace.png"), descr=_("Retains your current data and partitions and " "uses only the unpartitioned space on the " "selected device(s), assuming you have enough " "free space available.")) self.buttonGroup.addEntry( "custom", _("Create Custom Layout"), pixmap=gui.readImageFromFile("partscheme-custom.png"), descr=_("Manually create your own custom layout on " "the selected device(s) using our partitioning " "tool.")) self.buttonGroup.setToggleCallback(self.typeChanged) widget = self.buttonGroup.render() self.table.attach(widget, 0, 1, 1, 2) # if not set in ks, use UI default if self.storage.clearPartChoice: self.buttonGroup.setCurrent(self.storage.clearPartChoice) else: if self.storage.clearPartType is None or self.storage.clearPartType == CLEARPART_TYPE_LINUX: self.buttonGroup.setCurrent("replace") elif self.storage.clearPartType == CLEARPART_TYPE_NONE: self.buttonGroup.setCurrent("freespace") elif self.storage.clearPartType == CLEARPART_TYPE_ALL: self.buttonGroup.setCurrent("all") if self.buttonGroup.getCurrent() == "custom": # make sure reviewButton is active and not sensitive if self.prevrev == None: self.prevrev = self.reviewButton.get_active() self.reviewButton.set_active(True) self.reviewButton.set_sensitive(False) self.encryptButton.set_sensitive(False) return vbox