1
0
Fork 0
mirror of synced 2024-06-17 10:04:43 +12:00

Rare: Small fixes and typos

* Default to closing to tray to respect the default setting
* On Windows, resolve the save path immediately if we don't alraedy know it
This commit is contained in:
loathingKernel 2023-09-10 18:35:25 +03:00
parent 7b33e4876e
commit 9d02fec6f8
No known key found for this signature in database
GPG key ID: CE0C72D0B53821FD
3 changed files with 6 additions and 3 deletions

View file

@ -215,7 +215,7 @@ class MainWindow(QMainWindow):
# lk: `accept_close` is set to `True` by the `close()` method, overrides exiting to tray in `closeEvent()`
# lk: ensures exiting instead of hiding when `close()` is called programmatically
if not self.__accept_close:
if self.settings.value("sys_tray", False, bool):
if self.settings.value("sys_tray", True, bool):
self.hide()
e.ignore()
return

View file

@ -117,6 +117,7 @@ class CloudSaves(QWidget, SideTabContents):
logger.warning(str(e))
resolver = WineResolver(self.core, self.rgame.raw_save_path, self.rgame.app_name)
if not resolver.wine_env.get("WINEPREFIX"):
del resolver
self.cloud_save_path_edit.setText("")
QMessageBox.warning(self, "Warning", "No wine prefix selected. Please set it in settings")
return
@ -145,7 +146,7 @@ class CloudSaves(QWidget, SideTabContents):
self,
self.tr("Error - {}").format(self.rgame.title),
self.tr(
"Error while calculating path for <b>{}</b>. Insufficient permisions to create <b>{}</b>"
"Error while calculating path for <b>{}</b>. Insufficient permissions to create <b>{}</b>"
).format(self.rgame.title, path),
)
return
@ -205,7 +206,10 @@ class CloudSaves(QWidget, SideTabContents):
self.cloud_ui.cloud_sync.blockSignals(True)
self.cloud_ui.cloud_sync.setChecked(self.rgame.auto_sync_saves)
self.cloud_ui.cloud_sync.blockSignals(False)
self.cloud_save_path_edit.setText(self.rgame.save_path if self.rgame.save_path else "")
if platform.system() == "Windows" and not self.rgame.save_path:
self.compute_save_path()
def update_game(self, rgame: RareGame):
if self.rgame:

View file

@ -61,7 +61,6 @@ class LinuxSettings(QWidget):
self.ui.linux_layout.addWidget(self.mangohud)
self.mangohud.load_settings(self.name)
def load_prefix(self) -> str:
return self.load_setting(
f"{self.name}.env",