6 # collect message ids of all selected messages
8 for msg in clawsmail.get_summaryview_selected_message_list():
9 msgid = msg.MessageID.replace("<", "<").replace(">", ">")
12 # setup D-Bus interface object
13 bus = dbus.SessionBus()
14 rc = bus.get_object('org.gnome.Tomboy', '/org/gnome/Tomboy/RemoteControl')
15 rc_iface = dbus.Interface(rc, dbus_interface='org.gnome.Tomboy.RemoteControl')
17 # iterate over all Tomboy notes
18 for uri in rc_iface.ListAllNotes():
19 contents = rc_iface.GetNoteContentsXml(uri)
20 # Check if message id is in a link to claws mail
22 if re.search(r'<link:cm-mail uri=".*?%s.*?">' % msgid, contents) != None:
23 rc_iface.DisplayNote(uri)