Re: Rich Text copy and paste (bug #324177)

On 2/14/06, Dominic Lachowicz <domlachowicz gmail com> wrote:

> With that said, I think that the best course of action is to keep this
> sort of application-style logic out of the TextView, and push the onus
> onto the apps that would use it. My ideal setup would probably be:
> *) The TextView can serialize and deserialize (a selection of) itself
> into UTF-8 text, for the common copy + paste semantic.

Sure, it does that already.

> *) Applications are responsible for serializing and deserializing the
> text view into more complex formats, such as RTF and XHTML. Push any
> "smarts" up to the application level rather than the widget level,
> since the application should have control over its Model, and not the
> other way around.

This is what mitch's gtk_rich_text_register() api does, more or less:
it gives apps a way to register functions for serializing and deserializing
text buffer content into different formats.

> *) If it is felt to be necessary (and I'm not convinced that it is),
> there can be an opt-in serialization/deserialization API for several
> of these more-common interchange formats, such as XHTML and RTF. These
> must be optional, since they mustn't compete with their parent
> applications for control of the interchange atoms on the clipboard.

mitch's current patch just provides an "internal format", but I think
we would be happy to include XHTML and RTF format support
if patches appear...

So, it seems your recommendations are fairly close to what mitch's
patch already provides. Or did I miss your critcism of the tagset
mechanism somehow ?


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