def on_copy_message_to_clipboard(self, action): pm_list = [] for member in self.members: contact = self.session.contacts.safe_get(member) pm_list.append(Plus.msnplus_strip(contact.message)) clipboard = QtGui.QApplication.clipboard() clipboard.setText(', '.join(pm_list))
def __append_contact(self, contact): """ appends a contact to our submenu """ item = QtGui.QAction(Plus.msnplus_strip(contact.nick), self) pict = self.__get_contact_pixbuf_or_default(contact.picture) item.setIcon(QtGui.QIcon(pict)) self.item_to_contacts[item] = contact self.contacts_to_item[contact.account] = item self.addAction(item)
def strip_nick(contact1, contact2): return cmp( Plus.msnplus_strip(contact1.nick).lower(), Plus.msnplus_strip(contact2.nick).lower())
def strip_nick(contact1, contact2): return cmp(Plus.msnplus_strip(contact1.nick).lower(), Plus.msnplus_strip(contact2.nick).lower())