mirror of
https://github.com/NinjaCheetah/NUSGet.git
synced 2026-02-27 23:25:29 -05:00
Added support for custom download directories
This commit is contained in:
@@ -46,6 +46,12 @@ def connect_label_to_checkbox(label, checkbox):
|
||||
checkbox.toggle()
|
||||
label.mousePressEvent = toggle_checkbox
|
||||
|
||||
def connect_is_enabled_to_checkbox(items, chkbox):
|
||||
for item in items:
|
||||
if chkbox.isChecked():
|
||||
item.setEnabled(True)
|
||||
else:
|
||||
item.setEnabled(False)
|
||||
|
||||
def check_nusget_updates(app, current_version: str, progress_callback=None) -> str | None:
|
||||
# Simple function to make a request to the GitHub API and then check if the latest available version is newer.
|
||||
@@ -76,6 +82,7 @@ def get_config_file() -> pathlib.Path:
|
||||
|
||||
def save_config(config_data: dict) -> None:
|
||||
config_file = get_config_file()
|
||||
print(f"writing data: {config_data}")
|
||||
open(config_file, "w").write(json.dumps(config_data))
|
||||
|
||||
def update_setting(config_data: dict, setting: str, value: any) -> None:
|
||||
|
||||
Reference in New Issue
Block a user