Re: [gedit-list] method called on gedit exit
- From: Paolo Borelli <pborelli katamail com>
- To: Lucas Stephanou <domluc gmail com>
- Cc: gedit-list gnome org
- Subject: Re: [gedit-list] method called on gedit exit
- Date: Tue, 22 May 2007 12:35:45 +0200
On lun, 2007-05-21 at 09:37 -0300, Lucas Stephanou wrote:
> Hi All,
>
> I'm making some adjusts at plugin session saver,
> and I need that one of my methods be calleds when gedit is closed.
>
> i try
> <python>
> def destroy:
> print "closing gedit"
> </python>
>
> but it never print the msg.
>
> how can I made this?
>
I guess you have different possibilities: you could connect to each
GeditWindow destroy signal and check if this is the last one or maybe
you could check when the GeditApp object is destroyed (e.g. using a weak
pointer)... the problem with this approach is that by the time yiu get
the signal windows and documents have already been closed, so you
probably have to keep your own list of things you want to save.
Maybe we should add a "shutdown" signal to GeditApp that is emitted
before actually destroying the windows so that plugins have an easier
way to hook into the shutdown process.
Paolo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]