• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python extension.register函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中extension.register函数的典型用法代码示例。如果您正苦于以下问题:Python register函数的具体用法?Python register怎么用?Python register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了register函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: 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


示例2: start

 def start(self, session):
     #FIXME: remove the first check once we depend on 2.12.5+
     if hasattr(extension, 'unregister'):
         extension.register('below conversation', TypingNotification.TypingNotification, force_default=True)
     else:
         extension.register('below conversation', TypingNotification.TypingNotification)
     return True
开发者ID:emesene,项目名称:emesene-supported-plugins,代码行数:7,代码来源:plugin.py


示例3: 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('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('nick renderer', Renderers.CellRendererPlus)
    extension.register('nick renderer', gtk.CellRendererText)
    extension.register('nick renderer', Renderers.CellRendererNoPlus)
    extension.register('nick renderer', Renderers.GtkCellRenderer)
    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)
        extension.register('conversation output', AdiumTextBox.OutputText)
    else:
        extension.category_register('conversation output', TextBox.OutputText)
开发者ID:JPtja,项目名称:emesene,代码行数:57,代码来源:__init__.py


示例4: 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


示例5: _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


示例6: 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:tiancj,项目名称:emesene,代码行数:13,代码来源:emesene.py


示例7: _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


示例8: _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:fitoria,项目名称:emesene,代码行数:28,代码来源:emesene.py


示例9: 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


示例10: _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

        if NetworkChecker is not None:
            extension.category_register('network checker', NetworkChecker)
            extension.set_default('network checker', NetworkChecker)
            self.network_checker = extension.get_and_instantiate(
                    'network checker')
        else:
            self.network_checker = None

        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:Narciso91,项目名称:emesene,代码行数:51,代码来源:emesene.py


示例11: _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


示例12: _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


示例13: _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

        if DBusNetworkChecker is not None:
            extension.category_register("network checker", DBusNetworkChecker)
            extension.set_default("network checker", DBusNetworkChecker)
            self.network_checker = extension.get_and_instantiate("network checker")
        else:
            self.network_checker = None

        if UnityLauncher is not None:
            extension.category_register("unity launcher", UnityLauncher)
            extension.set_default("unity launcher", UnityLauncher)
            self.unity_launcher = extension.get_and_instantiate("unity launcher", self.close_session)
        else:
            self.unity_launcher = None

        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)

        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:Roger,项目名称:emesene,代码行数:49,代码来源:emesene.py


示例14: extensions_register

    def extensions_register(self):
        extension.register(CATEGORY, handler_amarok2.Amarok2Handler)
        extension.register(CATEGORY, handler_audacious2.Audacious2Handler)
        extension.register(CATEGORY, handler_banshee.BansheeHandler)
        extension.register(CATEGORY, handler_exaile.ExaileHandler)
        extension.register(CATEGORY, handler_gmusicbrowser.GMusicBrowserHandler)
        extension.register(CATEGORY, handler_guayadeque.GuayadequeHandler)
        extension.register(CATEGORY, handler_lastfm.LastfmHandler)
        extension.register(CATEGORY, handler_moc.MocHandler)
        extension.register(CATEGORY, handler_mpd.MpdHandler)
        extension.register(CATEGORY, handler_mpris.MprisHandler)
        extension.register(CATEGORY, handler_rhythmbox.RhythmboxHandler)

        if XMMSCLIENT:        
            extension.register(CATEGORY, handler_xmms2.Xmms2Handler)
开发者ID:VirtualSilence,项目名称:emesene,代码行数:15,代码来源:plugin.py


示例15: start

 def start(self, session):
     if hasattr(extension, 'unregister'):
         extension.register('below userlist', HistoryStatusCombo.HistoryStatusCombo, force_default=True)
     else:
         extension.register('below userlist', HistoryStatusCombo.HistoryStatusCombo)
     return True
开发者ID:Sbte,项目名称:emesene-supported-plugins,代码行数:6,代码来源:plugin.py


示例16: extension_register

    def extension_register(self):
        if sys.platform == "linux2" or sys.platform == 'linux3': #import unix players
            extension.register(CATEGORY, handler_mpris.Amarok2Handler)
            extension.register(CATEGORY, handler_mpris.AudaciousHandler)
            extension.register(CATEGORY, handler_banshee.BansheeHandler)
            extension.register(CATEGORY, handler_mpris.ClementineHandler)
            extension.register(CATEGORY, handler_exaile.ExaileHandler)
            extension.register(CATEGORY, handler_mpris2.GMusicBrowserHandler)
            extension.register(CATEGORY, handler_mpris.GuayadequeHandler)
            extension.register(CATEGORY, handler_lastfm.LastfmHandler)
            extension.register(CATEGORY, handler_moc.MocHandler)
            extension.register(CATEGORY, handler_mpd.MpdHandler)
            extension.register(CATEGORY, handler_mpris2.PraghaHandler)
            extension.register(CATEGORY, handler_mpris2.RhythmboxHandler)
            extension.register(CATEGORY, handler_mpris2.AudaciousHandler)
            extension.register(CATEGORY, handler_rhythmbox.RhythmboxHandler)

            if XMMSCLIENT:
                extension.register(CATEGORY, handler_xmms2.Xmms2Handler)

            handler_id = self.session.config.d_extensions.get(CATEGORY, None)

            if handler_id is None:
                handler_id = extension._get_class_name(handler_rhythmbox.RhythmboxHandler)
                self.session.config.d_extensions.get(CATEGORY, handler_id)

        elif sys.platform == "darwin": #OS X players
            extension.register(CATEGORY, handler_itunes.iTunesHandler)
            extension.register(CATEGORY, handler_spotify.SpotifyHandler)

            handler_id = self.session.config.d_extensions.get(CATEGORY, None)

            if handler_id is None:
                handler_id = extension._get_class_name(handler_rhythmbox.RhythmboxHandler)
                self.session.config.d_extensions.get(CATEGORY, handler_id)

        else: #import Windows players
            extension.register(CATEGORY, handler_atunes.aTunesHandler)
            extension.register(CATEGORY, handler_foobar2000.Foobar2000Handler)
            extension.register(CATEGORY, handler_gomplayer.GOMPlayerHandler)
            extension.register(CATEGORY, handler_mediamonkey.MediaMonkeyHandler)
            extension.register(CATEGORY, handler_mediaplayerclassic.MediaPlayerClassicHandler)
            extension.register(CATEGORY, handler_onebyone.OneByOneHandler)
            extension.register(CATEGORY, handler_realplayer.RealPlayerHandler)
            extension.register(CATEGORY, handler_smplayer.SMPlayerHandler)
            extension.register(CATEGORY, handler_winamp.WinampHandler)
            extension.register(CATEGORY, handler_xmplay.XMPlayHandler)

            handler_id = self.session.config.d_extensions.get(CATEGORY, None)

            if handler_id is None:
                handler_id = extension._get_class_name(handler_winamp.WinampHandler)
                self.session.config.d_extensions.get(CATEGORY, handler_id)

        extension.set_default_by_id(CATEGORY, handler_id)

        if hasattr(extension, 'unregister'):
            extension.register('userpanel button', MusicButton.MusicButton, force_default=True)
        else:
            extension.register('userpanel button', MusicButton.MusicButton)
开发者ID:emesene,项目名称:emesene-supported-plugins,代码行数:60,代码来源:plugin.py


示例17: __destroy_dbus_session

    def __destroy_dbus_session(self):
        '''Destroy current dbus session'''
        if self.__dbus_object:
            try:
                dbus.service.Object.remove_from_connection(self.__dbus_object)
            except AttributeError:
                pass
            self.__dbus_object = None

    #Callback functions
    def __on_status_changed(self, status):
        self.__dbus_object.status_changed(status)


extension.register('external api', DBusController)
extension.set_default('external api', DBusController)

class EmeseneObject(dbus.service.Object):
    """
    The object that is exported via DBUS
    """
    def __init__(self, bus_name, object_path, session, window):
        try:
            dbus.service.Object.__init__(self, bus_name, object_path)
        except Exception, ex:
            print 'Emesene DBUS error: %s' % str(ex)

        self.__session = session
        self.__window = window
开发者ID:AmiZya,项目名称:emesene,代码行数:29,代码来源:ExternalApiDBus.py


示例18: __destroy_dbus_session

        def __destroy_dbus_session(self):
            '''Destroy current dbus session'''
            if self.__dbus_object:
                try:
                    dbus.service.Object.remove_from_connection(self.__dbus_object)
                except AttributeError:
                    pass
                self.__dbus_object = None

        #Callback functions
        def __on_status_changed(self, status):
             self.__dbus_object.status_changed(status)


    extension.register('external api', DBusController)

    class EmeseneObject(dbus.service.Object):
        """
        The object that is exported via DBUS
        """
        def __init__(self, bus_name, object_path, session):
            try:
                dbus.service.Object.__init__(self, bus_name, object_path)
            except Exception, ex:
                print 'Emesene DBUS error: %s' % str(ex)

            self.__session = session

        def get_session(self):
            return self.__session
开发者ID:19MiRkO91,项目名称:emesene,代码行数:30,代码来源:DBus.py


示例19: setup

def setup():
    """
    define all the components for a gtk environment
    """
    global WEBKITERROR, INDICATORERROR

    import gtk
    gtk.settings_get_default().set_property("gtk-error-bell", False)

    extension.category_register('dialog', Dialog.Dialog)
    extension.category_register('image chooser', ImageChooser.ImageChooser)
    extension.category_register('avatar chooser', AvatarChooser.AvatarChooser)
    extension.category_register('avatar', Avatar.Avatar)
    extension.category_register('avatar renderer', Renderers.AvatarRenderer)

    extension.category_register('preferences', Preferences.Preferences)
    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('nick renderer', Renderers.CellRendererPlus)
    extension.register('nick renderer', Renderers.CellRendererNoPlus)
    extension.category_register('user panel', UserPanel.UserPanel)

    if not INDICATORERROR:
        extension.category_register('tray icon', Indicator.Indicator)
        extension.register('tray icon', TrayIcon.TrayIcon)
    else:
        extension.category_register('tray icon', TrayIcon.TrayIcon)

    extension.category_register('debug window', DebugWindow.DebugWindow)
    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('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)
    extension.category_register('image area selector', ImageAreaSelector.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)

    try:
        import PyNotification
        extension.category_register(('notificationGUI'), PyNotification.pyNotification)
        extension.register(('notificationGUI'), GtkNotification.gtkNotification)
    except:
        extension.category_register(('notificationGUI'), GtkNotification.gtkNotification)
    
    extension.category_register('picture handler', PictureHandler.PictureHandler)
开发者ID:Zincr0,项目名称:emesene,代码行数:78,代码来源:__init__.py


示例20: setup

        # (follows) ... while processing Qt's events in glib's
        # main loop freezes the application on linux ^_^
        global GCONTEXT
        GCONTEXT = g_main_loop.get_context()
        idletimer.start(10)
        app.exec_()


# pylint: disable=W0612
qt4_main.NAME = "qt4_main"
qt4_main.DESCRIPTION  = "This extensions uses Qt to build the GUI"
qt4_main.AUTHOR = "Gabriele Whisky Visconti"
qt4_main.WEBSITE = ""
# pylint: enable=W0612

extension.register('main', qt4_main)

def setup():
    """
    define all the components for a Qt4 environment
    """
    # pylint: disable=W0403
    import AvatarChooser
    import Conversation
    import DebugWindow
    import Dialog
    import Notifier
    import PictureHandler
    import Preferences
    import TopLevelWindow
    import TrayIcon
开发者ID:Stiveknx,项目名称:emesene,代码行数:31,代码来源:__init__.py



注:本文中的extension.register函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python extension.set_default函数代码示例发布时间:2022-05-24
下一篇:
Python extension.implements函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap