[tomboy-list] Tomboy 0.10 Planning Meeting Tomorrow @ 13:00 PST
btimothy at gmail.com
Wed Sep 26 08:00:59 PDT 2007
Well, I don't know that I saved any of that code anywhere. Basically,
here are some of the issues I ran into:
1. Modifying the TextBuffer during a TextBuffer.InsertText event
(i.e., to add a checkbox) can be very tricky. The problem happens if
there are other listeners for this event which follow. If you change
the TextIter at all during this process, it can cause some real
problems for the following event listeners. Supposedly, you're
supposed to be able to correct the TextIter before exiting your event
handler, but I haven't figure out the right calls to do that in C#.
2. The calls to insert at Widget into a ChildAnchor come from the
TextView (the UI). During the event handler, you're not dealing with
the UI at all and strictly the TextBuffer. I wasn't able to figure
out how to get a Widget (like a CheckButton) to get inserted during
the event handler.
3. Another option was trying to use a Gdk.Pixbuf. TextBuffer allows
you to insert a Gdk.Pixbuf at a TextIter. This is how Tomboy's
Bugzilla Addin works (see the bugzilla addin code for details). I
tried going down this route as well, but there are problems doing it
this way too: a) you now have to match the theme with a properly drawn
checkbox, b) you have to figure out how to capture mouse button clicks
so the user can mark the checkbox, c) you've got to figure out how to
change the empty box to a box with a check when the user clicks the
4. To complicate things even a bit more, since we need unique IDs/Uris
to each separate tasks, you can't just use a standard TextTag to mark
the todo text as a todo. You have to use anonymous TextTags (I
believe the Gtk C API discusses this). So, you have to set up your
own data structures to keep track of the TextTags and TextIters. You
can't just use the TextTagTable or other methods available from the
TextBuffer to deal with the TextTags.
In any case, if you'd like to take a stab at it, that would be
awesome! Maybe I was trying to use the TextBuffer completely wrong?
Perhaps you're a Gtk TextView/TextBuffer expert? If not, maybe your
luck will be better than mine and that would ROCK!
On 9/26/07, Max Wiehle <wiehle at l3s.de> wrote:
> Hey Boyd,
> You said during the meeting you tried to get checkboxes for todo items
> working. I was thinking about giving it a try as well. Just don't want
> to run into the same problems again.
> I guess you used child anchors of the TextView widget?
> Could you describe your problems or maybe send me your code?
> Am Montag, den 24.09.2007, 08:41 -0600 schrieb Boyd Timothy:
> > Everyone's invited to attend the Tomboy Planning Meeting tomorrow:
> > Who: Everyone who'd like to participate
> > Where: #tomboy on irc.gnome.org
> > When: Tuesday, 25 September 2007, 13:00 PST
> > What: http://live.gnome.org/Tomboy/DevMeetingZeroPointTen
> > _______________________________________________
> > Tomboy-list mailing list
> > Tomboy-list at lists.beatniksoftware.com
> > http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
More information about the Tomboy-list