def display(self, params): if 'skipPrevs' in self.install_config and self.install_config[ 'skipPrevs'] == True: self.delete() return ActionResult(False, {'goBack': True}) if 'autopartition' in self.install_config and self.install_config[ 'autopartition'] == True: return ActionResult(True, None) if 'delete_partition' in self.install_config and self.install_config[ 'delete_partition'] == True: self.delete() self.install_config['delete_partition'] = False self.device_index = self.install_config['diskindex'] self.disk_buttom_items = [] self.disk_buttom_items.append(('<Next>', self.next)) self.disk_buttom_items.append(('<Create New>', self.create_function)) self.disk_buttom_items.append(('<Delete All>', self.delete_function)) self.disk_buttom_items.append(('<Go Back>', self.go_back)) self.text_items = [] self.text_items.append(('Disk', 20)) self.text_items.append(('Size', 5)) self.text_items.append(('Type', 5)) self.text_items.append(('Mountpoint', 20)) self.table_space = 5 title = 'Current partitions:\n' self.window.addstr(0, (self.win_width - len(title)) / 2, title) info = "Unpartitioned space: " + str( self.disk_size[self.device_index][1]) + " MB, Total size: " + str( int(self.devices[self.device_index].size) / 1048576) + " MB" self.text_pane = TextPane(self.text_starty, self.maxx, self.text_width, "EULA.txt", self.text_height, self.disk_buttom_items, partition=True, popupWindow=True, install_config=self.install_config, text_items=self.text_items, table_space=self.table_space, default_start=1, info=info, size_left=str( self.disk_size[self.device_index][1])) self.window.set_action_panel(self.text_pane) return self.window.do_action()
def display(self): accept_decline_items = [('<Accept>', self.accept_function), ('<Cancel>', self.exit_function)] self.window.addstr(0, (self.win_width - len(self.title)) // 2, self.title) self.text_pane = TextPane(self.text_starty, self.maxx, self.text_width, self.eula_file_path, self.text_height, accept_decline_items) self.window.set_action_panel(self.text_pane) return self.window.do_action()
def display(self, params): accept_decline_items = [('<Accept>', self.accept_function), ('<Cancel>', self.exit_function)] title = 'VMWARE 2.0 LICENSE AGREEMENT' self.window.addstr(0, (self.win_width - len(title)) // 2, title) self.text_pane = TextPane(self.text_starty, self.maxx, self.text_width, "EULA.txt", self.text_height, accept_decline_items) self.window.set_action_panel(self.text_pane) return self.window.do_action()