def __init__(self, CFG): gtk.Fixed.__init__(self) msg_titulo = _("Welcome to the Install Wizard") msg_intro = _("With this wizard you can easily install Canaima \ GNU/Linux on your computer. We invite you to follow the instructions \ displayed on screen.") attr = pango.AttrList() size = pango.AttrSize(20000, 0, -1) attr.insert(size) self.lbltitulo = gtk.Label(msg_titulo) self.lbltitulo.set_size_request(640, 80) self.lbltitulo.set_alignment(0, 0) self.lbltitulo.set_attributes(attr) self.lbltitulo.set_line_wrap(True) #self.lbltitulo.set_selectable(True) self.put(self.lbltitulo, 50, 90) self.lblintro = gtk.Label(msg_intro) self.lblintro.set_size_request(640, 40) self.lblintro.set_alignment(0, 0) self.lblintro.set_line_wrap(True) #self.lblintro.set_selectable(True) self.put(self.lblintro, 50, 170) self.set_flags(gtk.CAN_FOCUS) atk_acc_vd(self, msg_titulo + " " + msg_intro)
def __init__(self, title, q_button_a, q_button_b, q_view, q_label, q_win, event): window = gtk.Window() window.set_border_width(0) window.set_title(title) window.set_position(gtk.WIN_POS_CENTER_ALWAYS) window.set_size_request(700, 470) window.set_resizable(False) window.set_icon_from_file(BAR_ICON) window.connect("destroy", self.disable_close) window.connect("delete-event", self.disable_close) box = gtk.Fixed() window.add(box) attr = pango.AttrList() size = pango.AttrSize(20000, 0, -1) attr.insert(size) str_message = _('Canaima installation has been completed') message = gtk.Label(str_message) message.set_size_request(640, 40) message.set_alignment(0, 0) message.set_line_wrap(True) message.set_attributes(attr) box.put(message, 50, 200) str_intro = _('You can keep trying Canaima pressing "Restart Later" \ or enjoy your installed operating system by pressing "Restart Now".') intro = gtk.Label(str_intro) intro.set_size_request(640, 40) intro.set_alignment(0, 0) intro.set_line_wrap(True) box.put(intro, 50, 250) view = webkit.WebView() view.set_size_request(700, 430) box.put(view, 0, 0) linea = gtk.HSeparator() linea.set_size_request(700, 5) box.put(linea, 0, 435) label = gtk.Label() label.set_justify(gtk.JUSTIFY_CENTER) label.set_size_request(700, 20) box.put(label, 0, 440) button_a = gtk.Button() button_a.set_size_request(150, 30) button_a.set_label(_('Restart Later')) button_a.connect('clicked', self.close) box.put(button_a, 390, 440) button_b = gtk.Button() button_b.set_size_request(150, 30) button_b.set_label(_('Restart Now')) button_b.connect('clicked', self.reboot) box.put(button_b, 540, 440) box.set_flags(gtk.CAN_FOCUS) atk_acc_vd(box, str_message + ". " + str_intro) window.show_all() button_a.hide() button_b.hide() q_view.put(view) q_label.put(label) q_win.put(window) q_button_a.put(button_a) q_button_b.put(button_b) event.set() self.view = view
def __init__(self, CFG): gtk.Fixed.__init__(self) if CFG['oem'] == False: msg_nombre = _('- Your full name will be set to "{0}".') \ .format(CFG['nombre']) msg_usuario = _('- An user account named "{0}" will be created.') \ .format(CFG['usuario']) msg_maquina = _('- The machine name "{0}" will be used to \ identify your computer on the local network.').format(CFG['maquina']) else: msg_nombre = _('- Your full name will be required on the first \ login.') msg_usuario = _('- Your username will be required in the first \ login.') msg_maquina = _('- The machine name will be required in the first \ login.') if CFG['metodo']['tipo'] == 'MANUAL': msg_metodo = _('- The installation must follow the directions \ provided in the manual partitioning.') elif CFG['metodo']['tipo'] == 'TODO': msg_metodo = _('- The installation will use the entire disk \ "{0}".').format(CFG['metodo']['disco'][0]) elif CFG['metodo']['tipo'] == 'LIBRE': msg_metodo = _('- The installation will use existing free space.') elif CFG['metodo']['tipo'] == 'REDIM': msg_metodo = _('- The installation will release space resizing an \ existing partition.') if CFG['metodo']['tipo'] != 'MANUAL': if CFG['forma'] == 'ROOT:SWAP:LIBRE' or \ CFG['forma'] == 'PART:ROOT:SWAP': msg_tipo = _('- The installation will take place in a \ partition for the system and other for swap.') elif CFG['forma'] == 'ROOT:HOME:SWAP:LIBRE' or \ CFG['forma'] == 'PART:ROOT:HOME:SWAP': msg_tipo = _('- The installation will take place in several \ partitions: "Root (/)", "/home" and "swap".') elif CFG['forma'] == 'BOOT:ROOT:HOME:SWAP:LIBRE' or \ CFG['forma'] == 'PART:BOOT:ROOT:HOME:SWAP': msg_tipo = _('- The installation will take place in several \ partitions: "/boot", "Root (/)", "/home" and "swap".') elif CFG['forma'] == 'BOOT:ROOT:VAR:USR:HOME:SWAP:LIBRE' or \ CFG['forma'] == 'PART:BOOT:ROOT:VAR:USR:HOME:SWAP': msg_tipo = _('- The installation will take place in several \ partitions: "/boot", "Root (/)", "/var", "/usr", "/home" y "swap".') else: msg_tipo = '' msg_teclado = _('- "{0}" will be used as keyboard layout.') \ .format(CFG['keyboard']) msg_titulo = _('All ready!') msg_final = _('Press "Next" to start installing the system. After \ this step you can not stop the installation, so make sure your data is \ correct.') msg_confirm = """ {} {} {} {} {} {} {} """.format(msg_usuario, msg_nombre, msg_teclado, msg_maquina, \ msg_metodo, msg_tipo, msg_final) # Limpiamos texto de las varaiables vacias. msg_confirm.replace("\nNone", "") attr = pango.AttrList() size = pango.AttrSize(20000, 0, -1) attr.insert(size) self.lbltitulo = gtk.Label(msg_titulo) self.lbltitulo.set_size_request(640, 40) self.lbltitulo.set_alignment(0, 0) self.lbltitulo.set_attributes(attr) self.lbltitulo.set_line_wrap(True) self.put(self.lbltitulo, 20, 60) self.lblusuario = gtk.Label() self.lblusuario.set_markup(msg_confirm) self.lblusuario.set_size_request(640, -1) self.lblusuario.set_line_wrap(True) self.put(self.lblusuario, 20, 100) self.set_flags(gtk.CAN_FOCUS) atk_acc_vd(self, msg_titulo + ". " + msg_confirm)