mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 07:47:14 +03:00
Use the after method of root to open the messagebox inside the mainloop (fixes #522).
This commit is contained in:
parent
b829c1bbd1
commit
77a2a1b533
@ -815,4 +815,21 @@ if __name__ == "__main__":
|
|||||||
root = tk.Tk(className=appname.lower())
|
root = tk.Tk(className=appname.lower())
|
||||||
app = AppWindow(root)
|
app = AppWindow(root)
|
||||||
|
|
||||||
|
def messagebox_not_py3():
|
||||||
|
plugins_not_py3_last = config.getint('plugins_not_py3_last') or 0
|
||||||
|
if (plugins_not_py3_last + 86400) < int(time()) and len(plug.PLUGINS_not_py3):
|
||||||
|
tk.messagebox.showinfo(
|
||||||
|
'EDMC: Plugins Without Python 3.x Support', (
|
||||||
|
"One or more of your enabled plugins do not yet have support for Python 3.x. "
|
||||||
|
"Please see the list on the 'Plugins' tab of 'File' > 'Settings'. "
|
||||||
|
"You should check if there is an updated version available, "
|
||||||
|
"else alert the developer that they need to update the code for Python 3.x.\r\n"
|
||||||
|
"\r\n"
|
||||||
|
"You can disable a plugin by renaming its folder to have '.disabled' "
|
||||||
|
"on the end of the name."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
config.set('plugins_not_py3_last', int(time()))
|
||||||
|
|
||||||
|
root.after(0, messagebox_not_py3)
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
|
7
plug.py
7
plug.py
@ -199,13 +199,6 @@ def load_plugins(master):
|
|||||||
pass
|
pass
|
||||||
PLUGINS.extend(sorted(found, key = lambda p: operator.attrgetter('name')(p).lower()))
|
PLUGINS.extend(sorted(found, key = lambda p: operator.attrgetter('name')(p).lower()))
|
||||||
|
|
||||||
plugins_not_py3_last = config.getint('plugins_not_py3_last') or 0
|
|
||||||
if (plugins_not_py3_last + 86400) < int(time()) and len(PLUGINS_not_py3):
|
|
||||||
tk.messagebox.showinfo('EDMC: Plugins Without Python 3.x Support',
|
|
||||||
"One or more of your enabled plugins do not yet have support for Python 3.x. Please see the list on the 'Plugins' tab of 'File' > 'Settings'. You should check if there is an updated version available, else alert the developer that they need to update the code for Python 3.x\r\n\r\nYou can disable a plugin by renaming its folder to have '.disabled' on the end of the name."
|
|
||||||
)
|
|
||||||
config.set('plugins_not_py3_last', int(time()))
|
|
||||||
|
|
||||||
def provides(fn_name):
|
def provides(fn_name):
|
||||||
"""
|
"""
|
||||||
Find plugins that provide a function
|
Find plugins that provide a function
|
||||||
|
Loading…
x
Reference in New Issue
Block a user