mirror of
https://github.com/NinjaCheetah/NUSGet.git
synced 2026-02-27 15:15:28 -05:00
Clicking the labels for checkboxes now toggles the checkboxes again
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
# "modules/core.py", licensed under the MIT license
|
||||
# Copyright 2024 NinjaCheetah
|
||||
# Copyright 2024-2025 NinjaCheetah
|
||||
|
||||
import requests
|
||||
from dataclasses import dataclass
|
||||
from typing import List
|
||||
|
||||
from PySide6.QtCore import Qt as _Qt
|
||||
|
||||
|
||||
@dataclass
|
||||
class TitleData:
|
||||
@@ -36,6 +38,13 @@ class BatchResults:
|
||||
failed_titles: List[str]
|
||||
|
||||
|
||||
def connect_label_to_checkbox(label, checkbox):
|
||||
def toggle_checkbox(event):
|
||||
if checkbox.isEnabled() and event.button() == _Qt.LeftButton:
|
||||
checkbox.toggle()
|
||||
label.mousePressEvent = toggle_checkbox
|
||||
|
||||
|
||||
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.
|
||||
gh_api_request = requests.get(url="https://api.github.com/repos/NinjaCheetah/NUSGet/releases/latest", stream=True)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# "modules/download_batch.py", licensed under the MIT license
|
||||
# Copyright 2024 NinjaCheetah
|
||||
# Copyright 2024-2025 NinjaCheetah
|
||||
|
||||
import pathlib
|
||||
from typing import List
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# "modules/download_dsi.py", licensed under the MIT license
|
||||
# Copyright 2024 NinjaCheetah
|
||||
# Copyright 2024-2025 NinjaCheetah
|
||||
|
||||
import pathlib
|
||||
from typing import List, Tuple
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# "modules/download_wii.py", licensed under the MIT license
|
||||
# Copyright 2024 NinjaCheetah
|
||||
# Copyright 2024-2025 NinjaCheetah
|
||||
|
||||
import pathlib
|
||||
from typing import List, Tuple
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# "modules/tree.py", licensed under the MIT license
|
||||
# Copyright 2024 NinjaCheetah
|
||||
# Copyright 2024-2025 NinjaCheetah
|
||||
|
||||
from modules.core import TitleData
|
||||
from PySide6.QtCore import QAbstractItemModel, QModelIndex, Qt, QSortFilterProxyModel
|
||||
|
||||
Reference in New Issue
Block a user