本文整理匯總了Python中blueman.gui.Notification.Notification.actions_supported方法的典型用法代碼示例。如果您正苦於以下問題:Python Notification.actions_supported方法的具體用法?Python Notification.actions_supported怎麽用?Python Notification.actions_supported使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類blueman.gui.Notification.Notification
的用法示例。
在下文中一共展示了Notification.actions_supported方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: add_open
# 需要導入模塊: from blueman.gui.Notification import Notification [as 別名]
# 或者: from blueman.gui.Notification.Notification import actions_supported [as 別名]
def add_open(self, n, name, path):
if Notification.actions_supported():
print "adding action"
def on_open(*args):
print "open"
spawn(["xdg-open", path], True)
n.add_action("open", name, on_open)
n.show()
示例2: _add_open
# 需要導入模塊: from blueman.gui.Notification import Notification [as 別名]
# 或者: from blueman.gui.Notification.Notification import actions_supported [as 別名]
def _add_open(n, name, path):
if Notification.actions_supported():
print("adding action")
def on_open(*_args):
print("open")
launch("xdg-open", [path], True)
n.add_action("open", name, on_open, None)
n.show()