本文整理匯總了Python中kupfer.obj.grouping.ToplevelGroupingSource.initialize方法的典型用法代碼示例。如果您正苦於以下問題:Python ToplevelGroupingSource.initialize方法的具體用法?Python ToplevelGroupingSource.initialize怎麽用?Python ToplevelGroupingSource.initialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類kupfer.obj.grouping.ToplevelGroupingSource
的用法示例。
在下文中一共展示了ToplevelGroupingSource.initialize方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: initialize
# 需要導入模塊: from kupfer.obj.grouping import ToplevelGroupingSource [as 別名]
# 或者: from kupfer.obj.grouping.ToplevelGroupingSource import initialize [as 別名]
def initialize(self):
ToplevelGroupingSource.initialize(self)
bookmark_file = os.path.expanduser(BOOKMARKS_FILE)
gfile = gio.File(bookmark_file)
self.monitor = gfile.monitor_file(gio.FILE_MONITOR_NONE, None)
if self.monitor:
self.monitor.connect("changed", self._on_bookmarks_changed)
示例2: initialize
# 需要導入模塊: from kupfer.obj.grouping import ToplevelGroupingSource [as 別名]
# 或者: from kupfer.obj.grouping.ToplevelGroupingSource import initialize [as 別名]
def initialize(self):
ToplevelGroupingSource.initialize(self)
try:
shortcutsFile = open(os.path.expanduser(__kupfer_settings__["shortcuts_source_path"]), 'r')
try:
self.shortcuts = json.load(shortcutsFile)["shortcuts"]
except Exception:
pretty.print_debug(__name__, "xi")
shortcutsFile.close()
except Exception:
pretty.print_debug(__name__, "xixi")
示例3: initialize
# 需要導入模塊: from kupfer.obj.grouping import ToplevelGroupingSource [as 別名]
# 或者: from kupfer.obj.grouping.ToplevelGroupingSource import initialize [as 別名]
def initialize(self):
ToplevelGroupingSource.initialize(self)
# listen to d-bus signals for updates
signals = [
"ContactAbsence",
"ContactPresence",
"ContactStatus",
"AccountPresence",
"Roster",
"RosterInfo",
]
session_bus = dbus.Bus()
for signal in signals:
dbus_signal_connect_weakly(session_bus, signal,
self._signal_update, dbus_interface=_IFACE_NAME)
示例4: initialize
# 需要導入模塊: from kupfer.obj.grouping import ToplevelGroupingSource [as 別名]
# 或者: from kupfer.obj.grouping.ToplevelGroupingSource import initialize [as 別名]
def initialize(self):
ToplevelGroupingSource.initialize(self)
__kupfer_settings__.connect("plugin-setting-changed", self._changed)
示例5: initialize
# 需要導入模塊: from kupfer.obj.grouping import ToplevelGroupingSource [as 別名]
# 或者: from kupfer.obj.grouping.ToplevelGroupingSource import initialize [as 別名]
def initialize(self):
ToplevelGroupingSource.initialize(self)
self.monitor_token = self.monitor_directories(self._ssh_home)
示例6: initialize
# 需要導入模塊: from kupfer.obj.grouping import ToplevelGroupingSource [as 別名]
# 或者: from kupfer.obj.grouping.ToplevelGroupingSource import initialize [as 別名]
def initialize(self):
ToplevelGroupingSource.initialize(self)
示例7: initialize
# 需要導入模塊: from kupfer.obj.grouping import ToplevelGroupingSource [as 別名]
# 或者: from kupfer.obj.grouping.ToplevelGroupingSource import initialize [as 別名]
def initialize(self):
ToplevelGroupingSource.initialize(self)
self._install_dbus_signal()
self._buddy_update_timer = scheduler.Timer()
self._buddy_update_queue = set()
示例8: initialize
# 需要導入模塊: from kupfer.obj.grouping import ToplevelGroupingSource [as 別名]
# 或者: from kupfer.obj.grouping.ToplevelGroupingSource import initialize [as 別名]
def initialize(self):
ToplevelGroupingSource.initialize(self)
if not os.path.isdir(self._claws_addrbook_dir):
return
self.monitor_token = self.monitor_directories(self._claws_addrbook_dir)
示例9: initialize
# 需要導入模塊: from kupfer.obj.grouping import ToplevelGroupingSource [as 別名]
# 或者: from kupfer.obj.grouping.ToplevelGroupingSource import initialize [as 別名]
def initialize(self):
ToplevelGroupingSource.initialize(self)
abook_dirs = list(support.get_addressbook_dirs())
if abook_dirs:
self.monitor_token = self.monitor_directories(*abook_dirs)
示例10: initialize
# 需要導入模塊: from kupfer.obj.grouping import ToplevelGroupingSource [as 別名]
# 或者: from kupfer.obj.grouping.ToplevelGroupingSource import initialize [as 別名]
def initialize(self):
ToplevelGroupingSource.initialize(self)
if not os.path.isdir(self._opera_home):
return
self.monitor_token = self.monitor_directories(self._opera_home)
示例11: initialize
# 需要導入模塊: from kupfer.obj.grouping import ToplevelGroupingSource [as 別名]
# 或者: from kupfer.obj.grouping.ToplevelGroupingSource import initialize [as 別名]
def initialize(self):
ToplevelGroupingSource.initialize(self)
self.monitor_token = self.monitor_directories(_SITEMANAGER_DIR)
示例12: initialize
# 需要導入模塊: from kupfer.obj.grouping import ToplevelGroupingSource [as 別名]
# 或者: from kupfer.obj.grouping.ToplevelGroupingSource import initialize [as 別名]
def initialize(self):
ToplevelGroupingSource.initialize(self)
abook_dir = support.get_addressbook_dir()
if not abook_dir or not os.path.isdir(abook_dir):
return
self.monitor_token = self.monitor_directories(abook_dir)