[tomboy-list] OnTheFly Addin
Arun Chaganty
arunchaganty at gmail.com
Sat Nov 29 05:01:03 PST 2008
Hey,
I wrote a Tomboy Addin to add formatting on the fly to notes, so on typing
*bold*, it will automatically be converted to <bold>bold</bold>. I know it isn't
a terrible effort to just select the text and use <Ctrl-b>, however, I find it
more convinient to just type it out. I also hope someone else finds it useful
too.
Project Page: http://arun.chagantys.org/projects/OnTheFly/
I have a few questions though. When my plugin changes the *bold* to bold, it has
to remove the identifers ('*'). I do this with Buffer.Delete (ref TextIter
start, ref TextIter end), and in my Addin, I only have 2 TextIters. It still
throws quite a few warning messages, which I'm guessing come from various other
parts of Tomboy. What should I do about it?
Warning Message:
(Tomboy:14778): Gtk-WARNING **: Invalid text buffer iterator: either
the iterator is uninitialized, or the characters/pixbufs/widgets in
the buffer have been modified since the iterator was created.
You must use marks, character numbers, or line numbers to preserve a
position across buffer modifications.
You can apply tags and insert marks without invalidating your iterators,
but any mutation that affects 'indexable' buffer contents (contents
that can be referred to by character offset)
will invalidate all outstanding iterators
--
Arun Tejasvi Chaganty
http://arun.chagantys.org/
More information about the Tomboy-list
mailing list