Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
il-palmi authored Nov 10, 2024
2 parents de639aa + b9ecb1d commit e512898
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion client.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,4 @@ def update_host(self, line: str):
else:
args = ""

self.data_received.emit(cmd, args)
self.data_received.emit(cmd, args)
15 changes: 3 additions & 12 deletions dialogs/NetworkSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,7 @@ def find_image(self):
return
image_directory = self.imagesDirectoryLineEdit.text()
if image_directory == "":
warning_dialog(
"The path for the default system image is empty. Set it, plz.",
dialog_type="ok"
)
warning_dialog("The path for the default system image is empty. Set it, plz.", dialog_type="ok")
return

if image_directory[-1] != "/":
Expand Down Expand Up @@ -257,12 +254,6 @@ def __init__(self, parent: NetworkSettings):

def setup(self):
self.setFileName(self.gif_path)
self.setScaledSize(
QSize().scaled(
self.parent.asdLabel.width(),
self.parent.asdLabel.height(),
Qt.KeepAspectRatio
)
)
self.setScaledSize(QSize().scaled(self.parent.asdLabel.width(), self.parent.asdLabel.height(), Qt.KeepAspectRatio))
self.start()
self.parent.asdLabel.setMovie(self)
self.parent.asdLabel.setMovie(self)
12 changes: 7 additions & 5 deletions pinolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

# Linter settings
from twisted.internet.interfaces import IReactorTCP

reactor: IReactorTCP


Expand Down Expand Up @@ -311,7 +312,10 @@ def sleep(self):
for drive in drives:
self.send_command("queued_sleep " + drive.name)

def select_image(self, image_path: str, ):
def select_image(
self,
image_path: str,
):
self.select_system_dialog = SelectSystemDialog(self)
self.send_command(f"list_iso {image_path.rstrip('/')}")
if self.select_system_dialog.exec_() == QDialog.Accepted:
Expand Down Expand Up @@ -360,10 +364,7 @@ def get_multiple_drive_selection(self):
selected_rows = self.drivesTableView.selectionModel().selectedRows()

if len(selected_rows) == 0:
warning_dialog(
"There are no selected drives.",
dialog_type="ok"
)
warning_dialog("There are no selected drives.", dialog_type="ok")
return None

for row in selected_rows:
Expand Down Expand Up @@ -1005,6 +1006,7 @@ def stop(self):

# Integrate twisted event loop in pyqt loop
import qt5reactor

qt5reactor.install()
from twisted.internet import reactor

Expand Down
1 change: 1 addition & 0 deletions ui/NetworkSettingsDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def retranslateUi(self, NetworkSettingsDialog):

if __name__ == "__main__":
import sys

app = QtWidgets.QApplication(sys.argv)
NetworkSettingsDialog = QtWidgets.QDialog()
ui = Ui_NetworkSettingsDialog()
Expand Down
1 change: 1 addition & 0 deletions ui/SelectSystemDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def retranslateUi(self, SelectSystemDialog):

if __name__ == "__main__":
import sys

app = QtWidgets.QApplication(sys.argv)
SelectSystemDialog = QtWidgets.QDialog()
ui = Ui_SelectSystemDialog()
Expand Down
1 change: 1 addition & 0 deletions ui/SmartDataDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def retranslateUi(self, SmartDataDialog):

if __name__ == "__main__":
import sys

app = QtWidgets.QApplication(sys.argv)
SmartDataDialog = QtWidgets.QWidget()
ui = Ui_SmartDataDialog()
Expand Down
1 change: 1 addition & 0 deletions utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def __init__(self):
self.tabs = []
self.setTabsClosable(True)
self.tabCloseRequested.connect(lambda index: self.removeTab(index))

def add_tab(self, drive: str, status: Optional[str], uploaded: bool, text: list):
widget = QtWidgets.QWidget()
layout = QtWidgets.QVBoxLayout()
Expand Down

0 comments on commit e512898

Please sign in to comment.