mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 14:42:54 +01:00
chore: drop unused files
This commit is contained in:
1 parent
1b4210dcf5
commit
5e2d3d1a88
5 files changed
+8
-91
No files matched your search
@@ -1,15 +0,0 @@
|
|||||||
"""
|
|
||||||
This file is intended to be patched by package maintainers
|
|
||||||
repackaging DZGUI for use in different distributions.
|
|
||||||
|
|
||||||
If DZGUI is going to be installed globally via a package manager
|
|
||||||
or other means and will reside in an immutable location, or needs to be
|
|
||||||
explicitly bound to a certain version, set the flag below to False.
|
|
||||||
|
|
||||||
This will disable the following:
|
|
||||||
|
|
||||||
- Version update checks at startup
|
|
||||||
- Ability to toggle between Stable/Testing branches in the Options menu
|
|
||||||
"""
|
|
||||||
|
|
||||||
ALLOW_UPDATES = True
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
"""
|
|
||||||
Find possible locations of default steam path
|
|
||||||
"""
|
|
||||||
|
|
||||||
def get_steam_dirs() -> list[Path]:
|
|
||||||
dirs = []
|
|
||||||
# pass 1
|
|
||||||
if shutil.which("locate") is not None:
|
|
||||||
# TODO: config or steamapps path? cf. LIBRARYFOLDERS_PATH
|
|
||||||
proc = subprocess.run(
|
|
||||||
["/usr/bin/locate", "Steam/config/libraryfolders.vdf"],
|
|
||||||
capture_output=True,
|
|
||||||
text=True
|
|
||||||
)
|
|
||||||
|
|
||||||
if proc.returncode == 0:
|
|
||||||
for d in proc.stdout.splitlines():
|
|
||||||
dirs.append(Path(d))
|
|
||||||
return dirs
|
|
||||||
|
|
||||||
# pass 2
|
|
||||||
for d in Path.home().rglob("Steam/config/libraryfolders.vdf"):
|
|
||||||
dirs.append(d)
|
|
||||||
|
|
||||||
# pass 3
|
|
||||||
# if still nothing, let them select it
|
|
||||||
# prompt what the dir should look like
|
|
||||||
if len(dirs) == 0:
|
|
||||||
print("none found")
|
|
||||||
return dirs
|
|
||||||
|
|
||||||
|
|
||||||
dirs = get_steam_dirs()
|
|
||||||
print(dirs)
|
|
||||||
|
|
||||||
# TODO: present these in a group of radio buttons
|
|
||||||
"""
|
|
||||||
when user toggles radio button, updates text saying
|
|
||||||
"this is the standard steam location on debian" etc.
|
|
||||||
|
|
||||||
if None or if not satisfied, pop a filepicker and choose
|
|
||||||
if selection was custom, it has to have a libraryfolders.vdf
|
|
||||||
keeps next button grayed out until requirements are satisfied
|
|
||||||
|
|
||||||
Cancel Next
|
|
||||||
"""
|
|
||||||
@@ -29,9 +29,9 @@ def check_updates(version: str) -> str | None:
|
|||||||
try:
|
try:
|
||||||
latest = get_latest_release()
|
latest = get_latest_release()
|
||||||
if latest is None:
|
if latest is None:
|
||||||
return
|
return None
|
||||||
if Version(version) >= Version(latest):
|
if Version(version) >= Version(latest):
|
||||||
return
|
return None
|
||||||
return latest
|
return latest
|
||||||
except Exception:
|
except Exception:
|
||||||
return
|
return None
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
import gi
|
import gi
|
||||||
|
|
||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "3.0")
|
||||||
from gi.repository import Gtk # noqa E402
|
from gi.repository import Gtk # noqa E402
|
||||||
|
|
||||||
|
|
||||||
class Icon(Gtk.Image):
|
class Icon(Gtk.Image):
|
||||||
def __init__(self, name: str, l_margin=0) -> None:
|
def __init__(self, name: str, l_margin: int = 0) -> None:
|
||||||
super().__init__(icon_name=name,
|
super().__init__(
|
||||||
icon_size=Gtk.IconSize.BUTTON,
|
icon_name=name, icon_size=Gtk.IconSize.BUTTON, margin_start=l_margin
|
||||||
margin_start=l_margin
|
|
||||||
)
|
)
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
import gi
|
|
||||||
gi.require_version("Gtk", "3.0")
|
|
||||||
from gi.repository import Gtk # noqa
|
|
||||||
|
|
||||||
class Watcher(Gtk.Dialog):
|
|
||||||
def __init__():
|
|
||||||
super().__init__()
|
|
||||||
pass
|
|
||||||
|
|
||||||
def bump_progress(self):
|
|
||||||
self.set_secondary_text("FOO")
|
|
||||||
|
|
||||||
#w = Watcher()
|
|
||||||
#thread = threading()
|
|
||||||
## compute here
|
|
||||||
#GLib.idle_add(self._bump_progress)
|
|
||||||
## raise window:
|
|
||||||
#Gdk.present_with_time(Gdk.CURRENT_TIME)
|
|
||||||
Reference in new issue
Block a user