vinstall / vinstall / controller /

Full commit
#-*- coding: utf-8 -*-

"""The VectorLinux installer


from vinstall.core import Application, Render, Controller, model

class Introduction(Controller):
    """Initial screen

    def __init__(self):

        self._next = None

    def render(self):
        """Present the install types to the user

        title = "VectorLinux installer"
        intro = ("Welcome to the VectorLinux installer. Please select one "
                "option. The automatic option will let you pick a disk to "
                "install Vector in, and we will take it from there. If you "
                "need more, please select the advanced option.")
        options = model.ExclusiveOptionList(
                {"name": "Automatic"},
                {"name": "Advanced"})
        return Render(title, intro, options)

    def next(self):
        """Return next controller depending on self._next.
        self._next will be defined by user selection

        return self._next

    def previous(self):
        """Usually this is the first one, return None. If there is more than
        one install source available, then SourceSelection was the first.

        if "sources" in self.config:
            from vinstall.controller import sourceselection
            return sourceselection.SourceSelection
            return None

    def process(self, index):
        """Set the next controller in the self._next attribute

        from vinstall.controller import automatic, advanced
        self._next = [automatic.AutomaticMode, advanced.AdvancedMode][index]