def start_automatically(self):
if self.wid != 0:
GLib.source_remove(self.wid)
self.wid = 0
self.working_menu_item.set_label(_('Stop'))
self.indicator.set_icon(comun.STATUS_ICON[self.theme][0])
if self.show_notifications:
self.notification.update('Backlight-Indicator',
_('Session starts'),
comun.STATUS_ICON[self.theme][0])
self.notification.show()
self.do_the_work()
self.wid = GLib.timeout_add_seconds(self.sample_time * 60,
self.do_the_work)
评论列表
文章目录