[Geany] Plugin Events

blackdog blackdog at xxxxx
Sat Aug 11 22:49:11 UTC 2007


Thanks Nick, this is working for me.

One thing should there not be a document-focus event too, or is that
available elsewhere?

Cheers

bd

On Fri, 10 Aug 2007 17:28:42 +0100
Nick Treleaven <nick.treleaven at btinternet.com> wrote:

> On 08/09/2007 05:29:28 PM, Nick Treleaven wrote:
> > On 08/09/2007 04:54:31 PM, blackdog wrote:
> > > 
> > > yep that sounds ok. if I can get a per char event
> > > I'm happy don't care how it's done.
> > > 
> > OK, I'll add the new-document signal then.
> > 
> I've now committed the plugin signals code to SVN. Added signal names 
> are:
> "document-new"
> "document-open"
> "document-save"
> 
> You'll need to connect both "document-new" and "document-open". They 
> are sent after all the document fields are set, including filetype.
> So it should be possible to connect to doc_list[idx].sci in the
> callbacks, only when doc_list[idx].file_type is Haxe.
> 
> I added the geany_callbacks array (see the attachment) so that Geany 
> can disconnect the callbacks when the plugin is unloaded. Note that
> if you're connecting to sci-notify I think you will need to keep
> track of the result of g_signal_connect, so you can disconnect it in
> cleanup(). Otherwise the callback will probably segfault after the
> plugin is unloaded. (In future users will be able to easily load and
> unload plugins without restarting.)
> 
> Attached is a simple plugin I used to test it. (The init and cleanup 
> parts are not really necessary, just so it was clear the plugin was 
> loaded).
> 
> Regards,
> Nick
> 


-- 
http://www.blackdog-haxe.com/

"It is no measure of health to be well adjusted to a profoundly sick
society." --Jiddu Krishnamurti



More information about the Users mailing list