chore: restore ALLOW_UPDATES flag

This commit is contained in:
aclist 2026-05-18 20:30:02 +09:00
parent af3a9cfa77
commit 418c0f026d
3 changed files with 15 additions and 2 deletions

13
dzgui/const/update.py Normal file
View File

@ -0,0 +1,13 @@
"""
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 ability for the application to self-manage and
will suppress the "Updates available" button in the gutter.
"""
ALLOW_UPDATES = True

View File

@ -65,7 +65,6 @@
## Unreleased
- Load offline mods
- Choose to jump into splash screen instead of server
- Setup wizard
- Local documentation
- Raw debug command in context menu

View File

@ -17,6 +17,7 @@ from dzgui.const.constants import (
TMP_PATH,
TMP_TARBALL,
)
from dzgui.const.update import ALLOW_UPDATES
from dzgui.const.enum import ServerTab
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
from dzgui.strings import dialogs
@ -94,7 +95,7 @@ class RightPanel(Gtk.Box):
valign=Gtk.Align.END,
spacing=10,
)
if update is not None:
if ALLOW_UPDATES and update is not None:
self.update_button.set_halign(Gtk.Align.END)
self.gutter_box.add(self.update_button)
self.update_button.connect(