def __init__(self, session, disk):
     self.session = session
     Screen.__init__(self, session)
     self.disk = disk
     self.refreshMP(False)
     self['menu'] = ExtrasList(self.partitions)
     self['menu'].onSelectionChanged.append(self.selectionChanged)
     self['key_red'] = Button('')
     self['key_green'] = Button('')
     self['key_yellow'] = Button('')
     self['key_blue'] = Button(_('Exit'))
     self['actions'] = ActionMap(
         ['OkCancelActions', 'ColorActions'], {
             'blue': self.quit,
             'yellow': self.yellow,
             'green': self.green,
             'red': self.red,
             'cancel': self.quit
         }, -2)
     self.onShown.append(self.setWindowTitle)
     if len(self.disk[5]) > 0:
         if self.disk[5][0][2] == 'Linux':
             self['key_green'].setText(_('Check'))
             self['key_yellow'].setText(_('Format'))
     if self.disk[5][0][2] == 'Linux swap':
         self['key_red'].setText('')
     else:
         mp = self.mountpoints.get(self.disk[0], 1)
         if len(mp) > 0:
             self.mounted = True
             self['key_red'].setText(_('Umount'))
         else:
             self.mounted = False
             self['key_red'].setText(_('Mount'))
Exemplo n.º 2
0
	def __init__(self, session, args = 0):
		Screen.__init__(self, session)
		
		list = []
		list.append(SimpleEntry(_("Hard Drive Informations"), "hdinfo.png"))
		list.append(SimpleEntry(_("Hard Drive Setup"), "hdsetup.png"))
		list.append(SimpleEntry("---", "div.png"))
		list.append(SimpleEntry(_("Usb Stick Setup"), "usbsetup.png"))
		
		self['menu'] = ExtrasList(list)
		self["actions"] = ActionMap(["SetupActions"],
		{
			"ok": self.ok,
			"cancel": self.quit,
		}, -2)
Exemplo n.º 3
0
 def __init__(self, session, args = 0):
     Screen.__init__(self, session)
     self.running = list()
     self.installed = list()
     self.daemons = list()
     self['menu'] = ExtrasList(list())
     self['menu'].onSelectionChanged.append(self.selectionChanged)
     self['key_green'] = Button('')
     self['key_red'] = Button('')
     self['key_blue'] = Button(_('Exit'))
     self['key_yellow'] = Button('')
     self['actions'] = ActionMap(['OkCancelActions', 'ColorActions'], {'blue': self.quit,
      'yellow': self.yellow,
      'red': self.red,
      'green': self.green,
      'cancel': self.quit}, -2)
     self.onFirstExecBegin.append(self.drawList)
     self.onShown.append(self.setWindowTitle)
Exemplo n.º 4
0
    def __init__(self, session, args = 0):
        self.session = session
        Screen.__init__(self, session)
        self.disks = list()
        self.mdisks = Disks()
        for disk in self.mdisks.disks:
            capacity = '%d MB' % (disk[1] / 1048576)
            self.disks.append(DiskEntry(disk[3], capacity, disk[2]))

        self['menu'] = ExtrasList(self.disks)
        self['key_red'] = Button(_('Partitions'))
        self['key_green'] = Button('Info')
        self['key_yellow'] = Button(_('Initialize'))
        self['key_blue'] = Button(_('Exit'))
        self['actions'] = ActionMap(['OkCancelActions', 'ColorActions'], {'blue': self.quit,
         'yellow': self.yellow,
         'green': self.green,
         'red': self.red,
         'cancel': self.quit}, -2)
        self.onShown.append(self.setWindowTitle)