当前位置: 首页>>代码示例>>Python>>正文


Python plugin_updater.PluginUpdaterDialog类代码示例

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


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

示例1: get_plugins

 def get_plugins(self):
     from calibre.gui2.dialogs.plugin_updater import (PluginUpdaterDialog,
             FILTER_NOT_INSTALLED)
     d = PluginUpdaterDialog(self.gui,
             initial_filter=FILTER_NOT_INSTALLED)
     d.exec_()
     if d.do_restart:
         self.gui.quit(restart=True)
开发者ID:JimmXinu,项目名称:calibre,代码行数:8,代码来源:preferences.py

示例2: check_for_plugin_updates

    def check_for_plugin_updates(self):
        # Get the user to choose a plugin to install
        initial_filter = FILTER_UPDATE_AVAILABLE
        mods = QApplication.keyboardModifiers()
        if mods & Qt.ControlModifier or mods & Qt.ShiftModifier:
            initial_filter = FILTER_ALL

        d = PluginUpdaterDialog(self.gui, initial_filter=initial_filter)
        d.exec_()
开发者ID:Eksmo,项目名称:calibre,代码行数:9,代码来源:plugin_updates.py

示例3: update_plugins

 def update_plugins(self, not_installed=False):
     from calibre.gui2.dialogs.plugin_updater import (PluginUpdaterDialog,
                             FILTER_UPDATE_AVAILABLE, FILTER_NOT_INSTALLED)
     mode = FILTER_NOT_INSTALLED if not_installed else FILTER_UPDATE_AVAILABLE
     d = PluginUpdaterDialog(self.gui, initial_filter=mode)
     d.exec_()
     self._plugin_model.populate()
     self._plugin_model.reset()
     self.changed_signal.emit()
开发者ID:Eksmo,项目名称:calibre,代码行数:9,代码来源:plugins.py

示例4: get_plugins

 def get_plugins(self):
     from calibre.gui2.dialogs.plugin_updater import (PluginUpdaterDialog,
         FILTER_UPDATE_AVAILABLE)
     d = PluginUpdaterDialog(self.parent(),
             initial_filter=FILTER_UPDATE_AVAILABLE)
     d.exec_()
     if d.do_restart:
         QDialog.accept(self)
         from calibre.gui2.ui import get_gui
         gui = get_gui()
         if gui is not None:
             gui.quit(restart=True)
开发者ID:artbycrunk,项目名称:calibre,代码行数:12,代码来源:update.py

示例5: update_found

    def update_found(self, version, force=False, no_show_popup=False):
        try:
            calibre_version, plugin_updates = version.split(VSEP)
            plugin_updates = int(plugin_updates)
        except:
            traceback.print_exc()
            return
        self.last_newest_calibre_version = calibre_version
        has_calibre_update = calibre_version and calibre_version != NO_CALIBRE_UPDATE
        has_plugin_updates = plugin_updates > 0
        self.plugin_update_found(plugin_updates)

        if not has_calibre_update and not has_plugin_updates:
            self.status_bar.update_label.setVisible(False)
            return
        if has_calibre_update:
            plt = u''
            if has_plugin_updates:
                plt = _(' (%d plugin updates)')%plugin_updates
            msg = (u'<span style="color:green; font-weight: bold">%s: '
                    u'<a href="update:%s">%s%s</a></span>') % (
                        _('Update found'), version, calibre_version, plt)
        else:
            msg = (u'<a href="update:%s">%d %s</a>')%(version, plugin_updates,
                    _('updated plugins'))
        self.status_bar.update_label.setText(msg)
        self.status_bar.update_label.setVisible(True)


        if has_calibre_update:
            if (force or (config.get('new_version_notification') and
                    dynamic.get('update to version %s'%calibre_version, True))):
                if not no_show_popup:
                    self._update_notification__ = UpdateNotification(calibre_version,
                            plugin_updates, parent=self)
                    self._update_notification__.show()
        elif has_plugin_updates:
            if force:
                from calibre.gui2.dialogs.plugin_updater import (PluginUpdaterDialog,
                    FILTER_UPDATE_AVAILABLE)
                d = PluginUpdaterDialog(self,
                        initial_filter=FILTER_UPDATE_AVAILABLE)
                d.exec_()
                if d.do_restart:
                    self.quit(restart=True)
开发者ID:yeyanchao,项目名称:calibre,代码行数:45,代码来源:update.py

示例6: update_found

    def update_found(self, calibre_version, number_of_plugin_updates, force=False, no_show_popup=False):
        self.last_newest_calibre_version = calibre_version
        has_calibre_update = calibre_version != NO_CALIBRE_UPDATE
        has_plugin_updates = number_of_plugin_updates > 0
        self.plugin_update_found(number_of_plugin_updates)
        version_url = binascii.hexlify(cPickle.dumps((calibre_version, number_of_plugin_updates), -1))
        calibre_version = u'.'.join(map(unicode, calibre_version))

        if not has_calibre_update and not has_plugin_updates:
            self.status_bar.update_label.setVisible(False)
            return
        if has_calibre_update:
            plt = u''
            if has_plugin_updates:
                plt = _(' (%d plugin updates)')%number_of_plugin_updates
            msg = (u'<span style="color:green; font-weight: bold">%s: '
                    u'<a href="update:%s">%s%s</a></span>') % (
                        _('Update found'), version_url, calibre_version, plt)
        else:
            msg = (u'<a href="update:%s">%d %s</a>')%(version_url, number_of_plugin_updates,
                    _('updated plugins'))
        self.status_bar.update_label.setText(msg)
        self.status_bar.update_label.setVisible(True)

        if has_calibre_update:
            if (force or (config.get('new_version_notification') and
                    dynamic.get('update to version %s'%calibre_version, True))):
                if not no_show_popup:
                    self._update_notification__ = UpdateNotification(calibre_version,
                            number_of_plugin_updates, parent=self)
                    self._update_notification__.show()
        elif has_plugin_updates:
            if force:
                from calibre.gui2.dialogs.plugin_updater import (PluginUpdaterDialog,
                    FILTER_UPDATE_AVAILABLE)
                d = PluginUpdaterDialog(self,
                        initial_filter=FILTER_UPDATE_AVAILABLE)
                d.exec_()
                if d.do_restart:
                    self.quit(restart=True)
开发者ID:AtulKumar2,项目名称:calibre,代码行数:40,代码来源:update.py

示例7: get_plugins

 def get_plugins(self):
     from calibre.gui2.dialogs.plugin_updater import (PluginUpdaterDialog,
         FILTER_UPDATE_AVAILABLE)
     d = PluginUpdaterDialog(self.parent(),
             initial_filter=FILTER_UPDATE_AVAILABLE)
     d.exec_()
开发者ID:AtulKumar2,项目名称:calibre,代码行数:6,代码来源:update.py


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