Ejemplo n.º 1
0
    def __init__(self, CFG):
        gtk.Fixed.__init__(self)

        self.metodos = []
        self.minimo = ESPACIO_TOTAL
        self.part = Particiones()
        self.discos = self.part.lista_discos()
        print 'Se han encontrado los siguientes discos: {0}' \
        .format(self.discos)

        self.lbl1 = gtk.Label(
            _("Select the disk where you want to install \
Canaima:"))
        self.lbl1.set_size_request(690, 20)
        self.lbl1.set_alignment(0, 0)
        self.put(self.lbl1, 0, 0)

        self.cmb_discos = gtk.combo_box_new_text()
        self.cmb_discos.set_size_request(690, 30)
        self.put(self.cmb_discos, 0, 25)
        atk_acc(self.cmb_discos, self.lbl1)
        self.cmb_discos.connect('changed', self.seleccionar_disco)

        for d in self.discos:
            self.cmb_discos.append_text(d)

        self.barra_part = BarraParticiones(self)
        self.barra_part.set_size_request(690, 100)
        self.put(self.barra_part, 0, 60)

        self.lbl2 = gtk.Label(_("Slelect the installation method:"))
        self.lbl2.set_size_request(690, 20)
        self.lbl2.set_alignment(0, 0)
        self.put(self.lbl2, 0, 165)

        self.cmb_metodo = gtk.combo_box_new_text()
        self.cmb_metodo.set_size_request(690, 30)
        self.cmb_metodo.connect('changed', self.establecer_metodo)
        self.put(self.cmb_metodo, 0, 190)

        self.lbl4 = gtk.Label()
        self.lbl4.set_size_request(690, 90)
        self.lbl4.set_alignment(0, 0)
        self.lbl4.set_line_wrap(True)
        atk_label(self.lbl4)
        self.put(self.lbl4, 0, 225)

        atk_acc(self.cmb_metodo, self.lbl2)

        self.cmb_discos.set_active(0)
Ejemplo n.º 2
0
    def __init__(self, CFG):
        gtk.Fixed.__init__(self)

        self.metodos = []
        self.minimo = ESPACIO_TOTAL
        self.part = Particiones()
        self.discos = self.part.lista_discos()
        print 'Se han encontrado los siguientes discos: {0}' \
        .format(self.discos)

        self.lbl1 = gtk.Label(_("Select the disk where you want to install \
Canaima:"))
        self.lbl1.set_size_request(690, 20)
        self.lbl1.set_alignment(0, 0)
        self.put(self.lbl1, 0, 0)

        self.cmb_discos = gtk.combo_box_new_text()
        self.cmb_discos.set_size_request(690, 30)
        self.put(self.cmb_discos, 0, 25)
        atk_acc(self.cmb_discos, self.lbl1)
        self.cmb_discos.connect('changed', self.seleccionar_disco)

        for d in self.discos:
            self.cmb_discos.append_text(d)

        self.barra_part = BarraParticiones(self)
        self.barra_part.set_size_request(690, 100)
        self.put(self.barra_part, 0, 60)

        self.lbl2 = gtk.Label(_("Slelect the installation method:"))
        self.lbl2.set_size_request(690, 20)
        self.lbl2.set_alignment(0, 0)
        self.put(self.lbl2, 0, 165)

        self.cmb_metodo = gtk.combo_box_new_text()
        self.cmb_metodo.set_size_request(690, 30)
        self.cmb_metodo.connect('changed', self.establecer_metodo)
        self.put(self.cmb_metodo, 0, 190)

        self.lbl4 = gtk.Label()
        self.lbl4.set_size_request(690, 90)
        self.lbl4.set_alignment(0, 0)
        self.lbl4.set_line_wrap(True)
        atk_label(self.lbl4)
        self.put(self.lbl4, 0, 225)

        atk_acc(self.cmb_metodo, self.lbl2)

        self.cmb_discos.set_active(0)
Ejemplo n.º 3
0
    def __init__(self, CFG):
        gtk.Fixed.__init__(self)
        self.metodo = CFG['metodo']
        self.particiones = CFG['particiones']
        self.current = self.metodo['part'][7] + ESPACIO_USADO_EXTRA
        self.usado = self.metodo['part'][7] + ESPACIO_USADO_EXTRA
        self.forma = 'PART:ROOT:HOME:SWAP'
        self.minimo = ESPACIO_TOTAL
        self.nuevas = []
        self.acciones = []
        self.libre = 0

        txt_info = _("Select the partition layout to use. Use the selector to \
indicate the size you want to use for installation of Canaima.")
        self.lbl1 = gtk.Label(txt_info)
        self.lbl1.set_size_request(690, 35)
        self.lbl1.set_alignment(0, 0)
        self.lbl1.set_line_wrap(True)
        atk_label(self.lbl1)
        self.put(self.lbl1, 0, 0)

        tip_msg = _("Select this button to use the maximum disk \
space for the Canaima installation")
        self.tam_max = gtk.Button()
        self.tam_max.set_label('Máximo')
        self.tam_max.set_size_request(80, 25)
        self.tam_max.connect('clicked', self.set_max)
        self.tam_max.set_tooltip_text(tip_msg)
        self.put(self.tam_max, 525, 40)

        tip_msg = _("Select this button to use the minimum disk \
space for the Canaima installation")
        self.tam_min = gtk.Button()
        self.tam_min.set_label('Mínimo')
        self.tam_min.set_size_request(80, 25)
        self.tam_min.connect('clicked', self.set_min)
        self.tam_min.set_tooltip_text(tip_msg)
        self.put(self.tam_min, 610, 40)

        self.barra = BarraAuto(self)
        self.barra.set_size_request(690, 100)
        self.put(self.barra, 0, 70)

        msg_1 = _("Install everything in a single partition.")
        self.option_1 = gtk.RadioButton(None, msg_1)
        self.option_1.connect("toggled", self.change_option, "PART:ROOT:SWAP")
        self.option_1.set_size_request(350, 20)
        self.put(self.option_1, 0, 185)

        msg_2 = _("Separate /home partition (recommended).")
        self.option_2 = gtk.RadioButton(self.option_1, msg_2)
        self.option_2.connect("toggled", self.change_option,
                              "PART:ROOT:HOME:SWAP")
        self.option_2.set_size_request(350, 20)
        self.put(self.option_2, 0, 210)

        msg_3 = _("Separate /home and /boot.")
        self.option_3 = gtk.RadioButton(self.option_1, msg_3)
        self.option_3.connect("toggled", self.change_option,
                              "PART:BOOT:ROOT:HOME:SWAP")
        self.option_3.set_size_request(350, 20)
        self.put(self.option_3, 0, 235)

        msg_4 = _("Separate /home, /boot, /var and /usr.")
        self.option_4 = gtk.RadioButton(self.option_1, msg_4)
        self.option_4.connect("toggled", self.change_option,
                              "PART:BOOT:ROOT:VAR:USR:HOME:SWAP")
        self.option_4.set_size_request(350, 20)
        self.put(self.option_4, 0, 260)

        self.leyenda = Leyenda(self)
        self.leyenda.set_size_request(270, 150)
        self.put(self.leyenda, 390, 185)

        self.option_2.set_active(True)

        if self.metodo['disco'][4] > 0:
            if self.metodo['part'][5] == 'primary':
                if self.metodo['disco'][3] == 0:
                    # Disponibles: root+swap, root+home+swap
                    self.option_3.set_sensitive(False)
                    self.option_4.set_sensitive(False)
                elif self.metodo['disco'][3] == 1:
                    # Disponibles: root+swap
                    self.option_1.set_active(True)
                    self.option_2.set_sensitive(False)
                    self.option_3.set_sensitive(False)
                    self.option_4.set_sensitive(False)
            elif self.metodo['part'][5] == 'logical':
                if self.metodo['disco'][5] == 7:
                    # Disponibles: root+swap, root+home+swap,
                    # boot+root+home+swap
                    self.option_4.set_sensitive(False)
                elif self.metodo['disco'][5] == 6:
                    # Disponibles: root+swap, root+home+swap,
                    # boot+root+home+swap
                    self.option_4.set_sensitive(False)
                elif self.metodo['disco'][5] == 8:
                    # Disponibles: root+swap, root+home+swap
                    self.option_3.set_sensitive(False)
                    self.option_4.set_sensitive(False)
                elif self.metodo['disco'][5] == 9:
                    # Disponibles: root+swap
                    self.option_1.set_active(True)
                    self.option_2.set_sensitive(False)
                    self.option_3.set_sensitive(False)
                    self.option_4.set_sensitive(False)
Ejemplo n.º 4
0
    def __init__(self, CFG):
        gtk.Fixed.__init__(self)
        self.metodo = CFG['metodo']
        self.particiones = CFG['particiones']
        self.current = self.metodo['part'][7] + ESPACIO_USADO_EXTRA
        self.usado = self.metodo['part'][7] + ESPACIO_USADO_EXTRA
        self.forma = 'PART:ROOT:HOME:SWAP'
        self.minimo = ESPACIO_TOTAL
        self.nuevas = []
        self.acciones = []
        self.libre = 0

        txt_info = _("Select the partition layout to use. Use the selector to \
indicate the size you want to use for installation of Canaima.")
        self.lbl1 = gtk.Label(txt_info)
        self.lbl1.set_size_request(690, 35)
        self.lbl1.set_alignment(0, 0)
        self.lbl1.set_line_wrap(True)
        atk_label(self.lbl1)
        self.put(self.lbl1, 0, 0)

        tip_msg = _("Select this button to use the maximum disk \
space for the Canaima installation")
        self.tam_max = gtk.Button()
        self.tam_max.set_label('Máximo')
        self.tam_max.set_size_request(80, 25)
        self.tam_max.connect('clicked', self.set_max)
        self.tam_max.set_tooltip_text(tip_msg)
        self.put(self.tam_max, 525, 40)

        tip_msg = _("Select this button to use the minimum disk \
space for the Canaima installation")
        self.tam_min = gtk.Button()
        self.tam_min.set_label('Mínimo')
        self.tam_min.set_size_request(80, 25)
        self.tam_min.connect('clicked', self.set_min)
        self.tam_min.set_tooltip_text(tip_msg)
        self.put(self.tam_min, 610, 40)

        self.barra = BarraAuto(self)
        self.barra.set_size_request(690, 100)
        self.put(self.barra, 0, 70)

        msg_1 = _("Install everything in a single partition.")
        self.option_1 = gtk.RadioButton(None, msg_1)
        self.option_1.connect("toggled", self.change_option, "PART:ROOT:SWAP")
        self.option_1.set_size_request(350, 20)
        self.put(self.option_1, 0, 185)

        msg_2 = _("Separate /home partition (recommended).")
        self.option_2 = gtk.RadioButton(self.option_1, msg_2)
        self.option_2.connect("toggled", self.change_option,
                              "PART:ROOT:HOME:SWAP")
        self.option_2.set_size_request(350, 20)
        self.put(self.option_2, 0, 210)

        msg_3 = _("Separate /home and /boot.")
        self.option_3 = gtk.RadioButton(self.option_1, msg_3)
        self.option_3.connect("toggled", self.change_option,
                              "PART:BOOT:ROOT:HOME:SWAP")
        self.option_3.set_size_request(350, 20)
        self.put(self.option_3, 0, 235)

        msg_4 = _("Separate /home, /boot, /var and /usr.")
        self.option_4 = gtk.RadioButton(self.option_1, msg_4)
        self.option_4.connect("toggled", self.change_option,
                              "PART:BOOT:ROOT:VAR:USR:HOME:SWAP")
        self.option_4.set_size_request(350, 20)
        self.put(self.option_4, 0, 260)

        self.leyenda = Leyenda(self)
        self.leyenda.set_size_request(270, 150)
        self.put(self.leyenda, 390, 185)

        self.option_2.set_active(True)

        if self.metodo['disco'][4] > 0:
            if self.metodo['part'][5] == 'primary':
                if self.metodo['disco'][3] == 0:
                    # Disponibles: root+swap, root+home+swap
                    self.option_3.set_sensitive(False)
                    self.option_4.set_sensitive(False)
                elif self.metodo['disco'][3] == 1:
                    # Disponibles: root+swap
                    self.option_1.set_active(True)
                    self.option_2.set_sensitive(False)
                    self.option_3.set_sensitive(False)
                    self.option_4.set_sensitive(False)
            elif self.metodo['part'][5] == 'logical':
                if self.metodo['disco'][5] == 7:
                    # Disponibles: root+swap, root+home+swap,
                    # boot+root+home+swap
                    self.option_4.set_sensitive(False)
                elif self.metodo['disco'][5] == 6:
                    # Disponibles: root+swap, root+home+swap,
                    # boot+root+home+swap
                    self.option_4.set_sensitive(False)
                elif self.metodo['disco'][5] == 8:
                    # Disponibles: root+swap, root+home+swap
                    self.option_3.set_sensitive(False)
                    self.option_4.set_sensitive(False)
                elif self.metodo['disco'][5] == 9:
                    # Disponibles: root+swap
                    self.option_1.set_active(True)
                    self.option_2.set_sensitive(False)
                    self.option_3.set_sensitive(False)
                    self.option_4.set_sensitive(False)
Ejemplo n.º 5
0
    def __init__(self, CFG):
        gtk.HBox.__init__(self)

        table = gtk.Table(20, 2)

        attr = pango.AttrList()
        size = pango.AttrSize(18000, 0, -1)
        attr.insert(size)

        self.lbltitle1 = gtk.Label(
            _("Configuration for the administrator \
account"))
        self.lbltitle1.set_alignment(0, 0.5)
        self.lbltitle1.set_attributes(attr)
        atk_label(self.lbltitle1)
        table.attach(self.lbltitle1, 0, 2, 0, 1)

        self.chkoem = gtk.CheckButton(
            _("OEM Installation (Ignore this \
setting and makes it at the first start)."))
        self.chkoem.connect("toggled", self.oemchecked)
        table.attach(self.chkoem, 0, 2, 1, 2)

        self.chkgdm = gtk.CheckButton(
            _("Enable Accessibility in the user \
login screen (GDM)."))
        table.attach(self.chkgdm, 0, 2, 2, 3)

        self.lblpassroot1 = gtk.Label(_("Enter a password:"******"Repeat the password:"******"Machine name:"))
        self.lblmaquina.set_alignment(0, 0.5)
        table.attach(self.lblmaquina, 0, 1, 5, 6)

        self.txtmaquina = gtk.Entry()
        self.txtmaquina.set_text('canaima-popular')
        self.txtmaquina.set_max_length(255)
        atk_acc(self.txtmaquina, self.lblmaquina)
        table.attach(self.txtmaquina, 1, 2, 5, 6)

        self.lbltitle2 = gtk.Label(_("Configuration for the user account"))
        self.lbltitle2.set_alignment(0, 0.5)
        self.lbltitle2.set_attributes(attr)
        atk_label(self.lbltitle2)
        table.attach(self.lbltitle2, 0, 2, 6, 7)

        self.lblnombre = gtk.Label(_("Full name:"))
        self.lblnombre.set_alignment(0, 0.5)
        table.attach(self.lblnombre, 0, 1, 7, 8)

        self.txtnombre = gtk.Entry()
        atk_acc(self.txtnombre, self.lblnombre)
        table.attach(self.txtnombre, 1, 2, 7, 8)

        self.lblusuario = gtk.Label(_("User name:"))
        self.lblusuario.set_alignment(0, 0.5)
        table.attach(self.lblusuario, 0, 1, 8, 9)

        self.txtusuario = gtk.Entry()
        atk_acc(self.txtusuario, self.lblusuario)
        table.attach(self.txtusuario, 1, 2, 8, 9)

        self.lblpassuser1 = gtk.Label(_("Enter a password:"******"Repeat the password:"))
        self.lblpassuser2.set_alignment(0, 0.5)
        table.attach(self.lblpassuser2, 0, 1, 10, 11)

        self.txtpassuser2 = gtk.Entry()
        self.txtpassuser2.set_visibility(False)
        atk_acc(self.txtpassuser2, self.lblpassuser2)
        table.attach(self.txtpassuser2, 1, 2, 10, 11)

        self.pack_start(table, padding=40)
Ejemplo n.º 6
0
    def __init__(self, CFG):
        gtk.HBox.__init__(self)

        table = gtk.Table(20, 2)

        attr = pango.AttrList()
        size = pango.AttrSize(18000, 0, -1)
        attr.insert(size)

        self.lbltitle1 = gtk.Label(
            _(
                "Configuration for the administrator \
account"
            )
        )
        self.lbltitle1.set_alignment(0, 0.5)
        self.lbltitle1.set_attributes(attr)
        atk_label(self.lbltitle1)
        table.attach(self.lbltitle1, 0, 2, 0, 1)

        self.chkoem = gtk.CheckButton(
            _(
                "OEM Installation (Ignore this \
setting and makes it at the first start)."
            )
        )
        self.chkoem.connect("toggled", self.oemchecked)
        table.attach(self.chkoem, 0, 2, 1, 2)

        self.chkgdm = gtk.CheckButton(
            _(
                "Enable Accessibility in the user \
login screen (GDM)."
            )
        )
        table.attach(self.chkgdm, 0, 2, 2, 3)

        self.lblpassroot1 = gtk.Label(_("Enter a password:"******"Repeat the password:"******"Machine name:"))
        self.lblmaquina.set_alignment(0, 0.5)
        table.attach(self.lblmaquina, 0, 1, 5, 6)

        self.txtmaquina = gtk.Entry()
        self.txtmaquina.set_text("canaima-popular")
        self.txtmaquina.set_max_length(255)
        atk_acc(self.txtmaquina, self.lblmaquina)
        table.attach(self.txtmaquina, 1, 2, 5, 6)

        self.lbltitle2 = gtk.Label(_("Configuration for the user account"))
        self.lbltitle2.set_alignment(0, 0.5)
        self.lbltitle2.set_attributes(attr)
        atk_label(self.lbltitle2)
        table.attach(self.lbltitle2, 0, 2, 6, 7)

        self.lblnombre = gtk.Label(_("Full name:"))
        self.lblnombre.set_alignment(0, 0.5)
        table.attach(self.lblnombre, 0, 1, 7, 8)

        self.txtnombre = gtk.Entry()
        atk_acc(self.txtnombre, self.lblnombre)
        table.attach(self.txtnombre, 1, 2, 7, 8)

        self.lblusuario = gtk.Label(_("User name:"))
        self.lblusuario.set_alignment(0, 0.5)
        table.attach(self.lblusuario, 0, 1, 8, 9)

        self.txtusuario = gtk.Entry()
        atk_acc(self.txtusuario, self.lblusuario)
        table.attach(self.txtusuario, 1, 2, 8, 9)

        self.lblpassuser1 = gtk.Label(_("Enter a password:"******"Repeat the password:"))
        self.lblpassuser2.set_alignment(0, 0.5)
        table.attach(self.lblpassuser2, 0, 1, 10, 11)

        self.txtpassuser2 = gtk.Entry()
        self.txtpassuser2.set_visibility(False)
        atk_acc(self.txtpassuser2, self.lblpassuser2)
        table.attach(self.txtpassuser2, 1, 2, 10, 11)

        self.pack_start(table, padding=40)