Skip to content
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

Closed
wants to merge 4 commits into from
Closed

Conversation

kugel-
Copy link
Member

@kugel- kugel- commented Nov 6, 2015

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

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
@kugel-
Copy link
Member Author

kugel- commented Nov 6, 2015

I do want this merged for 1.26, I hope we can manage it.

@codebrainz
Copy link
Member

You should ping the maintainer :)

I can't remember if I asked this yet, but does it break people's existing plugins?

@frlan
Copy link
Member

frlan commented Nov 7, 2015

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.

@kugel-
Copy link
Member Author

kugel- commented Nov 7, 2015

@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

@frlan
Copy link
Member

frlan commented Nov 7, 2015

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.

@frlan frlan added this to the 1.27 milestone Nov 7, 2015
@codebrainz
Copy link
Member

@codebrainz all existing plugins continue to work. [...]

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 configure())?

@kugel-
Copy link
Member Author

kugel- commented Nov 8, 2015

Am 8. November 2015 02:12:47 MEZ, schrieb Matthew Brush notifications@github.com:

@codebrainz all existing plugins continue to work. [...]

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 configure())?


Reply to this email directly or view it on GitHub:
#295 (comment)

That's unexpected. Can you paste the plug-in somewhere?

I tested against the shipped ones and one of a irc user.

@codebrainz
Copy link
Member

@kugel- http://pastebin.geany.org/vvr42/

I just took the Hello World one and renamed it a bit. Its file is at $HOME/.config/geany/plugins/geanypy/plugins.

@kugel-
Copy link
Member Author

kugel- commented Nov 8, 2015

Am 8. November 2015 08:00:45 MEZ, schrieb Matthew Brush notifications@github.com:

@kugel- http://pastebin.geany.org/vvr42/

I just took the Hello World one and renamed it a bit. It's file is at
$HOME/.config/geany/plugins/geanypy/plugins.


Reply to this email directly or view it on GitHub:
#295 (comment)

Ah, I forgot thatched plugins have to be placed directly under $HOME/.config/geany/plugins/now, since they are loaded by geany now

@kugel-
Copy link
Member Author

kugel- commented Nov 8, 2015

I agree that disqualifies "continue to work"

@codebrainz
Copy link
Member

Though it's a better place for "thatched" plugins, in the long run :)

@frlan
Copy link
Member

frlan commented Mar 13, 2016

Should be closed with merging in of #384

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants