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


Python HIGButton.flags方法代码示例

本文整理汇总了Python中higwidgets.higbuttons.HIGButton.flags方法的典型用法代码示例。如果您正苦于以下问题:Python HIGButton.flags方法的具体用法?Python HIGButton.flags怎么用?Python HIGButton.flags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在higwidgets.higbuttons.HIGButton的用法示例。


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

示例1: PluginPage

# 需要导入模块: from higwidgets.higbuttons import HIGButton [as 别名]
# 或者: from higwidgets.higbuttons.HIGButton import flags [as 别名]

#.........这里部分代码省略.........
                    warn_reboot = True

            # Connect the various buttons
            row.action_btn.connect('clicked', self.__on_row_action, row)
            row.uninstall_btn.connect('clicked', self.__on_row_uninstall, row)
            row.preference_btn.connect('clicked', self.__on_row_preference, row)

            row.connect('clicked', self.__on_row_preference, row)
            row.connect('popup', self.__on_row_popup)

            self.richlist.append_row(row)

        if warn_reboot:
            # Warn the user
            self.p_window.animated_bar.label = \
                _('Remember that you have to restart UMIT to make new version' \
                  ' of plugins to be loaded correctly.')
            self.p_window.animated_bar.start_animation(True)

    def __on_restart(self, widget):
        "Called when the user click on the restart button"

        Core().mainwindow.emit('delete-event', None)

    def __on_skip_updates(self, widget):
        "Called when the user click on the skip button"

        # We need to repopulate the tree
        self.richlist.clear()
        self.populate()

        self.p_window.toolbar.unset_status()

        if self.restart_btn.flags() & gtk.VISIBLE:
            # That callback is called from a self.___on_install_updates

            self.restart_btn.hide()
            self.p_window.animated_bar.label = \
                _('Rembember to restart UMIT to use new version of plugins.')

        else:
            self.p_window.animated_bar.label = \
                    _('Update skipped')

        self.p_window.animated_bar.start_animation(True)

        self.skip_install_btn.hide()
        self.install_updates_btn.hide()
        self.find_updates_btn.show()

        self.menu_enabled = True

    def __on_install_updates(self, widget):
        """
        Called when the user click on 'install updates' button

        This function call the start_download() of UpdateEngine
        and then add a timeout callback (__refresh_row_download) to
        update the gui at interval of 300 milliseconds.
        """

        lst = []
        for obj in self.p_window.update_eng.list:
            if obj.status != LATEST_GETTED:
                self.richlist.remove_row(obj.object)
                continue
开发者ID:aregee,项目名称:network-scanner,代码行数:70,代码来源:PluginPage.py


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