class TimesubzoneWindow(SetupWindow):
    def __init__(self, callback, setupconfig):
        super().__init__()

        # Init Translation
        trans = gettext.translation("archsetup", "locale", fallback=True)
        trans.install()

        # Init setup tools
        self.timezone = Timezone()
        self.setupconfig = setupconfig

        # Add widgets and setup callbacks...
        self.addwidget(TextWidget(1, 1, _('Please select a subzone...'),  40))
        self.radiowidget = RadioWidget(0, 0, 40, self.timezone.list_subzones(self.setupconfig.gettimezone()), self.event)
        self.addwidget(ScrollWidget(3, 1, 40, 20, self.radiowidget, self.event))
        self.addwidget(SpacerWidget(23, 1, 1))
        self.setnextcallback(callback, 'next')
        self.setprevcallback(callback, 'prev')

    def event(self, event, opt=''):
        if event == 'show':
            self.radiowidget.setlist(self.timezone.list_subzones(self.setupconfig.gettimezone()))
            self.refresh()
        elif event == 'refresh':
            self.refresh()
        elif event == 'selection':
            self.setupconfig.settimesubzone(opt)
        else:
            super().event(event)
class TimesubzoneWindow(SetupWindow):
    def __init__(self, callback, setupconfig):
        super().__init__()

        # Init Translation
        trans = gettext.translation("archsetup", "locale", fallback=True)
        trans.install()

        # Init setup tools
        self.timezone = Timezone()
        self.setupconfig = setupconfig

        # Add widgets and setup callbacks...
        self.addwidget(TextWidget(1, 1, _('Please select a subzone...'), 40))
        self.radiowidget = RadioWidget(
            0, 0, 40,
            self.timezone.list_subzones(self.setupconfig.gettimezone()),
            self.event)
        self.addwidget(ScrollWidget(3, 1, 40, 20, self.radiowidget,
                                    self.event))
        self.addwidget(SpacerWidget(23, 1, 1))
        self.setnextcallback(callback, 'next')
        self.setprevcallback(callback, 'prev')

    def event(self, event, opt=''):
        if event == 'show':
            self.radiowidget.setlist(
                self.timezone.list_subzones(self.setupconfig.gettimezone()))
            self.refresh()
        elif event == 'refresh':
            self.refresh()
        elif event == 'selection':
            self.setupconfig.settimesubzone(opt)
        else:
            super().event(event)
Beispiel #3
0
    def __init__(self, callback, setupconfig):
        super().__init__()

        # Init Translation
        trans = gettext.translation("archsetup", "locale", fallback=True)
        trans.install()

        # Init setup tools
        self.timezone = Timezone()
        self.setupconfig = setupconfig

        # Add widgets and setup callbacks...
        self.addwidget(TextWidget(1, 1, _('Please select a subzone...'), 40))

        # Loading subzones with '*' loads every available subzone, this makes
        # sure that the pad will be large enough to hold every subset
        self.radiowidget = RadioWidget(0, 0, 40,
                                       self.timezone.list_subzones('*'),
                                       self.event)

        self.scroller = ScrollWidget(3, 1, 40, 20, self.radiowidget,
                                     self.event)
        self.addwidget(self.scroller)
        self.addwidget(SpacerWidget(23, 1, 1))
        self.setnextcallback(callback, 'next')
        self.setprevcallback(callback, 'prev')
Beispiel #4
0
class MainLocaleWindow(SetupWindow):
    def __init__(self, callback, setupconfig):
        super().__init__()
        self.callback = callback

        # Init Translation
        trans = gettext.translation("archsetup", "locale", fallback=True)
        trans.install()

        self.setupconfig = setupconfig
        self.addwidget(TextWidget(1, 1, _('Please select your main locale:'),  40))
        self.radiolist = RadioWidget(0,0,40, setupconfig.getlocales(), self.event)
        self.addwidget(ScrollWidget(3, 1, 40, 20, self.radiolist, self.event))
        self.addwidget(SpacerWidget(23, 1, 1))
        self.setnextcallback(self.callback, 'next')
        self.setprevcallback(callback, 'prev')

    def event(self, event, opt=''):
        if event == 'show':
            self.radiolist.setlist(self.setupconfig.getlocales())
            self.setupconfig.setmainlocale(self.setupconfig.getlocales()[0]) # Set first locale by default
            self.refresh()
        elif event == 'refresh':
            self.refresh()
        elif event == 'selection':
            self.setupconfig.setmainlocale(opt)
        else:
            super().event(event)
Beispiel #5
0
class MainLocaleWindow(SetupWindow):
    def __init__(self, callback, setupconfig):
        super().__init__()
        self.callback = callback

        # Init Translation
        trans = gettext.translation("archsetup", "locale", fallback=True)
        trans.install()

        self.setupconfig = setupconfig
        self.addwidget(
            TextWidget(1, 1, _('Please select your main locale:'), 40))
        self.radiolist = RadioWidget(0, 0, 40, setupconfig.getlocales(),
                                     self.event)
        self.addwidget(ScrollWidget(3, 1, 40, 20, self.radiolist, self.event))
        self.addwidget(SpacerWidget(23, 1, 1))
        self.setnextcallback(self.callback, 'next')
        self.setprevcallback(callback, 'prev')

    def event(self, event, opt=''):
        if event == 'show':
            self.radiolist.setlist(self.setupconfig.getlocales())
            self.setupconfig.setmainlocale(self.setupconfig.getlocales()
                                           [0])  # Set first locale by default
            self.refresh()
        elif event == 'refresh':
            self.refresh()
        elif event == 'selection':
            self.setupconfig.setmainlocale(opt)
        else:
            super().event(event)
Beispiel #6
0
    def __init__(self, callback, setupconfig):
        super().__init__()
        self.callback = callback

        # Init Translation
        trans = gettext.translation("archsetup", "locale", fallback=True)
        trans.install()

        self.setupconfig = setupconfig
        self.addwidget(
            TextWidget(1, 1, _('Please select your main locale:'), 40))
        self.radiolist = RadioWidget(0, 0, 40, setupconfig.getlocales(),
                                     self.event)
        self.addwidget(ScrollWidget(3, 1, 40, 20, self.radiolist, self.event))
        self.addwidget(SpacerWidget(23, 1, 1))
        self.setnextcallback(self.callback, 'next')
        self.setprevcallback(callback, 'prev')
    def __init__(self, callback, setupconfig):
        super().__init__()

        # Init Translation
        trans = gettext.translation("archsetup", "locale", fallback=True)
        trans.install()

        # Init setup tools
        self.timezone = Timezone()
        self.setupconfig = setupconfig

        # Add widgets and setup callbacks...
        self.addwidget(TextWidget(1, 1, _('Please select a subzone...'), 40))
        self.radiowidget = RadioWidget(
            0, 0, 40,
            self.timezone.list_subzones(self.setupconfig.gettimezone()),
            self.event)
        self.addwidget(ScrollWidget(3, 1, 40, 20, self.radiowidget,
                                    self.event))
        self.addwidget(SpacerWidget(23, 1, 1))
        self.setnextcallback(callback, 'next')
        self.setprevcallback(callback, 'prev')
Beispiel #8
0
    def __init__(self, callback, setupconfig):
        super().__init__()
        self.callback = callback

        # Init Translation
        trans = gettext.translation("archsetup", "locale", fallback=True)
        trans.install()

        self.setupconfig = setupconfig
        self.addwidget(TextWidget(1, 1, _('Please select your main locale:'),  40))
        self.radiolist = RadioWidget(0,0,40, setupconfig.getlocales(), self.event)
        self.addwidget(ScrollWidget(3, 1, 40, 20, self.radiolist, self.event))
        self.addwidget(SpacerWidget(23, 1, 1))
        self.setnextcallback(self.callback, 'next')
        self.setprevcallback(callback, 'prev')
Beispiel #9
0
    def __init__(self, callback, setupconfig):
        super().__init__()

        # Init Translation
        trans = gettext.translation("archsetup", "locale", fallback=True)
        trans.install()

        self.setupconfig = setupconfig
        self.addwidget(TextWidget(1, 1, _('Please select a keyboard...'), 40))
        keyboard = Keyboard()
        items = keyboard.list_keyboard_layouts()
        self.addwidget(
            ScrollWidget(3, 1, 40, 20, RadioWidget(0, 0, 40, items,
                                                   self.event), self.event))
        self.addwidget(SpacerWidget(23, 1, 1))
        self.setnextcallback(callback, 'next')
        self.setprevcallback(callback, 'prev')
Beispiel #10
0
    def __init__(self, callback, setupconfig):
        super().__init__()

        # Init Translation
        trans = gettext.translation("archsetup", "locale", fallback=True)
        trans.install()

        # Init setup tools
        self.timezone = Timezone()
        self.setupconfig = setupconfig

        # Add widgets and setup callbacks...
        self.addwidget(TextWidget(1, 1, _('Please select a subzone...'),  40))
        self.radiowidget = RadioWidget(0, 0, 40, self.timezone.list_subzones(self.setupconfig.gettimezone()), self.event)
        self.addwidget(ScrollWidget(3, 1, 40, 20, self.radiowidget, self.event))
        self.addwidget(SpacerWidget(23, 1, 1))
        self.setnextcallback(callback, 'next')
        self.setprevcallback(callback, 'prev')
Beispiel #11
0
    def __init__(self, callback, setupconfig):
        super().__init__()
        self.callback = callback

        # Init Translation
        trans = gettext.translation("archsetup", "locale", fallback=True)
        trans.install()

        self.setupconfig = setupconfig
        self.addwidget(
            TextWidget(1, 1, _('Please select your network type:'), 40))
        self.network = Network()
        items = ["LAN", "WIFI (not implemented)"]
        self.addwidget(
            ScrollWidget(3, 1, 40, 20, RadioWidget(0, 0, 40, items,
                                                   self.event), self.event))
        self.addwidget(SpacerWidget(23, 1, 1))
        self.network.test_network()
        self.next_button = self.setnextcallback(self.connect, 'next')
        self.setprevcallback(callback, 'prev')
Beispiel #12
0
    def __init__(self, callback, setupconfig):
        super().__init__()

        # Init Translation
        trans = gettext.translation("archsetup", "locale", fallback=True)
        trans.install()

        self.setupconfig = setupconfig
        self.addwidget(
            TextWidget(
                1, 1,
                _('Please select the disk, where ArchLinux should be installed'
                  ), 40))
        disk = Disks()
        items = disk.list_disks()
        self.addwidget(
            ScrollWidget(4, 1, 40, 20, RadioWidget(0, 0, 40, items,
                                                   self.event), self.event))
        self.addwidget(SpacerWidget(23, 1, 1))
        self.setnextcallback(callback, 'next')
        self.setprevcallback(callback, 'prev')
Beispiel #13
0
    def __init__(self, callback, setupconfig):
        super().__init__()

        # Init Translation
        trans = gettext.translation("archsetup", "locale", fallback=True)
        trans.install()

        self.setupconfig = setupconfig
        self.addwidget(TextWidget(1, 1, _('Please choose a filesystem:'), 40))
        fs = Filesystem()
        buff = fs.list_filesystems()
        if "mkfs.ext4" in buff:
            items = ["mkfs.ext4"]
            buff.remove("mkfs.ext4")
            items += buff
        else:
            items = buff
        self.addwidget(
            ScrollWidget(3, 1, 40, 20, RadioWidget(0, 0, 40, items,
                                                   self.event), self.event))
        self.addwidget(SpacerWidget(23, 1, 1))
        self.setnextcallback(callback, 'next')
        self.setprevcallback(callback, 'prev')