Re: [gedit-list] Reading document content, iteratively, from plugins



On Sun, Oct 27, 2013 at 08:55:02AM -0400, Dustin Oprea wrote:
You're right.. Its not ideal that the document would change while saving,
but what's the harm? If we're talking about background saves, you're
general concerned with precautionary actions above anything else. If the
user gets to a point where he can perform an explicit save, than he can be
assured of being completely in-sync at that time.

The document-saver looks okay, but can I use it in isolation from the
current document and its state? I think this is what you were referring to
by "reusable", but, from what you said, it doesn't sound as if it's
currently usable in that capacity.

In gedit master, the document loader and saver are not easily reusable.  
I made an experiment a month ago to make them reusable:

https://github.com/swilmet/libgedit
https://git.gnome.org/browse/gedit/log/?h=wip/reusable-code
http://blogs.gnome.org/swilmet/2013/09/21/end-of-gsoc-on-gtksourceviewgedit/

The conclusion is that the libgedit git submodule approach is not ideal, 
and an API break for gedit plugins would be required if we want to 
modify the API (since it is the same namespace, Gedit).

Note that in the experiment, the document saver is reusable.

Sébastien


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