def __init__(self, quit_callback=None): super(HappyMacStatusBarApp, self).__init__("", quit_button=None) self.quit_button = None self.quit_callback = quit_callback self.menu = [ ] self.loading() self.menu._menu.setDelegate_(self) self.start = time.time() self.need_menu = False utils.set_menu_open(False) utils.Timer(1.0, self.update).start() log.log("Started HappyMac %s" % version_manager.last_version())
def __init__(self, quit_callback=None): super(HappyMacStatusBarApp, self).__init__("", quit_button=None) self.quit_button = None self.quit_callback = quit_callback self.menu = [] self.loading() self.menu._menu.setDelegate_(self) self.start = time.time() self.need_menu = False self.last_menu_item = None self.last_highlight_change = time.time() utils.set_menu_open(False) utils.Timer(1.0, self.main_update).start() utils.Timer(10.0, process.cache_processes, False).start() process.cache_processes() log.log("Started HappyMac %s" % version_manager.last_version())
def menuDidClose_(self, menu): utils.set_menu_open(False) self.need_menu = False self.loading()
def menuWillOpen_(self, menu): utils.set_menu_open(True) self.need_menu = True self.create_menu()