simple convenience function for text buffer tag insertion



Hi,

I'd like to draw attention to bug 505478 [*], which proposes a simple
convenience function for inserting text into text buffers with tags
applied.  Note that it doesn't propose any new operation modes,
predefined tags or other "heavy" things.  Just one (internally quite
complicated) or a few similar functions.

The proposed function allows to insert some text and at the same time
apply tags to certain _parts_ of it.  Tags must be defined in the
buffer tag table prior to call to new function.  Instead of relying
on complicated arguments, it would accept one gchar* argument and
parse it.  E.g., with example from ER: argument

    See <article>Sepulka</article> for more information on <abbr>SLK</abbr>.

would cause text 

    See Sepulka for more information on SLK.

be inserted in the buffer, with afterwards applying tag 'article' to
the word 'Sepulka' and 'abbr' to 'SLK'.

The purpose is to simplify tag application yet to remain as generic
as possible --- tags used are still those defined by programmer in
buffer tag table, not some predefined set.

  [*] http://bugzilla.gnome.org/show_bug.cgi?id=505478

Paul


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