本文整理汇总了Python中extension.category_register函数的典型用法代码示例。如果您正苦于以下问题:Python category_register函数的具体用法?Python category_register怎么用?Python category_register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了category_register函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: _setup
def _setup(self):
"""register core extensions"""
extension.category_register("session", dummy.Session, single_instance=True)
# extension.category_register('session', msn.Session,
# single_instance=True)
if jabber is not None:
extension.register("session", jabber.Session)
extension.register("session", dummy.Session)
# extension.register('session', msn.Session)
if papylib is not None:
extension.register("session", papylib.Session)
extension.set_default("session", papylib.Session)
else:
extension.set_default("session", dummy.Session)
# DBus extension stuffs
if DBusController is not None:
extension.category_register("external api", DBusController)
extension.set_default("external api", DBusController)
self.dbus_ext = extension.get_and_instantiate("external api")
else:
self.dbus_ext = None
extension.category_register("sound", e3.common.play_sound.play)
extension.category_register("notification", e3.common.notification.Notification)
extension.category_register("history exporter", e3.Logger.save_logs_as_txt)
if self.config.session is None:
default_id = extension.get_category("session").default_id
self.config.session = default_id
else:
default_id = self.config.session
extension.set_default_by_id("session", default_id)
开发者ID:sledgehammer999,项目名称:emesene,代码行数:35,代码来源:emesene.py
示例2: category_register
def category_register(self):
if os.name == "nt":
extension.category_register('idle timer', WindowsTimer.WindowsTimer,
None, True)
else:
extension.category_register('idle timer', LinuxTimer,
None, True)
开发者ID:zipatei,项目名称:emesene-supported-plugins,代码行数:7,代码来源:plugin.py
示例3: category_register
def category_register(self):
import songretriever
extension.category_register(CATEGORY, songretriever.BaseMusicHandler, songretriever.BaseMusicHandler, True)
if self._supported_version("2.11.12-devel"):
extension.register("userpanel button", MusicButton.MusicButton)
return True
开发者ID:jamesaxl,项目名称:emesene-supported-plugins,代码行数:7,代码来源:plugin.py
示例4: _setup
def _setup(self):
'''register core extensions'''
extension.category_register('session', dummy.Session, single_instance=True)
#extension.category_register('session', msn.Session,
# single_instance=True)
extension.register('session', jabber.Session)
extension.register('session', dummy.Session)
#extension.register('session', msn.Session)
if papylib is not None:
extension.register('session', papylib.Session)
extension.set_default('session', papylib.Session)
else:
extension.set_default('session', dummy.Session)
#DBus extension stuffs
extension.category_register('external api', DBusController)
extension.set_default('external api', DBusController)
self.dbus_ext = extension.get_and_instantiate('external api')
extension.category_register('sound', e3.common.play_sound.play)
extension.category_register('notification',
e3.common.notification.Notification)
extension.category_register('history exporter',
e3.Logger.save_logs_as_txt)
if self.config.session is None:
default_id = extension.get_category('session').default_id
self.config.session = default_id
else:
default_id = self.config.session
extension.set_default_by_id('session', default_id)
开发者ID:cando,项目名称:emesene,代码行数:33,代码来源:emesene.py
示例5: category_register
def category_register(self):
if os.name == "nt":
extension.category_register('idle timer', WindowsTimer.WindowsTimer,
None, True)
else: #TODO: add some unix extensions that works always
if HAS_XLIB:
extension.category_register('idle timer', XlibTimer.XlibTimer,
None, True)
开发者ID:Roger,项目名称:emesene-supported-plugins,代码行数:8,代码来源:plugin.py
示例6: import_and_register
def import_and_register(category_name, cls):
try:
imported_cls = __import__('gui.common.'+cls)
if extension.get_category(category_name) is None:
extension.category_register(category_name, eval(cls+'.'+cls))
else:
extension.register(category_name, eval(cls+'.'+cls))
return imported_cls
except ImportError:
return None
开发者ID:diosio,项目名称:emesene,代码行数:10,代码来源:__init__.py
示例7: main
def main():
"""
the main method of emesene
"""
extension.category_register("session", dummy.Session, single_instance=True)
extension.category_register("option provider", None, interfaces=interfaces.IOptionProvider)
extension.get_category("option provider").multi_extension = True
extension.get_category("option provider").activate(ExtensionDefault)
options = PluggableOptionParser(args=emesene_args)
options.read_options()
main_method = extension.get_default("main")
main_method(Controller)
开发者ID:Roger,项目名称:emesene,代码行数:12,代码来源:emesene.py
示例8: _setup
def _setup(self):
'''register core extensions'''
#extension.category_register('session', dummy.Session,
# single_instance=True)
#if Info.EMESENE_VERSION.endswith("dev"):
# extension.register('session', dummy.Session)
#if webqq is not None:
# extension.register('session', webqq.Session)
# extension.set_default('session', webqq.Session)
#if xmpp is not None:
# extension.register('session', xmpp.Session)
# extension.set_default('session', xmpp.Session)
if whatsapp is not None:
extension.register('session', whatsapp.Session)
extension.set_default('session', whatsapp.Session)
#if papylib is not None:
# extension.register('session', papylib.Session)
# extension.set_default('session', papylib.Session)
#external API stuff
self.dbus_ext = extension.get_and_instantiate('external api')
self.network_checker = extension.get_and_instantiate(
'network checker')
self.unity_launcher = extension.get_and_instantiate('unity launcher')
extension.category_register('sound', e3.common.Sounds.SoundPlayer,
None, True)
extension.category_register('notification',
e3.common.notification.Notification)
extension.category_register('history exporter', e3.Logger.ExporterTxt)
extension.register('history exporter', e3.Logger.ExporterXml)
extension.register('history exporter', e3.Logger.ExporterHtml)
extension.register('history exporter', e3.Logger.ExporterCsv)
extension.register('history exporter', e3.Logger.ExporterJSON)
# ui callbacks for plugins
extension.category_register('send message callback handler',
e3.common.PriorityList, single_instance=True)
extension.category_register('receive message callback handler',
e3.common.PriorityList, single_instance=True)
if self.config.session is None:
default_id = extension.get_category('session').default_id
self.config.session = default_id
else:
default_id = self.config.session
extension.set_default_by_id('session', default_id)
开发者ID:ahlfors,项目名称:uazapp-im,代码行数:53,代码来源:emesene.py
示例9: main
def main():
"""
the main method of emesene
"""
extension.category_register('session', msn.Session, single_instance=True)
extension.category_register('option provider', None,
interfaces=interfaces.IOptionProvider)
extension.get_category('option provider').multi_extension = True
extension.get_category('option provider').activate(ExtensionDefault)
options = PluggableOptionParser(argv)
options.read_options()
main_method = extension.get_default('main')
main_method(Controller)
开发者ID:bah,项目名称:emesene,代码行数:13,代码来源:emesene.py
示例10: _setup
def _setup(self):
"""register core extensions"""
extension.category_register("session", dummy.Session, single_instance=True)
if xmpp is not None:
extension.register("session", xmpp.Session)
extension.register("session", dummy.Session)
if webqq is not None:
extension.register("session", webqq.Session)
extension.register("session", dummy.Session)
if papylib is not None:
extension.register("session", papylib.Session)
extension.set_default("session", papylib.Session)
else:
extension.set_default("session", dummy.Session)
# external API stuff
self.dbus_ext = extension.get_and_instantiate("external api")
self.network_checker = extension.get_and_instantiate("network checker")
self.unity_launcher = extension.get_and_instantiate("unity launcher")
extension.category_register("sound", e3.common.Sounds.SoundPlayer, None, True)
extension.category_register("notification", e3.common.notification.Notification)
extension.category_register("history exporter", e3.Logger.save_logs_as_txt)
extension.register("history exporter", e3.Logger.save_logs_as_xml)
if self.config.session is None:
default_id = extension.get_category("session").default_id
self.config.session = default_id
else:
default_id = self.config.session
extension.set_default_by_id("session", default_id)
开发者ID:tiancj,项目名称:emesene,代码行数:35,代码来源:emesene.py
示例11: main
def main():
"""
the main method of emesene
"""
#extension.category_register('session', dummy.Session, single_instance=True)
extension.category_register('option provider', None,
interfaces=interfaces.IOptionProvider)
extension.register('quit', sys.exit)
extension.get_category('option provider').multi_extension = True
extension.get_category('option provider').activate(optionprovider.ExtensionDefault)
options = optionprovider.PluggableOptionParser(args=emesene_args)
options.read_options()
main_method = extension.get_default('main')
main_method(Controller)
开发者ID:ahlfors,项目名称:uazapp-im,代码行数:14,代码来源:emesene.py
示例12: _setup
def _setup(self):
"""register core extensions"""
extension.category_register("session", msn.Session, single_instance=True)
extension.register("session", jabber.Session)
extension.register("session", dummy.Session)
extension.register("session", msn.Session)
if papylib is not None:
extension.register("session", papylib.Session)
extension.set_default("session", papylib.Session)
else:
extension.set_default("session", msn.Session)
extension.category_register("sound", e3.common.play_sound.play)
extension.category_register("notification", e3.common.notification.Notification)
extension.category_register("history exporter", e3.Logger.save_logs_as_txt)
if self.config.session is None:
default_id = extension.get_category("session").default_id
self.config.session = default_id
else:
default_id = self.config.session
extension.set_default_by_id("session", default_id)
get_pluginmanager().scan_directory("plugins")
开发者ID:dgel,项目名称:emesene,代码行数:25,代码来源:emesene.py
示例13: _setup
def _setup(self):
'''register core extensions'''
extension.category_register('session', msn.Session,
single_instance=True)
extension.register('session', jabber.Session)
extension.register('session', dummy.Session)
if papylib is not None:
extension.register('session', papylib.Session)
extension.set_default('session', papylib.Session)
extension.category_register('sound', e3.common.play_sound.play)
extension.category_register('notification',
e3.common.notification.Notification)
extension.category_register('history exporter',
e3.Logger.save_logs_as_txt)
if self.config.session is None:
default_id = extension.get_category('session').default_id
self.config.session = default_id
else:
default_id = self.config.session
extension.set_default_by_id('session', default_id)
get_pluginmanager().scan_directory('plugins')
开发者ID:bah,项目名称:emesene,代码行数:25,代码来源:emesene.py
示例14: start
def start(self, session):
"""start the plugin"""
self.session = session
extension.category_register(CATEGORY, songretriever.BaseMusicHandler, songretriever.BaseMusicHandler, True)
self.extensions_register()
extension.get_and_instantiate(CATEGORY, session)
if hasattr(extension, "unregister"):
extension.register("userpanel button", MusicButton.MusicButton, force_default=True)
else:
extension.register("userpanel button", MusicButton.MusicButton)
return True
开发者ID:hit,项目名称:emesene-supported-plugins,代码行数:15,代码来源:plugin.py
示例15: _setup
def _setup(self):
'''register core extensions'''
extension.category_register('session', dummy.Session,
single_instance=True)
extension.register('session', dummy.Session)
if webqq is not None:
extension.register('session', webqq.Session)
extension.set_default('session', webqq.Session)
if xmpp is not None:
extension.register('session', xmpp.Session)
extension.set_default('session', xmpp.Session)
if papylib is not None:
extension.register('session', papylib.Session)
extension.set_default('session', papylib.Session)
#external API stuff
self.dbus_ext = extension.get_and_instantiate('external api')
self.network_checker = extension.get_and_instantiate(
'network checker')
self.unity_launcher = extension.get_and_instantiate('unity launcher')
extension.category_register('sound', e3.common.Sounds.SoundPlayer,
None, True)
extension.category_register('notification',
e3.common.notification.Notification)
extension.category_register('history exporter', e3.Logger.ExporterTxt)
extension.register('history exporter', e3.Logger.ExporterXml)
extension.register('history exporter', e3.Logger.ExporterHtml)
extension.register('history exporter', e3.Logger.ExporterCsv)
extension.register('history exporter', e3.Logger.ExporterJSON)
if self.config.session is None:
default_id = extension.get_category('session').default_id
self.config.session = default_id
else:
default_id = self.config.session
extension.set_default_by_id('session', default_id)
开发者ID:AmiZya,项目名称:emesene,代码行数:42,代码来源:emesene.py
示例16: category_register
def category_register(self):
extension.category_register(CATEGORY, songretriever.MusicHandler, songretriever.MusicHandler, True)
return True
开发者ID:VirtualSilence,项目名称:emesene,代码行数:3,代码来源:plugin.py
示例17: __init__
def __init__(self):
extension.category_register('bar', IBar)
extension.category_register('xyz')
extension.category_register('magic')
开发者ID:boyska,项目名称:pluginmanager,代码行数:4,代码来源:main.py
示例18: setup
def setup():
"""
define all the components for a gtk environment
"""
global WEBKITERROR, INFOBARERROR
import gtk
gtk.settings_get_default().set_property("gtk-error-bell", False)
extension.register('quit', gtk.main_quit)
extension.set_default('quit', gtk.main_quit)
extension.category_register('dialog', Dialog.Dialog)
extension.category_register('avatar chooser', AvatarChooser.AvatarChooser)
extension.category_register('avatar', Avatar.Avatar)
extension.category_register('avatar manager', AvatarManager.AvatarManager)
extension.category_register('preferences', Preferences.Preferences,
single_instance=True)
extension.category_register('login window', Login.Login)
extension.category_register('connecting window', Login.ConnectingWindow)
extension.category_register('window frame', Window.Window)
extension.category_register('main window', MainWindow.MainWindow)
extension.category_register('contact list', ContactList.ContactList)
extension.category_register('synch tool', SyncTool.SyncTool)
if not check_gtk3():
extension.category_register('avatar renderer', Renderers.AvatarRenderer)
extension.category_register('nick renderer', Renderers.CellRendererPlus)
extension.register('nick renderer', Renderers.CellRendererNoPlus)
else:
extension.category_register('avatar renderer', RenderersNew.AvatarRenderer)
extension.category_register('nick renderer', RenderersNew.CellRendererPlus)
extension.register('nick renderer', RenderersNew.CellRendererNoPlus)
extension.category_register('user panel', UserPanel.UserPanel)
extension.category_register('debug window', DebugWindow.DebugWindow)
if not INFOBARERROR:
extension.category_register('nice bar', InfoBar.NiceBar)
extension.register('nice bar', NiceBar.NiceBar)
else:
extension.category_register('nice bar', NiceBar.NiceBar)
extension.category_register('main menu', MainMenu.MainMenu)
extension.category_register('menu file', MainMenu.FileMenu)
extension.category_register('menu actions', MainMenu.ActionsMenu)
extension.category_register('menu options', MainMenu.OptionsMenu)
extension.category_register('menu contact', ContactMenu.ContactMenu)
extension.category_register('menu group', GroupMenu.GroupMenu)
extension.category_register('menu account', AccountMenu.AccountMenu)
extension.category_register('menu help', MainMenu.HelpMenu)
extension.category_register('menu status', StatusMenu.StatusMenu)
extension.category_register('below menu', EmptyWidget.EmptyWidget)
extension.category_register('below panel', EmptyWidget.EmptyWidget)
extension.category_register('below userlist', EmptyWidget.EmptyWidget)
extension.category_register('call widget', CallWidget.CallWindow)
extension.category_register('conversation window', \
ConversationManager.ConversationManager)
extension.category_register('conversation', Conversation.Conversation)
extension.category_register('conversation header', Header.Header)
extension.category_register('conversation info',
ContactInfoRotate.ContactInfoRotate)
extension.register('conversation info', ContactInfoList.ContactInfoList)
extension.category_register('conversation tab', TabWidget.TabWidget)
extension.category_register('conversation input', TextBox.InputText)
extension.category_register('conversation toolbar', \
ConversationToolbar.ConversationToolbar)
extension.category_register('plugin window', \
PluginWindow.PluginWindow)
if not check_gtk3():
extension.category_register('image area selector', ImageAreaSelector.ImageAreaSelectorDialog)
else:
extension.category_register('image area selector', ImageAreaSelectorNew.ImageAreaSelectorDialog)
extension.category_register('filetransfer pool', FileTransferBarWidget.FileTransferBarWidget)
extension.category_register('filetransfer widget', FileTransferWidget.FileTransferWidget)
if not WEBKITERROR:
extension.category_register('conversation output', AdiumTextBox.OutputText)
extension.register('conversation output', TextBox.OutputText)
else:
extension.category_register('conversation output', TextBox.OutputText)
extension.category_register('picture handler', PictureHandler.PictureHandler)
开发者ID:need47-test,项目名称:emesene,代码行数:86,代码来源:__init__.py
示例19: setup
def setup():
"""
define all the components for a gtk environment
"""
global WEBKITERROR, INFOBARERROR
import gtk
gtk.settings_get_default().set_property("gtk-error-bell", False)
extension.register("quit", gtk.main_quit)
extension.category_register("dialog", Dialog.Dialog)
extension.category_register("avatar chooser", AvatarChooser.AvatarChooser)
extension.category_register("avatar", Avatar.Avatar)
extension.category_register("avatar manager", AvatarManager.AvatarManager)
extension.category_register("preferences", Preferences.Preferences, single_instance=True)
extension.category_register("login window", Login.Login)
extension.category_register("connecting window", Login.ConnectingWindow)
extension.category_register("window frame", Window.Window)
extension.category_register("main window", MainWindow.MainWindow)
extension.category_register("contact list", ContactList.ContactList)
extension.category_register("synch tool", SyncTool.SyncTool)
if not check_gtk3():
extension.category_register("avatar renderer", Renderers.AvatarRenderer)
extension.category_register("nick renderer", Renderers.CellRendererPlus)
extension.register("nick renderer", Renderers.CellRendererNoPlus)
else:
extension.category_register("avatar renderer", RenderersNew.AvatarRenderer)
extension.category_register("nick renderer", RenderersNew.CellRendererPlus)
extension.register("nick renderer", RenderersNew.CellRendererNoPlus)
extension.category_register("user panel", UserPanel.UserPanel)
extension.category_register("debug window", DebugWindow.DebugWindow)
if not INFOBARERROR:
extension.category_register("nice bar", InfoBar.NiceBar)
extension.register("nice bar", NiceBar.NiceBar)
else:
extension.category_register("nice bar", NiceBar.NiceBar)
extension.category_register("main menu", MainMenu.MainMenu)
extension.category_register("menu file", MainMenu.FileMenu)
extension.category_register("menu actions", MainMenu.ActionsMenu)
extension.category_register("menu options", MainMenu.OptionsMenu)
extension.category_register("menu contact", ContactMenu.ContactMenu)
extension.category_register("menu group", GroupMenu.GroupMenu)
extension.category_register("menu account", AccountMenu.AccountMenu)
extension.category_register("menu help", MainMenu.HelpMenu)
extension.category_register("menu status", StatusMenu.StatusMenu)
extension.category_register("below menu", EmptyWidget.EmptyWidget)
extension.category_register("below panel", EmptyWidget.EmptyWidget)
extension.category_register("below userlist", EmptyWidget.EmptyWidget)
extension.category_register("call widget", CallWidget.CallWindow)
extension.category_register("conversation window", ConversationManager.ConversationManager)
extension.category_register("conversation", Conversation.Conversation)
extension.category_register("conversation header", Header.Header)
extension.category_register("conversation info", ContactInfoRotate.ContactInfoRotate)
extension.register("conversation info", ContactInfoList.ContactInfoList)
extension.category_register("conversation tab", TabWidget.TabWidget)
extension.category_register("conversation input", TextBox.InputText)
extension.category_register("conversation toolbar", ConversationToolbar.ConversationToolbar)
if not check_gtk3():
extension.category_register("image area selector", ImageAreaSelector.ImageAreaSelectorDialog)
else:
extension.category_register("image area selector", ImageAreaSelectorNew.ImageAreaSelectorDialog)
extension.category_register("filetransfer pool", FileTransferBarWidget.FileTransferBarWidget)
extension.category_register("filetransfer widget", FileTransferWidget.FileTransferWidget)
if not WEBKITERROR:
extension.category_register("conversation output", AdiumTextBox.OutputText)
extension.register("conversation output", TextBox.OutputText)
else:
extension.category_register("conversation output", TextBox.OutputText)
extension.category_register("picture handler", PictureHandler.PictureHandler)
开发者ID:project-hephaestus,项目名称:emesene,代码行数:80,代码来源:__init__.py
示例20: setup
def setup():
"""
define all the components for a gtk environment
"""
import gtk
extension.category_register('dialog', Dialog.Dialog)
extension.category_register('image chooser', ImageChooser.ImageChooser)
extension.category_register('avatar chooser', AvatarChooser.AvatarChooser)
extension.category_register('preferences', Preferences.Preferences)
extension.category_register('login window', Login.Login)
extension.category_register('window frame', Window.Window)
extension.category_register('main window', MainWindow.MainWindow)
extension.category_register('contact list', ContactList.ContactList)
extension.category_register('nick renderer', ContactList.CellRendererPlus)
extension.register('nick renderer', gtk.CellRendererText)
extension.register('nick renderer', ContactList.CellRendererNoPlus)
extension.category_register('user panel', UserPanel.UserPanel)
extension.category_register('tray icon', TrayIcon.TrayIcon)
extension.category_register('debug window', DebugWindow.DebugWindow)
extension.category_register('main menu', MainMenu.MainMenu)
extension.category_register('menu file', MainMenu.FileMenu)
extension.category_register('menu actions', MainMenu.ActionsMenu)
extension.category_register('menu options', MainMenu.OptionsMenu)
extension.category_register('menu contact', ContactMenu.ContactMenu)
extension.category_register('menu group', GroupMenu.GroupMenu)
extension.category_register('menu account', AccountMenu.AccountMenu)
extension.category_register('menu help', MainMenu.HelpMenu)
extension.category_register('menu status', StatusMenu.StatusMenu)
extension.category_register('below menu', EmptyWidget.EmptyWidget)
extension.category_register('below panel', EmptyWidget.EmptyWidget)
extension.category_register('below userlist', EmptyWidget.EmptyWidget)
extension.category_register('conversation window', \
ConversationManager.ConversationManager)
extension.category_register('conversation', Conversation.Conversation)
extension.category_register('conversation header', Header.Header)
extension.category_register('conversation info', ContactInfo.ContactInfo)
extension.category_register('conversation tab', TabWidget.TabWidget)
extension.category_register('conversation input', TextBox.InputText)
extension.category_register('conversation toolbar', \
ConversationToolbar.ConversationToolbar)
extension.category_register('plugin window', \
PluginWindow.PluginWindow)
extension.category_register('preferences dialog', config_gtk.build_window)
if not WebKitTextBox.ERROR:
extension.category_register('conversation output', WebKitTextBox.OutputText)
extension.register('conversation output', TextBox.OutputText)
else:
extension.category_register('conversation output', TextBox.OutputText)
开发者ID:Otacon,项目名称:emesene,代码行数:54,代码来源:__init__.py
注:本文中的extension.category_register函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论