hi,

i found a minor bug in gajim: if there's a new reply in a gmail
conversation, the notification box appears with a wrong From address.
it shows From line of the first message in conversation, not the new
one.

the attached patch fixes this bug. gajim will now show From addresses
of all unread messages in the inbox.

cheers,
--
michal(at)salaban.info -+- jid:michal.salaban(at)gmail.com -+-
sip:emes(at)ekiga.net
diff -ur gajim-0.11.1/src/common/connection_handlers.py gajim-0.11.1-gmail-patch/src/common/connection_handlers.py
--- gajim-0.11.1/src/common/connection_handlers.py	2007-02-18 22:37:16.000000000 +0100
+++ gajim-0.11.1-gmail-patch/src/common/connection_handlers.py	2007-05-28 14:41:47.874194637 +0200
@@ -1360,16 +1360,17 @@
 				if gm.getTag('mailbox').getTag('mail-thread-info'):
 					gmail_messages = gm.getTag('mailbox').getTags('mail-thread-info')
 					for gmessage in gmail_messages:
-						sender = gmessage.getTag('senders').getTag('sender')
-						if not sender:
-							continue
-						gmail_from = sender.getAttr('address')
-						gmail_subject = gmessage.getTag('subject').getData()
-						gmail_snippet = gmessage.getTag('snippet').getData()
-						gmail_messages_list.append({ \
-							'From': gmail_from, \
-							'Subject': gmail_subject, \
-							'Snippet': gmail_snippet})
+						senders = gmessage.getTag('senders').getTags('sender')
+						for sender in senders:
+							if sender.getAttr('unread') != '1':
+								continue
+							gmail_from = sender.getAttr('address')
+							gmail_subject = gmessage.getTag('subject').getData()
+							gmail_snippet = gmessage.getTag('snippet').getData()
+							gmail_messages_list.append({ \
+								'From': gmail_from, \
+								'Subject': gmail_subject, \
+								'Snippet': gmail_snippet})
 				jid = gajim.get_jid_from_account(self.name)
 				gajim.log.debug(('You have %s new gmail e-mails on %s.') % (newmsgs, jid))
 				self.dispatch('GMAIL_NOTIFY', (jid, newmsgs, gmail_messages_list))
_______________________________________________
Gajim-devel mailing list
Gajim-devel@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/gajim-devel

Reply via email to