Being new to msn i got easily fascinated with ink drawings and have started looking for a linux client with proper support for them... So far only amsn worked quite well
I hope sending ink messages will be taken care of in the near future - the TeX plugin is great but it would have more use if it could send formulas as ink images. We can't assume every client at the other end will be able to parse the $$...$$ expressions, not to mention the users
INK MSG RECEIVE PROBLEM
Before even thinking about sending ink lets get receiving working properly. It was failing for me when i tried amsn --> kopete messaging. Then yesterday i fetched the svn sources - The same!
Only very uncomplicated/small images displayed correctly. Others didn't render. From debug messages and the logs i found out that ink messages longer than 2 chunks didn't download (the temp gif files were all very small). Then i looked at the sources...
And there it was...
/protocols/msn/msnswitchboardsocket.cpp
lines 482-548, control block: else if(type == "image/gif" || msg.contains("Message-ID:"))
below, the updated version:
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
|
if(chunks.isNull())
{
InkMessage inkMessage = m_inkMessageBuffer[messageId];
inkMessage.data += msg.section("\r\n\r\n", -1);
m_inkMessageBuffer[messageId] = inkMessage; // <-------- ADDED LINE !!!!!
if(inkMessage.chunks == chunk.toUInt() + 1)
{
DispatchInkMessage(inkMessage.data);
// Remove the ink message from the buffer.
m_inkMessageBuffer.remove(messageId);
}
}
|
Adding one line,
m_inkMessageBuffer[messageId] = inkMessage;, helped to make the messages appear like they should.
Looks like the QMap class (m_inkMessageBuffer is a QMap) did not return a reference to the message in
inkMessage = m_inkMessageBuffer[messageId]; but a copy of the message. Therefore the extra assignement to the map is necessary. Without it the inkMessage remained 2 chunks no matter what
Hope someone will update the svn soon
As for sending TeX formulas as gifs... i'll be needing it as soon as my school starts (next month)... so i might end up writing all that code myself ;D