GNOME Bugzilla – Bug 200966
editor needs to set PersistStream dirty flag
Last modified: 2002-03-27 23:24:41 UTC
The editor should call bonobo_persist_stream_set_dirty (ps, FALSE) after a successful load or save. That's easy. The tricky part is setting it TRUE when the user types/modifies something.
Okay I'm going to try to get to this soon. Making it work properly with undo will be interesting.
setting milestone to 1.0.x
*Actually* setting the milestone to 1.0.x this time.
it could be done like creating global undo step counter and save it's value on beginning and by each save. in undo we need to watch if current value goes under saved one and in case we drop redo steps under saved, dirty will be set to TRUE, otherwise dirty could be obtained as saved != current. (dunno if it's understandable)
Not 1.0.x AFAICS?
Well, it's needed for a bugfix. (The fact that the composer "save before closing?" dialog doesn't always guess whether you've changed things or not correctly.)
OK, but is that bug a 1.0.x thing? AFAICS, both dependent bugs are 1.2.
I've implemented gtk_html_is_dirty method, which is exposed also thru Editor::Engine CORBA API, so you probably just want to use it for PersistStream too. Evolution now uses Engine API, so if the only reason is for evolution composer, then this bug could be probably just closed, otherwise use this gtk_html_is_dirty method. There is also gtk_html_drop_undo which resets dirty flag in editor and drops undo, undo_used and redo queues.
Closing this as it appears to be implemented.