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)
评论列表
文章目录