New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geanypy proxy and keybindings #384
Conversation
This allows to drop the custom loader and plugin manager and instead make use of Geany's new proxy plugin feature, where python plugins are embedded into the standard plugin manager as first class citizen. Existing plugins continue to run with one exception: The help and configure methods have been renamed, and in case of configure the samantics have changed accordingly to Geany's unified configure dialog for all plugins. So existing scripts that used either show_help() or show_configure() need to to the following: 1) rename show_help() to help() 2a) rename show_configure to configure() 2b) change configure to just return the content widget and remove the creation of a custom dialog The plugin script dir is now $geanylibdir/geany, the same as for native plugns. Geany loooks only there and doesn't make a difference between native and sub-plugins.
This is required for some APIs, e.g. keybindings, and is made possible trough the proxy plugin conversion, since now Geany actually creates GeanyPlugin instances for Geanypy plugins.
geany.Plugin gains a method to create keybinding groups, which in turn has a method to add key items (losely matching Geany's original API, but heavily simplified).
Older plugins implement just show_configure() that spawns a dialog itself. geanypy now adds a generic per plugin to the unified plugin preferences dialog, to open that legacy dialog.
Most importantly is the changed plugin directory.
Well, I can't test it and its too big for more than a scan inspection, but it has been beaten up on upstream a bit so I'm ok with it. BTW has it ever been tested on windows? |
@frlan can't see the official label to add so just saying ok here :) [Edit: I didn't see any translatable strings so freeze doesn't matter] |
@kugel- I have been testing this enhancement in geanypy. It doesnot load plugins in https://github.com/sagarchalise/geanypy-emmet |
@sagarchalise it never did that. It thinkpad you have to Do it manually (for extra modules). Or are you saying your main plugins file can't be loaded? |
@frlan ping |
You guys are crazy merging such a big change so close to release :) |
@kugel- My main plugin file is loaded only from |
Try latest master, I made a bug fix regarding that.
|
But upstream so totally tested it :) |
This is reworked version if #295
I opened a new PR because I don't have incremental commits available (I cherry picked from the upstream PR codebrainz/geanypy#37) and didn't want to destroy the comments there.
Anyway, the commits tell the story. This PR converts geanypy to a proxy plugin (needs Geany git master/1.26), and then adds the long-awaited keybindings support.
With this, python plugins are just like other plugins w.r.t to the PM dialog, configuration and keybindings
According to #295 @codebrainz is fine if G-P merges it first (@codebrainz please speak up if you changed your mind).