mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-11-26 03:26:57 +03:00
Plugin migration
This commit is contained in:
1 parent
1cb5dd9cc7
commit
e192c2ca2e
8 files changed
+38
-55
No files matched your search
+1
-1
@@ -12,7 +12,7 @@ if not config.get('shipyard_provider') and config.getint('shipyard'):
|
||||
config.delete('shipyard')
|
||||
|
||||
|
||||
def plugin_start():
|
||||
def plugin_start3(plugin_dir):
|
||||
return 'Coriolis'
|
||||
|
||||
# Return a URL for the current ship
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ def station_id(system_name, station_name):
|
||||
return this.station_ids.get((system_id(system_name), station_name), 0)
|
||||
|
||||
|
||||
def plugin_start():
|
||||
def plugin_start3(plugin_dir):
|
||||
return 'eddb'
|
||||
|
||||
def plugin_app(parent):
|
||||
|
||||
+1
-1
@@ -331,7 +331,7 @@ class EDDN(object):
|
||||
|
||||
# Plugin callbacks
|
||||
|
||||
def plugin_start():
|
||||
def plugin_start3(plugin_dir):
|
||||
return 'EDDN'
|
||||
|
||||
def plugin_app(parent):
|
||||
|
||||
+3
-1
@@ -50,7 +50,7 @@ def station_url(system_name, station_name):
|
||||
return 'https://www.edsm.net/en/system?systemName=%s&stationName=ALL' % urllib.parse.quote(system_name)
|
||||
|
||||
|
||||
def plugin_start():
|
||||
def plugin_start3(plugin_dir):
|
||||
# Can't be earlier since can only call PhotoImage after window is created
|
||||
this._IMG_KNOWN = tk.PhotoImage(data = 'R0lGODlhEAAQAMIEAFWjVVWkVWS/ZGfFZ////////////////yH5BAEKAAQALAAAAAAQABAAAAMvSLrc/lAFIUIkYOgNXt5g14Dk0AQlaC1CuglM6w7wgs7rMpvNV4q932VSuRiPjQQAOw==') # green circle
|
||||
this._IMG_UNKNOWN = tk.PhotoImage(data = 'R0lGODlhEAAQAKEDAGVLJ+ddWO5fW////yH5BAEKAAMALAAAAAAQABAAAAItnI+pywYRQBtA2CtVvTwjDgrJFlreEJRXgKSqwB5keQ6vOKq1E+7IE5kIh4kCADs=') # red circle
|
||||
@@ -89,6 +89,8 @@ def plugin_stop():
|
||||
this.queue.put(None)
|
||||
this.thread.join()
|
||||
this.thread = None
|
||||
# Suppress 'Exception ignored in: <function Image.__del__ at ...>' errors
|
||||
this._IMG_KNOWN = this._IMG_UNKNOWN = this._IMG_NEW = this._IMG_ERROR = None
|
||||
|
||||
def plugin_prefs(parent, cmdr, is_beta):
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import json
|
||||
import io
|
||||
|
||||
|
||||
def plugin_start():
|
||||
def plugin_start3(plugin_dir):
|
||||
return 'EDSY'
|
||||
|
||||
# Return a URL for the current ship
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ def station_url(system_name, station_name):
|
||||
return this.station or this.system
|
||||
|
||||
|
||||
def plugin_start():
|
||||
def plugin_start3(plugin_dir):
|
||||
this.thread = Thread(target = worker, name = 'Inara worker')
|
||||
this.thread.daemon = True
|
||||
this.thread.start()
|
||||
|
||||
Reference in new issue
Block a user