Skip to content

Commit

Permalink
Removed get_tarallo_id method and commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
il-palmi committed Nov 10, 2024
1 parent 25652de commit de639aa
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions pinolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,13 +371,6 @@ def get_multiple_drive_selection(self):

return drives

def get_tarallo_id(self, drive: str):
for row in range(self.drivesTableView.rowCount()):
item = self.drivesTableView.item(row, DRIVES_TABLE_NAME)
if item.text() == drive:
return self.drivesTableView.item(row, DRIVES_TABLE_TARALLO_ID).text()
return None

def show_smart_data(self):
rows = self.drivesTableView.selectionModel().selectedRows()
if len(rows) == 0:
Expand Down Expand Up @@ -598,8 +591,6 @@ def gui_update(self, command: str, command_data: str):
"You did not enter the root password.\n" "Some commands may not work correctly.\n" "Refresh to insert the password.", dialog_type="ok"
)

# self.check_disk_usage()

def closeEvent(self, a0: QCloseEvent) -> None:
"""
This function is called when the window is closed.
Expand Down Expand Up @@ -928,6 +919,18 @@ def update_data(self, command_data: List[dict]):
drive.update(drive_data)
continue

def get_selected_drives(self, rows: List[QModelIndex]) -> List[Drive]:
if rows is None:
return None
drives = []
for index in rows:
drives.append(self.drives[index.row()])
return drives

def store_smart_data(self, command_data: dict):
for drive in self.drives:
if drive.name == command_data["disk"]:
drive.smart_data = {"output": command_data["output"], "status": command_data["status"]}

def _resize_columns(self):
for column in range(3):
Expand Down

0 comments on commit de639aa

Please sign in to comment.