def activate(self, leaf): email = email_from_leaf(leaf) if not utils.spawn_async(['thunderbird', 'mailto:%s' % email]): utils.spawn_async(['icedove', 'mailto:%s' % email]) if (not utils.spawn_async_notify_as( 'thunderbird.desktop', ['thunderbird', 'mailto:%s' % email])): utils.spawn_async_notify_as( 'icedove.desktop', ['icedove', 'mailto:%s' % email])
def qrcode_type(leaf): if hasattr(leaf, "qrcode"): return "qrcode" o = leaf.object if hasattr(o, "get"): if o.get("NAME") and (o.get("ADDRESS") or o.get("PHONE") or o.get("EMAIL")): return "mecard" if "PHONE" in o: return "phone" if hasattr(leaf, "im_id_kind"): return "IMContact" if bool(email_from_leaf(leaf)): return "email" return "text"
def valid_for_item(self, item): return bool(contacts.email_from_leaf(item))
return hasattr(leaf, "get_text_representation")\ or hasattr(leaf, "qrcode") def get_description(self): """The Action description""" return _("Display text as QRCode in a window") def get_icon_name(self): """Name of the icon""" return "format-text-bold" PROTOCOLS = { "qrcode": lambda l: l.qrcode(), "IMContact": lambda l: l.repr_key(), "email": lambda l: email_from_leaf(l), "text": lambda l: l.get_text_representation(), "phone": lambda l: "tel:%s" % l.object.get("PHONE"), "mecard": lambda l: "MECARD:N:%s;ADR:%s;TEL:%s;EMAIL:%s;;" % ( l.object.get("NAME",""), l.object.get("ADDRESS",""), l.object.get("PHONE",""),l.object.get("EMAIL","") ) } def qrcode_type(leaf): if hasattr(leaf, "qrcode"): return "qrcode" o = leaf.object if hasattr(o, "get"): if o.get("NAME") and (o.get("ADDRESS")
def activate_multiple(self, objects, iobjects): # FIXME: revisit for unicode email addresses recipients = ",".join(email_from_leaf(I) for I in iobjects) attachlist = "?attach=" + "&attach=".join(L.object for L in objects) url = "mailto:" + recipients + attachlist utils.show_url(url)
def activate(self, leaf): email = email_from_leaf(leaf) utils.show_url("mailto:%s" % email)
def activate(self, leaf): email = email_from_leaf(leaf) if not utils.spawn_async(['thunderbird', 'mailto:%s' % email]): utils.spawn_async(['icedove', 'mailto:%s' % email])
def activate_multiple(self, objects): recipients = ",".join( urllib.quote(email_from_leaf(L)) for L in objects) url = GMAIL_NEW_MAIL_URL % dict(emails=recipients) utils.show_url(url)
def activate_multiple(self, objects, iobjects): recipients = ",".join(email_from_leaf(I) for I in iobjects) attachlist = ["--attach"] + [L.object for L in objects] utils.spawn_async(["claws-mail", "--compose", recipients] + attachlist)
def activate_multiple(self, objects): recipients = ",".join(email_from_leaf(L) for L in objects) utils.spawn_async(["claws-mail", "--compose", recipients])
def activate_multiple(self, objects): recipients = ",".join(email_from_leaf(L) for L in objects) utils.spawn_async( ['opera', '-remote', 'openURL(mailto:%s)' % recipients])
def activate_multiple(self, objects): recipients = ",".join(email_from_leaf(L) for L in objects) utils.launch_commandline('opera -remote openURL(mailto:%s)' % recipients)
def activate(self, obj, iobj): filepath = obj.object email = email_from_leaf(iobj) utils.launch_commandline("claws-mail --compose '%s' --attach '%s'" % (email, filepath))
def activate(self, leaf): email = email_from_leaf(leaf) utils.launch_commandline("claws-mail --compose '%s'" % email)
def activate_multiple(self, objects): recipients = ",".join(email_from_leaf(L) for L in objects) if not utils.spawn_async(['thunderbird', 'mailto:%s' % recipients]): utils.spawn_async(['icedove', 'mailto:%s' % recipients])
def valid_for_item(self, leaf): return bool(contacts.email_from_leaf(leaf))
def activate_multiple(self, objects): recipients = ",".join(email_from_leaf(L) for L in objects) url = "mailto:" + recipients utils.show_url(url)
def valid_object(self, iobj, for_item=None): return bool(email_from_leaf(iobj))
def activate_multiple(self, objects): recipients = ",".join(email_from_leaf(L) for L in objects) utils.spawn_async(['opera', '-remote', 'openURL(mailto:%s)' % recipients])
def valid_for_item(self, item): return bool(email_from_leaf(item))
def activate(self, obj, iobj): filepath = obj.object email = email_from_leaf(iobj) # FIXME: revisit for unicode email addresses url = "mailto:%s?attach=%s" % (email, filepath) utils.show_url(url)
def activate_multiple(self, objects): recipients = ",".join(email_from_leaf(L) for L in objects) utils.spawn_async(["evolution", "mailto:%s" % recipients])
def activate_multiple(self, leaves): cli = ["gpg --search-keys"] cli.extend((contacts.email_from_leaf(leaf) for leaf in leaves)) utils.launch_commandline(" ".join(cli), "GnuPG", True)
def activate_multiple(self, objects, iobjects): recipients = ",".join(email_from_leaf(I) for I in iobjects) attachlist = ["attach=%s" % L.object for L in objects] utils.spawn_async(["evolution", "mailto:%s?%s" % (recipients, "&".join(attachlist))])
def activate(self, leaf): email = email_from_leaf(leaf) if not utils.launch_commandline("thunderbird mailto:%s" % email): utils.launch_commandline("icedove mailto:%s" % email)
def activate_multiple(self, objects): recipients = ",".join(urllib.quote(contacts.email_from_leaf(L)) for L in objects) url = GMAIL_NEW_MAIL_URL % dict(emails=recipients) utils.show_url(url)
def activate_multiple(self, leaves): cli = ['gpg --search-keys'] cli.extend((contacts.email_from_leaf(leaf) for leaf in leaves)) utils.launch_commandline(' '.join(cli), 'GnuPG', True)