Exemplo 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)
Exemplo 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)
Exemplo n.º 3
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("Seleccione el disco donde desea instalar el sistema:")
        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)
        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("Seleccione el método de instalación:")
        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.put(self.cmb_metodo, 0, 190)
        self.cmb_metodo.connect("changed", self.establecer_metodo)

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

        self.cmb_discos.set_active(0)
Exemplo n.º 4
0
class PasoMetodo(gtk.Fixed):
    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("Seleccione el disco donde desea instalar el sistema:")
        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)
        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("Seleccione el método de instalación:")
        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.put(self.cmb_metodo, 0, 190)
        self.cmb_metodo.connect("changed", self.establecer_metodo)

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

        self.cmb_discos.set_active(0)

    def seleccionar_disco(self, widget=None):
        primarias = 0
        extendidas = 0
        logicas = 0
        self.metodos = []

        try:
            self.barra_part.expose()
        except:
            pass
        self.cmb_metodo.get_model().clear()
        self.cmb_metodo.set_sensitive(False)
        CFG["w"].siguiente.set_sensitive(False)
        self.lbl4.set_text("")

        self.disco = self.cmb_discos.get_active_text()
        print "{0} seleccionado".format(self.disco)
        self.particiones = self.part.lista_particiones(self.disco)

        if len(self.particiones) == 0:
            UserMessage(
                message="El disco {0} necesita una tabla de particiones para poder continuar con la instalación. ¿Desea crear una tabla de particiones ahora?.\n\nSi presiona cancelar no podrá utilizar este disco para instalar Canaima.".format(
                    self.disco
                ),
                title="Tabla de particiones no encontrada".format(self.disco),
                mtype=gtk.MESSAGE_INFO,
                buttons=gtk.BUTTONS_OK_CANCEL,
                c_1=gtk.RESPONSE_OK,
                f_1=self.part.nueva_tabla_particiones,
                p_1=(self.disco, "msdos"),
                c_2=gtk.RESPONSE_OK,
                f_2=self.seleccionar_disco,
                p_2=(),
            )
        else:
            try:
                self.barra_part.expose()
            except:
                pass

            self.total = self.particiones[0][9]
            CFG["w"].siguiente.set_sensitive(True)
            self.cmb_metodo.set_sensitive(True)

            mini = self.particiones[0][1]
            mfin = self.particiones[0][9]

            for t in self.particiones:
                if mini > t[1]:
                    mini = t[1]

                if mfin < t[2]:
                    mfin = t[2]

                if t[5] == "primary" and t[4] != "free":
                    primarias += 1
                elif t[5] == "logical" and t[4] != "free":
                    logicas += 1
                elif t[5] == "extended":
                    extendidas += 1

            disco_array = [self.disco, mini, mfin, primarias, extendidas, logicas]

            if self.total >= self.minimo:
                for p in self.particiones:
                    part = p[0]
                    tam = p[3]
                    fs = p[4]
                    tipo = p[5]
                    libre = p[8]

                    if fs != "free" and libre >= self.minimo:
                        if fs in FSPROGS:
                            if tipo == "logical" and FSPROGS[fs][1][0] != "":
                                if logicas < 10:
                                    self.metodos.append(
                                        {
                                            "tipo": "REDIM",
                                            "msg": "Instalar redimensionando {0} para liberar espacio ({1} libres)".format(
                                                part, humanize(libre)
                                            ),
                                            "part": p,
                                            "disco": disco_array,
                                        }
                                    )

                            elif tipo == "primary" and FSPROGS[fs][1][0] != "":
                                if (extendidas < 1 and primarias < 4) or (extendidas > 0 and primarias < 2):
                                    self.metodos.append(
                                        {
                                            "tipo": "REDIM",
                                            "msg": "Instalar redimensionando {0} para liberar espacio ({1} libres)".format(
                                                part, humanize(libre)
                                            ),
                                            "part": p,
                                            "disco": disco_array,
                                        }
                                    )

                    if fs == "free" and tam >= self.minimo:
                        if tipo == "logical":
                            if logicas < 10:
                                self.metodos.append(
                                    {
                                        "tipo": "LIBRE",
                                        "msg": "Instalar usando espacio libre disponible ({0})".format(humanize(tam)),
                                        "part": p,
                                        "disco": disco_array,
                                    }
                                )

                        elif tipo == "primary":
                            if (extendidas < 1 and primarias < 4) or (extendidas > 0 and primarias < 2):
                                self.metodos.append(
                                    {
                                        "tipo": "LIBRE",
                                        "msg": "Instalar usando espacio libre disponible ({0})".format(humanize(tam)),
                                        "part": p,
                                        "disco": disco_array,
                                    }
                                )

                self.metodos.append(
                    {
                        "tipo": "TODO",
                        "msg": "Instalar usando todo el disco ({0})".format(humanize(self.total)),
                        "part": disco_array,
                        "disco": disco_array,
                    }
                )

                self.metodos.append(
                    {
                        "tipo": "MANUAL",
                        "msg": "Instalar editando particiones manualmente".format(humanize(tam)),
                        "part": disco_array,
                        "disco": disco_array,
                    }
                )

            else:
                self.metodos.append({"tipo": "NONE", "msg": "El tamaño del disco no es suficiente"})

                CFG["w"].siguiente.set_sensitive(False)
                self.cmb_metodo.set_sensitive(False)

            for k in sorted(self.metodos, key=lambda ordn: ordn["tipo"], reverse=True):
                self.cmb_metodo.append_text(k["msg"])

            self.cmb_metodo.set_active(0)

    def establecer_metodo(self, widget=None):
        """
            Crea una lista de los metodos de instalación disponibles para la
            partición
        """
        for d in self.metodos:
            if d["msg"] == self.cmb_metodo.get_active_text():
                self.metodo = d

        if self.metodo["tipo"] == "TODO":
            msg = "Al escoger esta opción el nuevo Sistema Operativo ocupará la totalidad de su disco duro. Tenga en cuenta que se borrarán todos los datos y/o sistemas presentes. Puede aprovechar este momento para realizar un respaldo antes de proseguir con la instalación."
        elif self.metodo["tipo"] == "LIBRE":
            msg = "Esta opción le permitirá instalar el Sistema Operativo en el espacio libre de {0} que se encuentra en su disco duro, conservando los demás datos y/o sistemas que se encuentren en las demás porciones del disco.".format(
                humanize(self.metodo["part"][2] - self.metodo["part"][1])
            )
        elif self.metodo["tipo"] == "REDIM":
            msg = "Esta opción permitirá utilizar el espacio libre presente en la partición {0} para instalar el Sistema Operativo. Se redimensionará la partición para liberar el espacio, manteniendo los datos y/o sistemas presentes".format(
                self.metodo["part"][0]
            )
        elif self.metodo["tipo"] == "MANUAL":
            msg = "Si escoge esta opción se abrirá el editor de particiones, que le permitirá ajustar las particiones según más le convenga. No le recomendamos que utilice esta opción a menos que sepa lo que está haciendo."
        elif self.metodo["tipo"] == "NONE":
            msg = "El sistema operativo necesita al menos 6GB libres para poder instalar. Seleccione otro disco duro."
        else:
            pass

        self.lbl4.set_text(msg)
Exemplo n.º 5
0
class PasoMetodo(gtk.Fixed):
    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)

    def seleccionar_disco(self, widget=None):
        primarias = 0
        extendidas = 0
        logicas = 0
        self.metodos = []

        try:
            self.barra_part.expose()
        except:
            pass
        self.cmb_metodo.get_model().clear()
        self.cmb_metodo.set_sensitive(False)
        CFG['w'].siguiente.set_sensitive(False)
        self.lbl4.set_text('')

        self.disco = self.cmb_discos.get_active_text()
        print '{0} seleccionado'.format(self.disco)
        self.particiones = self.part.lista_particiones(self.disco)

        if len(self.particiones) == 0:
            UserMessage(
                    message=_("""Disk  "{0}" needs a partition table to \
continue the installation. Do you want to create a partition table now?

If you press Cancel you can not use that disk to install Canaima.""")\
                    .format(self.disco),
                    title=_("Partition table not found."),
                    mtype=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_OK_CANCEL,
                    c_1=gtk.RESPONSE_OK, f_1=self.part.nueva_tabla_particiones,
                    p_1=(self.disco, 'msdos'), c_2=gtk.RESPONSE_OK,
                    f_2=self.seleccionar_disco, p_2=()
                    )
        else:
            try:
                self.barra_part.expose()
            except:
                pass

            self.total = self.particiones[0][9]
            CFG['w'].siguiente.set_sensitive(True)
            self.cmb_metodo.set_sensitive(True)

            mini = self.particiones[0][1]
            mfin = self.particiones[0][9]

            for t in self.particiones:
                if mini > t[1]:
                    mini = t[1]

                if mfin < t[2]:
                    mfin = t[2]

                if t[5] == 'primary' and t[4] != 'free':
                    primarias += 1
                elif t[5] == 'logical' and t[4] != 'free':
                    logicas += 1
                elif t[5] == 'extended':
                    extendidas += 1

            disco_array = [
                self.disco, mini, mfin, primarias, extendidas, logicas
            ]

            if self.total >= self.minimo:
                for p in self.particiones:
                    part = p[0]
                    tam = p[3]
                    fs = p[4]
                    tipo = p[5]
                    libre = p[8]

                    if fs != 'free' and libre >= self.minimo:
                        if fs in FSPROGS:
                            if tipo == 'logical' and FSPROGS[fs][1][0] != '':
                                if logicas < 10:
                                    self.metodos.append({
                                        'tipo':
                                        'REDIM',
                                        'msg':
                                        _("Install resizing {0} to \
free up space ({1} free)").format(part, humanize(libre)),
                                        'part':
                                        p,
                                        'disco':
                                        disco_array
                                    })

                            elif tipo == 'primary' and FSPROGS[fs][1][0] != '':
                                if (extendidas < 1 and primarias < 4) \
                                or (extendidas > 0 and primarias < 2):
                                    self.metodos.append({
                                        'tipo':
                                        'REDIM',
                                        'msg':
                                        _("Install resizing {0} to \
free up space ({1} free)").format(part, humanize(libre)),
                                        'part':
                                        p,
                                        'disco':
                                        disco_array
                                    })

                    if fs == 'free' and tam >= self.minimo:
                        if tipo == 'logical':
                            if logicas < 10:
                                self.metodos.append({
                                    'tipo':
                                    'LIBRE',
                                    'msg':
                                    _("Install using available free \
space ({0})").format(humanize(tam)),
                                    'part':
                                    p,
                                    'disco':
                                    disco_array
                                })

                        elif tipo == 'primary':
                            if (extendidas < 1 and primarias < 4) \
                            or (extendidas > 0 and primarias < 2):
                                self.metodos.append({
                                    'tipo':
                                    'LIBRE',
                                    'msg':
                                    _("Install using available free \
space ({0})").format(humanize(tam)),
                                    'part':
                                    p,
                                    'disco':
                                    disco_array
                                })

                self.metodos.append({
                    'tipo': 'TODO',
                    'msg': _("Install using the entire disk ({0})") \
                    .format(humanize(self.total)),
                    'part': disco_array,
                    'disco': disco_array
                })

                self.metodos.append({
                    'tipo': 'MANUAL',
                    'msg': _("Install editing partitions manually")\
                    .format(humanize(tam)),
                    'part': disco_array,
                    'disco': disco_array
                })

            else:
                self.metodos.append({
                    'tipo':
                    'NONE',
                    'msg':
                    'El tamaño del disco no es suficiente'
                })

                CFG['w'].siguiente.set_sensitive(False)
                self.cmb_metodo.set_sensitive(False)

            for k in sorted(self.metodos,
                            key=lambda ordn: ordn['tipo'],
                            reverse=True):
                self.cmb_metodo.append_text(k['msg'])

            self.cmb_metodo.set_active(0)

    def establecer_metodo(self, widget=None):
        '''
            Crea una lista de los metodos de instalación disponibles para la
            partición
        '''
        for d in self.metodos:
            if d['msg'] == self.cmb_metodo.get_active_text():
                self.metodo = d

        if self.metodo['tipo'] == 'TODO':
            msg = _("By choosing this option, Canaima will occupy all of your \
hard drive. Note that all data present will be erased. You can take this time \
to make a backup before proceeding with the installation.")
        elif self.metodo['tipo'] == 'LIBRE':
            msg = _("By choosing this option, Canaima will be installed in \
the free space of {0} that is in you hard disk, preserving the other data and \
systems that are in the other portions of the disc."                                                    ) \
            .format(humanize(self.metodo['part'][2] - self.metodo['part'][1]))
        elif self.metodo['tipo'] == 'REDIM':
            msg = _("This option will use the free space present in the \
partition {0} to install Canaima. The partition will be resized to free up \
space, preserving the data and/or systems present."                                                   ) \
            .format(self.metodo['part'][0])
        elif self.metodo['tipo'] == 'MANUAL':
            msg = _("If you choose this option will open the partition \
editor, allowing you to adjust the partitions according to your convenience. \
We do not recommend you use this option unless you know what you are doing.")
        elif self.metodo['tipo'] == 'NONE':

            msg = _("Canaima needs at least {0} to be installed. Select other \
disk with more available space.").format(humanize(ESPACIO_TOTAL))
        else:
            pass

        self.lbl4.set_text(msg)
Exemplo n.º 6
0
class PasoMetodo(gtk.Fixed):
    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)

    def seleccionar_disco(self, widget=None):
        primarias = 0
        extendidas = 0
        logicas = 0
        self.metodos = []

        try:
            self.barra_part.expose()
        except:
            pass
        self.cmb_metodo.get_model().clear()
        self.cmb_metodo.set_sensitive(False)
        CFG['w'].siguiente.set_sensitive(False)
        self.lbl4.set_text('')

        self.disco = self.cmb_discos.get_active_text()
        print '{0} seleccionado'.format(self.disco)
        self.particiones = self.part.lista_particiones(self.disco)

        if len(self.particiones) == 0:
            UserMessage(
                    message=_("""Disk  "{0}" needs a partition table to \
continue the installation. Do you want to create a partition table now?

If you press Cancel you can not use that disk to install Canaima.""")\
                    .format(self.disco),
                    title=_("Partition table not found."),
                    mtype=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_OK_CANCEL,
                    c_1=gtk.RESPONSE_OK, f_1=self.part.nueva_tabla_particiones,
                    p_1=(self.disco, 'msdos'), c_2=gtk.RESPONSE_OK,
                    f_2=self.seleccionar_disco, p_2=()
                    )
        else:
            try:
                self.barra_part.expose()
            except:
                pass

            self.total = self.particiones[0][9]
            CFG['w'].siguiente.set_sensitive(True)
            self.cmb_metodo.set_sensitive(True)

            mini = self.particiones[0][1]
            mfin = self.particiones[0][9]

            for t in self.particiones:
                if mini > t[1]:
                    mini = t[1]

                if mfin < t[2]:
                    mfin = t[2]

                if t[5] == 'primary' and t[4] != 'free':
                    primarias += 1
                elif t[5] == 'logical' and t[4] != 'free':
                    logicas += 1
                elif t[5] == 'extended':
                    extendidas += 1

            disco_array = [self.disco, mini, mfin, primarias, extendidas,
                           logicas]

            if self.total >= self.minimo:
                for p in self.particiones:
                    part = p[0]
                    tam = p[3]
                    fs = p[4]
                    tipo = p[5]
                    libre = p[8]

                    if fs != 'free' and libre >= self.minimo:
                        if fs in FSPROGS:
                            if tipo == 'logical' and FSPROGS[fs][1][0] != '':
                                if logicas < 10:
                                    self.metodos.append({
                                        'tipo': 'REDIM',
                                        'msg': _("Install resizing {0} to \
free up space ({1} free)").format(part, humanize(libre)),
                                        'part': p,
                                        'disco': disco_array
                                    })

                            elif tipo == 'primary' and FSPROGS[fs][1][0] != '':
                                if (extendidas < 1 and primarias < 4) \
                                or (extendidas > 0 and primarias < 2):
                                    self.metodos.append({
                                        'tipo': 'REDIM',
                                        'msg': _("Install resizing {0} to \
free up space ({1} free)").format(part, humanize(libre)),
                                        'part': p,
                                        'disco': disco_array
                                    })

                    if fs == 'free' and tam >= self.minimo:
                        if tipo == 'logical':
                            if logicas < 10:
                                self.metodos.append({
                                    'tipo': 'LIBRE',
                                    'msg': _("Install using available free \
space ({0})").format(humanize(tam)),
                                    'part': p,
                                    'disco': disco_array
                                })

                        elif tipo == 'primary':
                            if (extendidas < 1 and primarias < 4) \
                            or (extendidas > 0 and primarias < 2):
                                self.metodos.append({
                                    'tipo': 'LIBRE',
                                    'msg': _("Install using available free \
space ({0})").format(humanize(tam)),
                                    'part': p,
                                    'disco': disco_array
                                })

                self.metodos.append({
                    'tipo': 'TODO',
                    'msg': _("Install using the entire disk ({0})") \
                    .format(humanize(self.total)),
                    'part': disco_array,
                    'disco': disco_array
                })

                self.metodos.append({
                    'tipo': 'MANUAL',
                    'msg': _("Install editing partitions manually")\
                    .format(humanize(tam)),
                    'part': disco_array,
                    'disco': disco_array
                })

            else:
                self.metodos.append({
                    'tipo': 'NONE',
                    'msg': 'El tamaño del disco no es suficiente'
                })

                CFG['w'].siguiente.set_sensitive(False)
                self.cmb_metodo.set_sensitive(False)

            for k in sorted(self.metodos, key=lambda ordn: ordn['tipo'],
                            reverse=True):
                self.cmb_metodo.append_text(k['msg'])

            self.cmb_metodo.set_active(0)

    def establecer_metodo(self, widget=None):
        '''
            Crea una lista de los metodos de instalación disponibles para la
            partición
        '''
        for d in self.metodos:
            if d['msg'] == self.cmb_metodo.get_active_text():
                self.metodo = d

        if self.metodo['tipo'] == 'TODO':
            msg = _("By choosing this option, Canaima will occupy all of your \
hard drive. Note that all data present will be erased. You can take this time \
to make a backup before proceeding with the installation.")
        elif self.metodo['tipo'] == 'LIBRE':
            msg = _("By choosing this option, Canaima will be installed in \
the free space of {0} that is in you hard disk, preserving the other data and \
systems that are in the other portions of the disc.") \
            .format(humanize(self.metodo['part'][2] - self.metodo['part'][1]))
        elif self.metodo['tipo'] == 'REDIM':
            msg = _("This option will use the free space present in the \
partition {0} to install Canaima. The partition will be resized to free up \
space, preserving the data and/or systems present.") \
            .format(self.metodo['part'][0])
        elif self.metodo['tipo'] == 'MANUAL':
            msg = _("If you choose this option will open the partition \
editor, allowing you to adjust the partitions according to your convenience. \
We do not recommend you use this option unless you know what you are doing.")
        elif self.metodo['tipo'] == 'NONE':

            msg = _("Canaima needs at least {0} to be installed. Select other \
disk with more available space.").format(humanize(ESPACIO_TOTAL))
        else:
            pass

        self.lbl4.set_text(msg)