vpn_widget.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:vpn_widget 作者: deccico 项目源码 文件源码
def main(self):
        self.indicator = appindicator.Indicator.new(self.APPINDICATOR_ID, self.ICON_OFF,
                                                    appindicator.IndicatorCategory.SYSTEM_SERVICES)
        self.indicator.set_status(appindicator.IndicatorStatus.ACTIVE)
        self.indicator.set_menu(self.build_menu())

        # This sets the handler for “INT” signal processing
        #- the one issued by the OS when “Ctrl+C” is typed.
        #The handler we assign to it is the “default” handler, which,
        #in case of the interrupt signal, is to stop execution.
        signal.signal(signal.SIGINT, signal.SIG_DFL)  #listen to quit signal

        notify.init(self.APPINDICATOR_ID)
        self.update()
        glib.timeout_add_seconds(self.UPDATE_FREQUENCY, self.update)
        gtk.main()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号