-
Notifications
You must be signed in to change notification settings - Fork 272
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 #295
Conversation
pkg-config exports PYTHON_LIBS and not PYTHON_LDFLAGS
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 the base class of geany.Plugin and is implemented in C. The purpose is solely to store the per-plugin GeanyPlugin that we get from Geany, so that python plugins are enabled to call API functions that require it. This is a precondition for keybinding support.
geany.Plugin gains two methods to create groups and items
I do want this merged for 1.26, I hope we can manage it. |
You should ping the maintainer :) I can't remember if I asked this yet, but does it break people's existing plugins? |
Folks, we do have string freeze and release is next week. Unless there are real good reasons I think we shouldn't merge it for 1.26. |
@frlan this doesn't introducenew strings, and we're not formally feature frozen yet. On the other hand this are real improvements to geanypy, especially keybindings have been long asked for. It also fixed the other bug where geanypy would be disabled while python plugins are loaded. @codebrainz all existing plugins continue to work. The only thing is that their configure implementation needs to be updated, and until then you cannot configure them. But they can read their existing configuration and still function as before |
This merge will break current Python plugins in some way with a very low time in response. It changes basic things inside geanypy and is depending on a fresh introduced binding in Geany core. I know you might dislike this decision, but due to this I will add this PR to 1.27 and will not merge it for 1.26. |
I just tested the PR against upstream and my simple plugin wasn't available after the PR. I'd say that doesn't qualify as "continue to work" :) I wonder if the GeanyPy loader could somehow locate and adapt old scripts to continue to work (even without |
Am 8. November 2015 02:12:47 MEZ, schrieb Matthew Brush notifications@github.com:
That's unexpected. Can you paste the plug-in somewhere? I tested against the shipped ones and one of a irc user. |
@kugel- http://pastebin.geany.org/vvr42/ I just took the Hello World one and renamed it a bit. Its file is at |
Am 8. November 2015 08:00:45 MEZ, schrieb Matthew Brush notifications@github.com:
Ah, I forgot thatched plugins have to be placed directly under $HOME/.config/geany/plugins/now, since they are loaded by geany now |
I agree that disqualifies "continue to work" |
Though it's a better place for "thatched" plugins, in the long run :) |
Should be closed with merging in of #384 |
This is a mirror of codebrainz/geanypy#37. @codebrainz said he's fine if this gets merged into G-P first.
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