def sd_screen(self, forward=True): """sd_screen = select disk screen this method shows installed pardus disks to user rescue otherwise shows "there is no pardus installed" message""" self.disconnect_dbus() if forward: self.screen_container.append(self.ro_screen) def disk_info(disk): return "Selected Pardus disk : "+disk.args[0]+" label:"+disk.args[1] def select_disk(disk): self.selected_disk = disk self.pardus_device = diskutils.parseLinuxDevice(disk[0]) self.other_devices = diskutils.getDeviceMap() self.selected_disk_info = "Selected Pardus disk : %s label: %s "\ % (self.selected_disk[0],self.selected_disk[1]) self.sop_screen() pardus_partitions = disk_tools.get_pardus_part_info() if pardus_partitions: frame = gui_tools.ListDialog(disk_info, ['window', 'focus'], "Please select a partition from list") for pardus in disk_tools.get_pardus_part_info(): frame.add_item(pardus[0], select_disk, [pardus[1], pardus[2], pardus[3]]) self.create_window(frame, 80, 15) else: self.final_screen("There is no Pardus installed disk")
def sop_screen(self, forward=True): """sop_screen = select operation screen this method shows rescue operation about selected pardus partition""" if forward: self.screen_container.append(self.sd_screen) frame = gui_tools.ListDialog(self.selected_disk_info, ['window', 'focus'], "Please select an operation") frame.add_item("Reinstall GRUB (boot problems)", self.go_screen) frame.add_item("Change password (lost password)", self.ul_screen) frame.add_item("Pisi history (undo package operations)", self.phl_screen) self.create_window(frame, 80, 15)