You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Frg

Beginner

  • "Frg" started this thread

Posts: 1

Location: Middle Europe

  • Send private message

1

Tuesday, September 12th 2006, 8:51pm

[kopete] msn ink messages

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