update.py: Yes, we have to use .nametowidget()

'status' is a child of 'edmarketconnector', not of `self.root`.  And if
we were to do `self.root.children['edmarketconnector'].children['status']`
then we might as well use `.nametowidget()`.
This commit is contained in:
Athanasius committed 2022-12-04 14:49:51 +00:00
1 parent eab2f35360
commit 2ac055e8f0
1 file changed
+3 -2
+3 -2
View File
@@ -13,7 +13,7 @@ import semantic_version
if TYPE_CHECKING:
import tkinter as tk
from config import appversion_nobuild, config, update_feed
from config import appname, appversion_nobuild, config, update_feed
from EDMCLogging import get_main_logger
logger = get_main_logger()
@@ -216,7 +216,8 @@ class Updater(object):
newversion = self.check_appcast()
if newversion:
self.root.children['status']['text'] = newversion.title + ' is available'
status = self.root.nametowidget(f'.{appname.lower()}.status')
status['text'] = newversion.title + ' is available'
self.root.update_idletasks()
def close(self) -> None: