def __init__(self, info, name=None): """Init with song info @info: Song information dictionary """ if not name: name = info["title"] Leaf.__init__(self, info, name)
def __init__(self, account, service_name, show_content=True): Leaf.__init__(self, account['id'], service_name) self._show_content = show_content # TRANS: Account description, similar to "John on Identi.ca" self._description = _("%(user)s on %(service)s") % { 'user': account.get('site_display_name') or account['username'], 'service': account['service']}
def __init__(self, serverid, name): try: obj = gio.unix.DesktopAppInfo("gvim.desktop") except RuntimeError: obj = gio.AppInfo(VIM) Leaf.__init__(self, obj, name) self.serverid = serverid
def __init__(self, default_book, book_id, title, author, path, metadata_file): Leaf.__init__(self, os.path.join(path, default_book), title) self.book_id = book_id self.author = author self.path = path self.metadata_file = metadata_file self.kupfer_add_alias(path)
def __init__(self, contact_individual_id, full_name, cobj): Leaf.__init__(self, contact_individual_id, full_name) self.cid = contact_individual_id self.name = full_name self.cobj = cobj self.emails = cobj['EMAIL'] self.telephones = cobj['TEL']
def __init__(self, account, service_name, show_content=True): Leaf.__init__(self, account['id'], service_name) self._show_content = show_content # TRANS: Account description, similar to "John on Identi.ca" self._description = _("%(user)s on %(service)s") % { 'user': account.get('site_display_name') or account['username'], 'service': account['service'] }
def __init__(self, name, path, remote=None): Leaf.__init__(self, {'path': path, 'name': name, 'remote': remote}, name) self.name = name self.abs_path = path self.remote = remote self.is_remote = bool(remote)
def __init__ (self, data, name): self.name = name obj = { 'name' : name, 'descr' : _("Connectable object %(name)s"), 'icon_name': 'system' } obj.update(data) Leaf.__init__(self, obj, name)
def __init__(self, leaf): real_path = leaf.canonical_path() leaf_dict = file_dict(real_path) self.root = leaf_dict['root'] self.title = leaf_dict['title'] self.status = leaf_dict['status'] self.branch = leaf_dict['branch'] self.abs_path = leaf_dict['abs_path'] self.description = leaf_dict['description'] Leaf.__init__(self, leaf.object, self.title)
def __init__(self, location, name=None, description=None, icon_name=None): """Special location with @location and @name. If unset, we find @name from filesystem @description is Leaf description""" gfile = gio.File(location) info = gfile.query_info(gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME) name = (info.get_attribute_string(gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME) or location) Leaf.__init__(self, location, name) self.description = description self.icon_name = icon_name
def __init__(self, name, path, remote=None): Leaf.__init__(self, { 'path': path, 'name': name, 'remote': remote }, name) self.name = name self.abs_path = path self.remote = remote self.is_remote = bool(remote)
def __init__(self, fact): name = fact[4] if fact[6]: name += "@" + fact[6] Leaf.__init__(self, fact[0], name) pretty.print_debug(__name__, "creating fact %d: %s" % (fact[0], name)) self.fact_id = fact[0] self.activity = fact[4] self.category = fact[6] self.starttime = fact[1] self.endtime = fact[2] self.description = fact[3] self.tags = fact[7]
def __init__(self, text, msg, service): Leaf.__init__(self, text, text) self.id = msg['id'] self.msg_url = msg.get('url') self.msg_sender = msg['sender']['nick'] if 'nick' in msg['sender'] \ else msg['sender']['name'] self._service_features = list(service['features']) self._is_my_msg = bool(msg['sender']['is_me']) sender = unicode(msg['sender'].get('name') or msg['sender']['nick']) date = unicode_strftime('%c', time.localtime(msg['time'])) # TRANS: Gwibber Message description # TRANS: Similar to "John May 5 2011 11:40 on Identi.ca" # TRANS: the %(user)s and similar tokens must be unchanged self._description = _("%(user)s %(when)s on %(where)s") % { 'user': sender, 'when': date, 'where': service['name']}
def __init__(self, text, msg, service): Leaf.__init__(self, text, text) self.id = msg['id'] self.msg_url = msg.get('url') self.msg_sender = msg['sender']['nick'] if 'nick' in msg['sender'] \ else msg['sender']['name'] self._service_features = list(service['features']) self._is_my_msg = bool(msg['sender']['is_me']) sender = unicode(msg['sender'].get('name') or msg['sender']['nick']) date = unicode_strftime('%c', time.localtime(msg['time'])) # TRANS: Gwibber Message description # TRANS: Similar to "John May 5 2011 11:40 on Identi.ca" # TRANS: the %(user)s and similar tokens must be unchanged self._description = _("%(user)s %(when)s on %(where)s") % { 'user': sender, 'when': date, 'where': service['name'] }
def __init__(self, obj, name, tabid): self.tabid = tabid Leaf.__init__(self, obj, name)
def __init__(self, activity): Leaf.__init__(self, activity, activity)
def __init__(self, page_id, page_name, notebook_path, notebook_name): Leaf.__init__(self, page_id, page_name) self.page = page_name self.notebook = notebook_path self.notebook_name = notebook_name
def __init__(self, name, id_, account): Leaf.__init__(self, id_, name) self.account = account
def __init__(self, trash_uri, info): name = info.get_display_name() Leaf.__init__(self, info, name) self._trash_uri = trash_uri
def __init__(self, leaf): Leaf.__init__(self, leaf.object, _("Last Result")) vars(self).update(vars(leaf)) self.name = _("Last Result") self.__orignal_leaf = leaf self.__class__.__bases__ = (leaf.__class__, Leaf)
def __init__(self): Leaf.__init__(self, None, _("New Folder"))
def __init__(self, info, name): """Init with track collection @info: Should be a sequence of song information dictionaries """ Leaf.__init__(self, info, name)
def __init__(self, obj, desc, category): Leaf.__init__(self, obj, obj) self.description = desc if desc: self.kupfer_add_alias(desc.splitlines()[0])
def __init__(self, task_id, title, status): Leaf.__init__(self, task_id, title) self.status = status self.tags = None self.duedate = None self.startdate = None
def __init__(self, obj, jira): Leaf.__init__(self, obj, obj.key) self.jira = jira
def __init__(self, obj, name): Leaf.__init__(self, obj, name)
def __init__(self, obj): Leaf.__init__(obj, _("Plugin Leaf Name"))
def __init__(self, path, name, description=None): Leaf.__init__(self, path, name) self._description = description
def __init__(self, obj, name): Leaf.__init__(self, obj, name) self.links = [self]
def __init__(self, obj, name, date): self.changedate = date Leaf.__init__(self, obj, name)
def __init__(self, obj, name, pwid): self.pwid = pwid Leaf.__init__(self, obj, name)
def __init__(self, tag): Leaf.__init__(self, tag, tag)
def __init__(self, obj, fields=None, transition=None, jira=None): Leaf.__init__(self, obj, IssueLeaf.get_name(obj)) self.fields = fields self.transition = None self.jira = jira
def __init__(self, obj, desc, category): Leaf.__init__(self, obj, obj) self.description = desc if desc: self.name_aliases.add(desc.splitlines()[0])
def __init__(self, obj, name, description): Leaf.__init__(self, obj, name) self.description = description
def __init__(self, tag_name): Leaf.__init__(self, tag_name, tag_name)
def __init__(self, package, desc): Leaf.__init__(self, package, package) self.desc = desc
def __init__(self, text): if len(text) > 50: name = text[0:47] + '...' else: name = text Leaf.__init__(self, text, name)
def __init__(self, name): Leaf.__init__(self, name, name)
def __init__(self, obj): Leaf.__init__( self, obj, service_name(obj) + ': ' + user_name(obj))
def __init__(self, t_hash, t_name): Leaf.__init__(self, t_hash, t_name) self.hid = t_hash self.title = t_name
def __init__(self, leaf, cleaf): Leaf.__init__(self, leaf.object, unicode(leaf)) vars(self).update(vars(leaf)) self.name = _("Result of %s (%s)") % (cleaf, self) self.__composed_leaf = cleaf self.__class__.__bases__ = (leaf.__class__, Leaf)
def __init__(self): Leaf.__init__(self, None, _("Empty File"))