Em Tuesday 07 July 2009, Matt Rogers escreveu: > On Tuesday 07 July 2009 05:08:16 pm Lamarque Vieira Souza wrote: > > Em Tuesday 07 July 2009, Lamarque Vieira Souza escreveu: > > > Hi, > > > > > > I have implemented the notifications slots, they are working. I am > > > using KNotification::event with KNotification::Persistent flag to show > > > the messages. Just one thing, the subject of a new mail is coming as > > > > > > =?iso-8859-1?Q?teste?= > > > > > > Where only the "teste" word is the real subject. Is there any function > > > in Kopete or kdelibs to strip the other parts (=?iso-8859-1?Q? and ?=)? > > > Do you know what the letter "Q" between the two "?" mean? > > > > I have found KMime::decodeRFC2047String function in kmail's source code, > > now the subjects are ok :-) There is a screenshot of the two > > knotifications at http://bach.metasys.com.br/~lamarque/kopete/kopete.jpg. > > Maybe I need to change the strings to make them shorter. If you have any > > suggestion fell free to tell me. > > > > > Another thing, I suppose the request url from the server is needed to > > > open the inbox, right? I have tested your patch against msntest.cpp but > > > there is no return from the server. Do you know why? > > > > > > Em Tuesday 07 July 2009, Tiago Salem Herrmann escreveu: > > > > Lamarque Vieira Souza wrote: > > > > > Hi there, > > > > > > > > > > Is anyone working on implementing hotmail mail notification in > > > > > WLM > > > > > plugin? If no I would like to implement it. But I need some > > > > > information about how libmsn work and if it implements all the mail > > > > > notification protocol. I see in msntest.cpp some functions related > > > > > to mail notification but no command to test it in the > > > > > handle_command function. By the way, there is a bug report about > > > > > this missing feature here > > > > > https://bugs.kde.org/show_bug.cgi?id=163225 > > > > > > > > Hello, > > > > > > > > there are two callbacks for email notification for now: > > > > > > > > ------------ > > > > virtual void > > > > gotInitialEmailNotification(MSN::NotificationServerConnection * conn, > > > > int msgs_inbox, int unread_inbox, int msgs_folders, int > > > > unread_folders) = 0; > > > > > > > > virtual void > > > > gotNewEmailNotification(MSN::NotificationServerConnection * conn, > > > > std::string from, std::string subject) = 0; > > > > ------------- > > > > > > > > the first one (gotInitialEmailNotification()) is called only once, > > > > and inform the application how many emails unread you have in your > > > > inbox (and some other info that I dont remember now :) > > > > > > > > the second one (gotNewEmailNotification()) is called as soon as you > > > > receive a new email, and provides only the sender and the subject. > > > > > > > > You need to emit a signal in wlmlibmsn.cpp when these callbacks are > > > > called, and connect these signals to slots in wlmaccount.cpp, that > > > > will manage the email information. > > > > > > > > Another thing that should be implemented is to request the hotmail > > > > inbox url from the server. > > > > I've started the patch for libmsn but never finished. Feel free to > > > > finish it if you want. > > > > The "half-patch" is attached. > > > > > > > > You can contact me if you need more information. > > > > > > > > Tiago Salem Herrmann > > i would replace "in your Hotmail's inbox" with "in your Hotmail inbox". > > Otherwise, looks fine to me.
I have changed it to i18n( "%1 new message%2 in your Hotmail inbox.", unread_inbox, unread_inbox > 1 ? "s": ""), it is shorter this way. Is it ok to use this kind of code to add the plural to "messages" or it can cause problems to the translation team? I am trying to figure out how to open hotmail inbox. I have looked at the Kopete 3.5 msn plugin source code and what it does is just call sendCommand("URL", "INBOX" ), where sendCommand just write a formated string to the socket, is that simple? Tomorow I am going to port this code to WLM and see if it really works. aMSN opens the inbox using a .htm file with some variables, some of them are pretty obvious (login, credentials, session id, etc) but others I have no ideia what they mean. I would like to see this code in KDE 4.3.1. I am not familiar with KDE feature freeze details, but since this code fix a regression from Kopete 3.5.x I think it is better add this code to 4.3.1. By the way, I already have write access to KDE's svn repository. -- Lamarque V. Souza http://www.geographicguide.com/brazil.htm Linux User #57137 - http://counter.li.org/ _______________________________________________ kopete-devel mailing list kopete-devel@kde.org https://mail.kde.org/mailman/listinfo/kopete-devel