コード例 #1
0
 def _has_supported_kraken_result(self, has_supported_kraken: bool) -> None:
     if has_supported_kraken:
         self._start_refresh()
     else:
         _LOG.error("Unable to find supported Kraken device!")
         self.main_view.show_error_message_dialog(
             "Unable to find supported NZXT Kraken devices",
             "It was not possible to connect to any of the supported NZXT Kraken devices.\n\n"
             f"{APP_NAME} currently supports only NZXT Kraken X42, X52, X62 or X72.\n\n"
             "If one of the supported devices is connected, try to run the following command and then reboot:\n\n"
             f"{self._get_udev_command()}")
         get_default_application().quit()
コード例 #2
0
 def _handle_refresh_error(self, ex: Exception) -> None:
     if isinstance(ex, OSError):
         self.main_view.show_error_message_dialog(
             "Unable to communicate with the NZXT Kraken",
             "It was not possible to communicate with the NZXT Kranen.\n\n"
             "Most probably the current user does not have the permission to access it.\n\n"
             "You can try to fix the issue running the following command and then rebooting:\n\n"
             f"{self._get_udev_command()}\n\n"
             "For more info check the section \"Adding Udev rule\" of the project's README.md."
         )
         get_default_application().quit()
     _LOG.exception("Refresh error: %s", str(ex))
コード例 #3
0
ファイル: main_presenter.py プロジェクト: leinardi/gkraken
 def _legacy_kraken_warning_message(self) -> None:
     confirmed = self.main_view.show_warning_dialog(
         "Driver Conflict",
         "GKraken has detected a potential driver conflict:\n\n"
         "GKraken only supports NZXT Kraken devices but a EVGA CLC cooler can be mistaken for a kraken device\n\n"
         "Choose:\n"
         "YES if you have a EVGA CLC installed to quit and avoid any issues\n"
         "NO if you do not have a EVGA CLC installed")
     if confirmed:
         self._check_supported_kraken()  # connect to the device this time.
     else:
         get_default_application().quit()