mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-21 11:27:38 +03:00
Detect plugins without Python 3.x support and warn user.
To allow users to sort out their plugins before EDMC itself moves to Python 3.x warn them if any of their enabled, non-stock, plugins do not have a plugin_start3() method. * If any are found without support there's a popup triggered at the end of AppWindow initialisation. * Then the user can check Settings > Plugins to see a list of the plugins without Python 3.x support.
This commit is contained in:
parent
259bb3bbd6
commit
a40b0e33ca
@ -304,7 +304,7 @@ class AppWindow(object):
|
||||
if (plugins_not_py3_last + 86400) < int(time()) and len(plug.PLUGINS_not_py3):
|
||||
import tkMessageBox
|
||||
tkMessageBox.showinfo('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 will need to update the code when EDMC moves to Python 3.x"
|
||||
"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"
|
||||
)
|
||||
config.set('plugins_not_py3_last', int(time()))
|
||||
|
||||
|
2
prefs.py
2
prefs.py
@ -289,8 +289,6 @@ class PreferencesDialog(tk.Toplevel):
|
||||
if plugin.folder: # 'system' ones have this set to None to suppress listing in Plugins prefs tab
|
||||
nb.Label(plugsframe, text=plugin.name).grid(columnspan=2, padx=PADX*2, sticky=tk.W)
|
||||
HyperlinkLabel(plugsframe, text=_('Information on migrating plugins'), background=nb.Label().cget('background'), url='https://github.com/EDCD/EDMarketConnector/blob/master/PLUGINS.md#migration-to-python-37', underline=True).grid(columnspan=2, padx=PADX, sticky=tk.W)
|
||||
|
||||
|
||||
############################################################
|
||||
|
||||
disabled_plugins = [x for x in plug.PLUGINS if x.folder and not x.module]
|
||||
|
Loading…
x
Reference in New Issue
Block a user