I’m writing a gedit 3 plugin, something similar to phsilva’s PyLint plugin, which calls out to an external lint program and highlights lines of code in the current document. My question is, if my plugin has a run_lint action is it possible to bind that to the OnSave event in gedit? The list of available signals in the documentation I’ve linked above still has a FIXME notice against it and I’m struggling to figure out where in the soup of API documentation the full list can be found.
I’m writing a gedit 3 plugin , something similar to phsilva’s PyLint plugin ,
Share
Well, no-one answered this, but I figured it out eventually. There are two steps to this, when a new tab is created in the window that tab contains a document. The document has
loadedandsavedsignals that can be connected to actions. It’s important to remember that each tab has a separate document, each of which needs its own set of signals and handlers.Here’s an outline solution, in case it’s useful to others: