Re: [gedit-list] method called on gedit exit




On 7/21/07, Paolo Maggi <paolo maggi gmail com > wrote:
Hi,

> I need to emit a signal when gedit is to close.

What do you mean with "gedit is to close"?
It is not easy to define such event.
You could probably define it as when the last window of a running gedit
instance receives a delete-event or a "quit" action.

Well,
Yes, It`s not easy to find right place to put this.


> But where.
>
> gedit-app.c is right place?
>
> I think that gedit-commands-file.c is the only part of gedit can now
> to do this.

What is wrong with emitting the signal there?


>
> remember that this should be received  by plugins, then I can write a
> plugin that save what files was opened is last gedit run!

BTW, I don't think you need such signal to write a plugin that remember
the open files.
You should be simply able to connect to the delete-event of every window
and to the "quit" action.
When one of these events happens you save the list of open documents.
In this way you will save the list also when a single window is closed,
but this is not a problem since you will in any case obtain the required
result.

Ciao,
Paolo





--
Lucas Stephanou

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]