mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
update in file menu not showing on first launch
removed feature: hide update in file menu if dont ask is not checked
This commit is contained in:
parent
a12c397357
commit
fc3c8746c8
@ -4,6 +4,7 @@ import tkinter as tk
|
||||
import tkinter.ttk as ttk
|
||||
import typing
|
||||
|
||||
from fishy.gui import update_dialog
|
||||
from ttkthemes import ThemedTk
|
||||
|
||||
from fishy import helper
|
||||
@ -56,8 +57,11 @@ def _create(gui: 'GUI'):
|
||||
dark_mode_var.set(int(config.get('dark_mode', True)))
|
||||
filemenu.add_checkbutton(label="Dark Mode", command=_toggle_mode,
|
||||
variable=dark_mode_var)
|
||||
if config.get("dont_ask_update", False):
|
||||
filemenu.add_command(label="Update", command=lambda: helper.update(gui))
|
||||
|
||||
def update():
|
||||
config.delete("dont_ask_update")
|
||||
update_dialog.check_update(gui, True)
|
||||
filemenu.add_command(label="Update", command=update)
|
||||
|
||||
def installer():
|
||||
if filemenu.entrycget(4, 'label') == "Remove FishyQR":
|
||||
|
@ -43,8 +43,10 @@ def _show(gui, currentversion, newversion, returns):
|
||||
top.start()
|
||||
|
||||
|
||||
def check_update(gui):
|
||||
def check_update(gui, manual_check=False):
|
||||
if not auto_update.upgrade_avail() or config.get("dont_ask_update", False):
|
||||
if manual_check:
|
||||
logging.info("No update is available.")
|
||||
return
|
||||
|
||||
cv, hv = auto_update.versions()
|
||||
|
@ -4,5 +4,5 @@ from .helper import (addon_exists, create_shortcut, create_shortcut_first,
|
||||
install_addon, install_thread_excepthook, manifest_file,
|
||||
not_implemented, open_web, playsound_multiple,
|
||||
remove_addon, unhandled_exception_logging,
|
||||
update, install_required_addons)
|
||||
install_required_addons)
|
||||
from .luaparser import sv_color_extract
|
||||
|
@ -232,13 +232,6 @@ def log_raise(msg):
|
||||
raise Exception(msg)
|
||||
|
||||
|
||||
def update(gui):
|
||||
from .config import config
|
||||
|
||||
config.delete("dont_ask_update")
|
||||
update_dialog.check_update(gui)
|
||||
|
||||
|
||||
def is_eso_active():
|
||||
return GetWindowText(GetForegroundWindow()) == "Elder Scrolls Online"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user