pomodoro_indicator.py 文件源码

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

项目:pomodoro-indicator 作者: atareao 项目源码 文件源码
def __init__(self):
        GObject.GObject.__init__(self)
        self.pw = 0
        # self.player = Gst.ElementFactory.make("playbin", "player")
        # self.player.connect("about-to-finish",  self.on_player_finished)
        # bus = self.player.get_bus()
        # bus.connect("message", self.on_player_message)
        self.icon = comun.ICON
        self.active_icon = None
        self.about_dialog = None
        self.active = False
        self.animate = False
        self.frame = 0
        self.pomodoros = 0
        self.player = Player()
        self.notification = Notify.Notification.new('', '', None)
        self.read_preferences()
        #
        self.indicator = appindicator.Indicator.new('Pomodoro-Indicator',
                                                    self.active_icon,
                                                    appindicator.
                                                    IndicatorCategory.
                                                    HARDWARE)
        self.indicator.set_status(appindicator.IndicatorStatus.ACTIVE)

        self.indicator.connect('scroll-event', self.on_scroll)

        menu = self.get_menu()
        self.indicator.set_menu(menu)
        self.connect('session_end', self.on_session_end)
        self.connect('break_end', self.on_break_end)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号