[Evolution-hackers] Couple questions regarding SoC project

Hey, guys

Everything's going pretty well on my Summer of Code project so far, but
I've run into a couple of problems that I've been beating my head
against for quite a while and can't come up with any sensible solution
to, and I was wondering if anyone had any suggestions:

Right now, I'm trying to get a message to show/hide the "reply" portion
of a message (i.e., the part of the message that says "On Monday, Joe
wrote: > stuff here > more stuff, etc).  I've got the algorithm worked
out so that it properly strips this off, but I'm having trouble actually
getting it to update the display properly.

Here's what I'm doing:  I have a hook into the inline message attachment
drop-down menu, and I added an item in there to "show/hide quoted text."
This calls a function which creates a new message, and sets that message
to contain the message text, with either replies shown or hidden,
depending on its previous state.  Now, here're the two problems I'm

1.  I don't know how to make the display update when the menu-item is
selected and the message is changed.  I have to manually force it to
redraw by hiding and re-displaying the message.  I found a function
called em_format_redraw(EMFormat* emf), but I don't have any way of
getting an EMFormat object, so I can't call this function.  What's a
good way of getting things to redraw inside this plugin?

2.  When I'm all done setting the message text, I call
camel_medium_set_content_object(target->part, new_message); where
target->part is the CamelMimePart that I recieved from the plugin, and
new_message is the message I created with the new text.  However, this
doesn't seem to change anything -- it still displays the old message, it
never seems to update.  I can get it to update by changing a few things
around (for instance, by directly assigning the message text to the
target->part) but this never displays it in the way it should, it either
changes the mime-type so it's just plain text or screws it up in some
other way.  How can I get the set_content_object call to take?

I don't know if either of those problems made sense or not; if they
didn't, please send me an email and I'll try to clarify.

Also, I'd be interested in seeing what other people think of my stuff so
far -- I have my code stored in the GNOME CVS repository under the
evo-conversation module.  If anybody wants to go look at it, and/or try
it out, I'd be interested in seeing what you think.

Anyways, thanks in advance for your help!  Hopefully someone has some
suggestions, I've kinda been stuck here for a little while.

David Morrison
dmorrison hmc edu

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