示例#1
0
文件: rhythmbox.py 项目: pbx/kupfer
 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)
示例#2
0
	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']}
示例#3
0
文件: plugin.py 项目: pbx/kupfer
 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
示例#4
0
 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
示例#5
0
	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)
示例#6
0
 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']
示例#7
0
 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']
     }
示例#8
0
 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)
示例#9
0
 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, data, name):
		self.name = name
		obj = {
			'name' : name,
			'descr' : _("Connectable object %(name)s"),
			'icon_name': 'system'
			}
		obj.update(data)
		Leaf.__init__(self, obj, name)
示例#11
0
 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)
示例#12
0
 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)
示例#13
0
文件: trash.py 项目: scoward/kupfer
	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
示例#14
0
 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)
示例#15
0
 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]
示例#16
0
 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]
示例#17
0
	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']}
示例#18
0
 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']
     }
示例#19
0
 def __init__(self, obj, name, tabid):
     self.tabid = tabid
     Leaf.__init__(self, obj, name)
示例#20
0
 def __init__(self, activity):
     Leaf.__init__(self, activity, activity)
示例#21
0
	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
示例#22
0
 def __init__(self, name, id_, account):
     Leaf.__init__(self, id_, name)
     self.account = account
示例#23
0
文件: trash.py 项目: scoward/kupfer
	def __init__(self, trash_uri, info):
		name = info.get_display_name()
		Leaf.__init__(self, info, name)
		self._trash_uri = trash_uri
示例#24
0
		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)
示例#25
0
	def __init__(self):
		Leaf.__init__(self, None, _("New Folder"))
示例#26
0
 def __init__(self, info, name):
     """Init with track collection
     @info: Should be a sequence of song information dictionaries
     """
     Leaf.__init__(self, info, name)
示例#27
0
 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)
示例#28
0
文件: icon_names.py 项目: pbx/kupfer
 def __init__(self, obj, desc, category):
     Leaf.__init__(self, obj, obj)
     self.description = desc
     if desc:
         self.kupfer_add_alias(desc.splitlines()[0])
示例#29
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
示例#30
0
 def __init__(self, obj, jira):
     Leaf.__init__(self, obj, obj.key)
     self.jira = jira
示例#31
0
	def __init__(self, obj, name):
		Leaf.__init__(self, obj, name)
示例#32
0
 def __init__(self, obj):
     Leaf.__init__(obj, _("Plugin Leaf Name"))
示例#33
0
 def __init__(self, path, name, description=None):
     Leaf.__init__(self, path, name)
     self._description = description
示例#34
0
	def __init__(self, name, id_, account):
		Leaf.__init__(self, id_, name)
		self.account = account
示例#35
0
 def __init__(self, obj, name):
     Leaf.__init__(self, obj, name)
     self.links = [self]
示例#36
0
文件: notes.py 项目: pbx/kupfer
 def __init__(self, obj, name, date):
     self.changedate = date
     Leaf.__init__(self, obj, name)
示例#37
0
	def __init__(self, obj, desc, category):
		Leaf.__init__(self, obj, obj)
		self.description = desc
		if desc:
			self.kupfer_add_alias(desc.splitlines()[0])
示例#38
0
	def __init__(self, info, name):
		"""Init with track collection
		@info: Should be a sequence of song information dictionaries
		"""
		Leaf.__init__(self, info, name)
示例#39
0
 def __init__(self, obj, name, pwid):
     self.pwid = pwid
     Leaf.__init__(self, obj, name)
示例#40
0
文件: top.py 项目: chmouel/kupfer
	def __init__(self, path, name, description=None):
		Leaf.__init__(self, path, name)
		self._description = description
示例#41
0
 def __init__(self, tag):
     Leaf.__init__(self, tag, tag)
示例#42
0
 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
示例#43
0
	def __init__(self, obj, desc, category):
		Leaf.__init__(self, obj, obj)
		self.description = desc
		if desc:
			self.name_aliases.add(desc.splitlines()[0])
示例#44
0
	def __init__(self, obj, name, description):
		Leaf.__init__(self, obj, name)
		self.description = description
示例#45
0
文件: zim.py 项目: somas95/kupfer
 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
示例#46
0
文件: notes.py 项目: cnheider/kupfer
 def __init__(self, obj, name, date):
     self.changedate = date
     Leaf.__init__(self, obj, name)
示例#47
0
 def __init__(self, tag_name):
     Leaf.__init__(self, tag_name, tag_name)
示例#48
0
 def __init__(self, package, desc):
     Leaf.__init__(self, package, package)
     self.desc = desc
示例#49
0
	def __init__(self, tag):
		Leaf.__init__(self, tag, tag)
示例#50
0
	def __init__(self, package, desc):
		Leaf.__init__(self, package, package)
		self.desc = desc
示例#51
0
	def __init__(self, obj, name):
		Leaf.__init__(self, obj, name)
		self.links = [self]
示例#52
0
 def __init__(self, text):
     if len(text) > 50:
         name = text[0:47] + '...'
     else:
         name = text
     Leaf.__init__(self, text, name)
示例#53
0
 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)
示例#54
0
 def __init__(self, name):
     Leaf.__init__(self, name, name)
示例#55
0
 def __init__(self, obj):
     Leaf.__init__(
         self,
         obj,
         service_name(obj) + ': '  + user_name(obj))
示例#56
0
 def __init__(self, t_hash, t_name):
     Leaf.__init__(self, t_hash, t_name)
     self.hid = t_hash
     self.title = t_name
示例#57
0
文件: higherorder.py 项目: pbx/kupfer
 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)
示例#58
0
	def __init__(self):
		Leaf.__init__(self, None, _("Empty File"))