本文整理汇总了Python中backend.Backend._get_list方法的典型用法代码示例。如果您正苦于以下问题:Python Backend._get_list方法的具体用法?Python Backend._get_list怎么用?Python Backend._get_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类backend.Backend
的用法示例。
在下文中一共展示了Backend._get_list方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _message
# 需要导入模块: from backend import Backend [as 别名]
# 或者: from backend.Backend import _get_list [as 别名]
#.........这里部分代码省略.........
innerWin.hide()
cls_btn.size_hint_weight_set(1.0, 1.0)
cls_btn.size_hint_align_set(-1.0, -1.0)
cls_btn.label_set(_("Close"))
cls_btn._callback_add("clicked", inwin_close)
cls_btn.show()
reply_btn = elementary.Button(innerWin)
def reply(*args, **kwarks):
inwin_close()
_from = msg["from"]
_from = _from if not _from.find("<") else _from[_from.find("<") + 1 : -1]
_subject = msg["subject"]
self.composeNew(_to=_from, _subject="Re: %s" % _subject)
reply_btn.size_hint_weight_set(1.0, 1.0)
reply_btn.size_hint_align_set(-1.0, -1.0)
reply_btn.label_set("Rispondi")
reply_btn._callback_add("clicked", reply)
reply_btn.show()
btns_box.pack_end(reply_btn)
btns_box.pack_end(cls_btn)
btns_box.show()
innerMainBox.pack_end(btns_box)
innerMainBox.show()
innerWin.content_set(innerMainBox)
innerWin.activate()
def _mainList_populate(self):
filter = self.mode
self.mainList.clear()
if filter == "author":
messages = self.backend._get_list(order_by="author")
authors = messages.keys()
authors.sort()
for author in authors:
email_list = []
for message in messages[author]:
email_list.append(message["id"])
self.mainList.item_append(author, None, None, partial(self._show_messages, email_list))
elif filter == "thread":
messages = self.backend._get_list(order_by="thread")
threads = messages.keys()
threads.sort()
for thread in threads:
email_list = []
for message in messages[thread]:
email_list.append(message["id"])
self.mainList.item_append(thread, None, None, partial(self._show_messages, email_list))
else:
for message in self.backend._get_list(order_by=""):
self.mainList.item_append(
"[%s] %s" % (message["from"], message["subject"]),
None,
None,
partial(self._show_messages, (message["id"],)),
)
self.mainList.go()
def sync(self, *args, **kwargs):
self._message(_("Checking your inbox for new emails.."))
ecore.timer_add(0.1, self.sync_init)
def sync_init(self, *args, **kawargs):
self.backend.sync_stepbystep_init()