def closeEvent(self, event): if sys.platform != "darwin" and self.app.show_minimize_message: msg = QMessageBox(self) msg.setWindowTitle("App Minimized") msg.setText("The app will be minimized to your system tray.") msg.setIcon(QMessageBox.Icon.Information) check = QCheckBox("Don't show again.") msg.setCheckBox(check) msg.exec_() self.app.show_minimize_message = not check.isChecked() Settings.set_param("minimize", not self.app.show_minimize_message)
def get_days_since_download(self): if Settings.get_param("download_time") is None: Settings.set_param("download_time", datetime.datetime.now()) download_time = Settings.get_param("download_time") days_since_download = (datetime.datetime.now() - download_time).days return days_since_download