1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-12 23:37:14 +03:00

45 Commits

Author SHA1 Message Date
Bernd Gollesch
77a2a1b533 Use the after method of root to open the messagebox inside the mainloop (fixes #522). 2020-06-21 22:05:12 +02:00
Athanasius
558392d21b Move "plugins need migrating" popup to plug.py
Where it was in EDMarketConnector.py caused issues because then the
main thread was blocking on the popup when other threads expected it to
be running:

---------------------------------------------------------------------
Exception in thread Journal worker:
Traceback (most recent call last):
  File "C:\Users\Athan\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 926, in _bootstrap_inner
    self.run()
  File "C:\Users\Athan\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Athan\Documents\Devel\EDMarketConnector-python3\monitor.py", line 273, in worker
    self.root.event_generate('<<JournalEvent>>', when="tail")
  File "C:\Users\Athan\AppData\Local\Programs\Python\Python37-32\lib\tkinter\__init__.py", line 1673, in event_generate
    self.tk.call(args)
RuntimeError: main thread is not in main loop
---------------------------------------------------------------------

However *now* it pops up before the main UI is running properly at all,
so the EDMC window is likely out of position, and won't be
painted/themed yet.
  This is deemed acceptable for a 'once a day at most' popup.

  The popup title now has 'EDMC: ' at the start to be sure users know
what it's talking about.
  It also has some brief advice about how to disable a plugin.
2020-06-21 17:14:16 +01:00
Athanasius
3178ad1b6f Remove dangling 'imp.release_lock()' that's no longer required 2020-06-21 16:58:50 +01:00
Athanasius
259bb3bbd6 Merge branch 'release-final-python27' into python3 2020-06-21 16:43:02 +01:00
Jonathan Harris
c62d110448 Plugin migration 2020-06-21 16:33:13 +01:00
Athanasius
90b05d22c5 Now runs without console errors so far as pressing 'Update' is concerned.
There's an error on the console about an iterator when doing so
though.
2020-06-21 16:23:00 +01:00
Athanasius
d0ae621387 Running EDMarketConnector.py 'works'.
First pass utilising 'futurize' to do most of the work.

  There's an issue with ur'\"' in l10n.py which I'm not sure how to
properly fix.

  This now has errors when hitting the 'Update' button.
2020-06-21 16:23:00 +01:00
Athanasius
d3abb6fa1f 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.
2020-06-18 19:40:46 +01:00
Jonathan Harris
f6a8e67e90 Add more dashboard flags 2019-08-09 20:04:22 +01:00
Jonathan Harris
737b3b5b70 Fix new flags 2018-11-22 23:09:51 +00:00
Jonathan Harris
00762b8cb0 Add Status flags and GuiFocus constants new in 3.3 2018-11-22 10:28:22 +00:00
Jonathan Harris
e6a88e7225 Document turret flags 2018-10-30 19:35:27 +00:00
Jonathan Harris
b8a7d143d4 Pass plugin's folder to plugin_start() 2018-08-09 00:47:28 +01:00
Jonathan Harris
63eb128934 Don't try to load files in the plugin folder as plugins
Fixes #325
2018-05-27 15:46:56 +01:00
Jonathan Harris
fa3cf23c09 Load any plugins that are also packages first
Addresses #313
2018-04-26 18:53:29 +01:00
Jonathan Harris
9ed8a9200c Fix plugin widgets' layout
Fixes #311
2018-04-07 09:57:45 +01:00
Jonathan Harris
c8f25730ae Add functions to enumerate and invoke a function on a named plugin 2018-04-02 23:01:47 +01:00
Jonathan Harris
f42d5d7af6 plugin_app() can return None
so it can be used as a callback after the main window and all other plugins are initialised.
2018-04-02 13:03:39 +01:00
Jonathan Harris
0b0ac162e1 Add dashboard constants 2018-02-27 19:47:54 +00:00
Jonathan Harris
75edff5fc3 Rename plugin callback to dashboard_entry 2018-01-30 00:11:49 +00:00
Jonathan Harris
a081b6b637 Monitor player status, and call new "status" plugin callback 2018-01-29 01:36:14 +00:00
Jonathan Harris
e3323f8f6f Drop support for interaction log 2017-11-24 08:59:50 +00:00
Jonathan Harris
190d9c6bd3 Rewrite '.' in plugin name as '_'
Fixes #254
2017-10-16 14:40:19 +01:00
Jonathan Harris
929bd82684 Allow executable and plugins to be run from non-ASCII paths
Fixes #234
2017-08-19 16:03:39 +01:00
Jonathan Harris
a2ce9da44e Revert "Don't generate .pyc/.pyo files for plugins"
since this breaks __file__ for the plugin. Document removal of .pyc/.pyo files instead.

Reverts b8d252a.
2017-08-17 10:11:55 +01:00
Jonathan Harris
b8d252ae25 Don't generate .pyc/.pyo files for plugins 2017-08-16 19:27:40 +01:00
Jonathan Harris
b206015eef Put plugins and strings in their own folders in packaged app
Load plugins with name 'plugin_*' in order to not pollute the global namespace.

Addresses #230
2017-08-16 14:36:12 +01:00
Jonathan Harris
5e5ac2db31 Log plugin's load path
Fixes #232
2017-08-16 14:06:16 +01:00
Jonathan Harris
8bc117ff32 Allow plugins to show error in status area asynchronously 2017-08-13 18:34:23 +01:00
Jonathan Harris
91ee6f3722 Notify plugins on program closing 2017-08-13 18:34:23 +01:00
Jonathan Harris
c8ff0a9701 Continue to call plugin callbacks if earlier one fails 2017-08-13 15:21:02 +01:00
Jonathan Harris
d223770af8 Add plugins' folders to sys.path again.
Was broken by 084128e.
2017-08-02 09:05:31 +01:00
Jonathan Harris
60ad3b4c09 Inform plugins of Cmdr and Beta status
Notify plugins when Cmdr or Beta status changes while the preferences dialog
is open.

Display a note on the Credentials tab when Cmdr is not set. Addresses #224
2017-07-29 15:36:43 +01:00
Jonathan Harris
084128e797 Add support for internal plugins
Settings tab shows current plugins.
2017-07-29 14:41:59 +01:00
Jonathan Harris
5797af8861 Add plugins' folders to sys.path 2017-06-24 00:41:40 +01:00
Jonathan Harris
1e51d2f29b Add interaction() plugin callback
Fixes #220
2017-06-18 02:32:25 +01:00
Jonathan Harris
7ebd71b127 Tidy 2017-06-12 01:04:41 +01:00
Jonathan Harris
320b1977c2 Fix loading plugins from non-ASCII paths
Workaround for http://bugs.python.org/issue9425
Fixes #219
2017-06-12 00:59:30 +01:00
inb
bc657f55fe Add a tab to the Settings dialog. Users can directly open the plugins folder. Can also disable plugins by adding ".disabled" to the end of their folder name. 2017-04-25 08:41:02 +01:00
Jonathan Harris
9c6b9e71f7 Share monitor state with plugins 2017-03-01 01:25:51 +00:00
Jonathan Harris
3ad8322e70 Plugin enhancements
- New callback notify_prefs_changed
- Plugin can set settings tab name
- Plugin can return a pair of widgets for display in main window - typically (label, status)
2016-11-14 02:07:18 +00:00
Jonathan Harris
4583f0e316 Monitor the journal file and send events to EDDN
Sends 'FSDJump', 'Docked' and 'Scan' events in draft
http://schemas.elite-markets.net/eddn/journal/1 format.
2016-09-16 17:47:53 +01:00
Jonathan Harris
c5e50240b0
Get system coordinates from 1.6/2.1 netlog 2016-06-04 02:42:57 +01:00
Jonathan Harris
b3d585693e Load plugins from outside the source tree.
So that plugins work with the packaged app on Windows and Mac.
2016-01-09 18:27:02 +00:00
Ian Norton
477e60a64f plugin support for EDMC 2016-01-09 18:27:01 +00:00