forked from Taiko2k/Tauon
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Somewhat arrange to current upstream state Small Prefs fix up Bootstrap: Use dataclass t_main reworks Move classes on top of main More reworking GuiVar: Remove duplicated macOS detection More rework More rework, create class Formats, remove global formats Fix colon convention Remove empty rework file More refactoring Add more typing More rework Remove old comment Refactor Refactor fixups Moar refactor Refactor class Tauon Fix up asset_loader() Moar refactor More reworks Remove doubled ctypes import More refactor Further refactor and add accidentally deleted classes back Premove touchups Add Bag to Tauon and continue refactoring pctl reworks Move some things around and rename devance func to "previous" further reworks Further reworks Further reworks More refactoring, convert Prefs to a dataclass, to be merged with Bag Small refactor Small refactor + adapt some upstream changes fix lastfm url Start using classes for Radio playlists and stations (Taiko2k#1422) * Radio changes WIP * Fix ups to get it running * Add migrations * Convert more code * Fix broken buttons * Do not wipe website URL if stream URL hasn't changed * Handle radio websocket better * Fix indent * Add the default station fallback URL back * Fix up adding radio and m3u radio * Fix if * Fix comma Fix merge issues Start up more refactors Further reworks and global eliminations More reworks More reworks, just kill me already Theme refactor Shoot me noooow, this is a call for heeeelp MORE REWORKS Probably enough for today More input refactors Fix get_track_in_playlist() Stash some more reworks Further refactors Simplify Menu Moar Reeefactor More refactor
- Loading branch information
Showing
7 changed files
with
37,263 additions
and
38,076 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,42 @@ | ||
from __future__ import annotations | ||
|
||
#from dataclasses import dataclass | ||
from dataclasses import dataclass | ||
from typing import TYPE_CHECKING | ||
|
||
if TYPE_CHECKING: | ||
from collections.abc import Callable | ||
from io import TextIOWrapper | ||
from pathlib import Path | ||
from typing import Any | ||
from sdl2 import render, video | ||
|
||
from tauon.__main__ import LogHistoryHandler | ||
|
||
#@dataclass | ||
@dataclass | ||
class Holder: | ||
"""Class that holds variables for forwarding them from tauon.py to t_main.py""" | ||
"""Class that holds variables for forwarding them from __main__.py to t_main.py""" | ||
|
||
t_window: Any # SDL_CreateWindow() return type (???) | ||
renderer: Any # SDL_CreateRenderer() return type (???) | ||
logical_size: list[int] # X Y res | ||
window_size: list[int] # X Y res | ||
t_window: video.LP_SDL_Window # SDL_CreateWindow() return type | ||
renderer: render.LP_SDL_Renderer # SDL_CreateRenderer() return type | ||
logical_size: list[int] # X Y res | ||
window_size: list[int] # X Y res | ||
maximized: bool | ||
scale: float | ||
window_opacity: float | ||
draw_border: bool | ||
transfer_args_and_exit: Callable[[]] # transfer_args_and_exit() - TODO(Martin): This should probably be moved to extra module | ||
transfer_args_and_exit: Callable[[]] # transfer_args_and_exit() - TODO(Martin): This should probably be moved to extra module | ||
old_window_position: tuple [int, int] | None # X Y res | ||
install_directory: Path | ||
user_directory: Path | ||
pyinstaller_mode: bool | ||
phone: bool | ||
window_default_size: tuple[int, int] # X Y res | ||
window_title: bytes # t_title.encode("utf-8") | ||
window_default_size: tuple[int, int] # X Y res | ||
window_title: bytes # t_title.encode("utf-8") | ||
fs_mode: bool | ||
t_title: str # "Tauon" | ||
n_version: str # "7.9.0" | ||
t_version: str # "v" + n_version | ||
t_id: str # "tauonmb" | "com.github.taiko2k.tauonmb" | ||
t_agent: str # "TauonMusicBox/7.9.0" | ||
t_title: str # "Tauon" | ||
n_version: str # "7.9.0" | ||
t_version: str # "v" + n_version | ||
t_id: str # "tauonmb" | "com.github.taiko2k.tauonmb" | ||
t_agent: str # "TauonMusicBox/7.9.0" | ||
dev_mode: bool | ||
instance_lock: TextIOWrapper | None | ||
log: LogHistoryHandler | ||
|
||
holder = Holder() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.