Re: [gedit-list] Document signals and close gedit signal



Hi Paolo,

If i track every window when a tab is added or removed, the tab-removed signal is raised when gedit is closed. An example:

1.- tab-added: cache the file 1
2.- tab-added: cache the file 2
3.- tab-removed: uncache the file 2
4.- tab-added: cache the file 3

--- Currently we have file 1 and 3 cached---

5.- The user closes gedit
6.- tab-removed is raised: uncache file 3
7.- tab-removed is raised: uncache file 1
8.- destroy signal

--- Currently 0 files cached because gedit raises tab-removed signal before close.---

Like Nacho said, gedit needs new signals like:

1.- Document opened (because the first tab is open without document and if you open a document it is inserted in the first tab without tab-added signal)
2.- Document closed
3.- Before close signal

Currently, all signals are a lot of "widget, gtk, window" scoped. I think gedit needs some "functionality" signals like document opened, document closed etc.

Regards,
Perriman



2013/4/26 Paolo Borelli <pborelli katamail com>
Ciao Chuchi,

   the alternative is t to track every window and tab added and
removed so that you know the current state at any time and then save
them at exit.

Paolo

On Fri, Apr 26, 2013 at 8:16 AM, Ignacio Casal Quinteiro
<nacho resa gmail com> wrote:
> Hey,
>
> I think that you will indeed need to modify gedit to give you this
> information as afaik you do not have it yet.
> Would be indeed good to have something like this.
>
> Regards.
>
>
> On Fri, Apr 26, 2013 at 12:26 AM, Chuchi Perriman <chuchiperriman gmail com>
> wrote:
>>
>> Hi all,
>>
>> I'm trying to develop a feature like sessionsaver plugin but I want save
>> the open documents automatically when a new document is open/closed or
>> before gedit is closed.
>>
>> I'm using tab-added and tab-removed signals but tab-removed is raised when
>> I close gedit (because gedit is closing all the tabs) and then my handler
>> removes all the cached files. I've tried to use the destroy signal but it is
>> raised after all the tab-removed event...
>>
>> Can you help me to find the right way? The idea is store the open
>> documents before gedit is closed or save the state when the user open or
>> close documents.
>>
>> Thanks a lot!!!
>>
>> _______________________________________________
>> gedit-list mailing list
>> gedit-list gnome org
>> https://mail.gnome.org/mailman/listinfo/gedit-list
>>
>
>
>
> --
> Ignacio Casal Quinteiro
>
> _______________________________________________
> gedit-list mailing list
> gedit-list gnome org
> https://mail.gnome.org/mailman/listinfo/gedit-list
>
_______________________________________________
gedit-list mailing list
gedit-list gnome org
https://mail.gnome.org/mailman/listinfo/gedit-list



--
Jesús Barbero Rodríguez
Departamento de Innovación
Parque Científico y Tecnológico
C/ Isabel Torres, 5
39011 - Santander ■ ESPAÑA
Tel.: +34 902 233 323
Fax: +34 902 234 280


Ya está disponible la nueva Release 70 de Quiter Auto Web v7.0

Recuerde que, en la nueva Release 70, es necesario que los PCs soporten unaresolución mínima de 1280x768 píxeles. 


AVISO LEGAL: Este mensaje contiene información destinada exclusivamente al usuario de destino, pudiendo contener información confidencial o protegida legalmente. Si, por un error de envío o transmisión, ha recibido este mensaje y usted no es el destinatario del mismo, por favor, notifique de este hecho al remitente y no use, informe, distribuya, imprima, copie o difunda este mensaje bajo ningœn medio . Cualquier opinión en él contenida, es exclusiva de su autor y no representa necesariamente la opinión de Quiter Servicios Informáticos, S.L.


LEGAL WARNING: This e-mail and any attachment, contain information intended solely for the addressee and may contain confidential information or legally protected data. If you are not the intended recipient, please notify the sender and do not use, disclose, distribute, copy, print or rely on this e-mail under any circumstances. The views and opinions expressed are the author/s own and do not necessarily reflect those of Quiter Servicios Informáticos, S.L.



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