本文整理汇总了Python中gi.repository.SugarExt.wm_set_activity_id方法的典型用法代码示例。如果您正苦于以下问题:Python SugarExt.wm_set_activity_id方法的具体用法?Python SugarExt.wm_set_activity_id怎么用?Python SugarExt.wm_set_activity_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gi.repository.SugarExt
的用法示例。
在下文中一共展示了SugarExt.wm_set_activity_id方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __realize_cb
# 需要导入模块: from gi.repository import SugarExt [as 别名]
# 或者: from gi.repository.SugarExt import wm_set_activity_id [as 别名]
def __realize_cb(self, window):
xid = window.get_window().get_xid()
SugarExt.wm_set_bundle_id(xid, _BUNDLE_ID)
activity_id = activityfactory.create_activity_id()
SugarExt.wm_set_activity_id(xid, str(activity_id))
self.disconnect(self._realized_sid)
self._realized_sid = None
示例2: __realize_cb
# 需要导入模块: from gi.repository import SugarExt [as 别名]
# 或者: from gi.repository.SugarExt import wm_set_activity_id [as 别名]
def __realize_cb(self, window):
display_name = Gdk.Display.get_default().get_name()
if ':' in display_name:
# X11 for sure; this only works in X11
xid = window.get_window().get_xid()
SugarExt.wm_set_bundle_id(xid, self.get_bundle_id())
SugarExt.wm_set_activity_id(xid, str(self._activity_id))
elif display_name is 'Broadway':
# GTK3's HTML5 backend
# This is needed so that the window takes the whole browser window
self.maximize()
示例3: _realize_cb
# 需要导入模块: from gi.repository import SugarExt [as 别名]
# 或者: from gi.repository.SugarExt import wm_set_activity_id [as 别名]
def _realize_cb(self, window):
xid = window.get_window().get_xid()
SugarExt.wm_set_bundle_id(xid, self._bundle_id)
SugarExt.wm_set_activity_id(xid, str(self._activity_id))
示例4: __realize_cb
# 需要导入模块: from gi.repository import SugarExt [as 别名]
# 或者: from gi.repository.SugarExt import wm_set_activity_id [as 别名]
def __realize_cb(self, widget):
SugarExt.wm_set_activity_id(widget.get_window().get_xid(),
str(self._activity_id))