def focuschanged(self, event): if self.hasfocus(): sbar = [("PyTone %s" % version.version, config.colors.statusbar.key)] sbar += statusbar.separator sbar += [(version.copyright, config.colors.statusbar.description)] sbar += statusbar.terminate hub.notify(events.statusbar_update(0, sbar))
def __init__(self, screen, maxh, maxw, channel): messagewin.messagewin.__init__(self, screen, maxh, maxw, channel, config.colors.helpwindow, _("PyTone Help"), [], config.helpwindow.autoclosetime) sbar = statusbar.generatedescription("general", "showhelp") hub.notify(events.statusbar_update(2, sbar))
def focuschanged(self, event): if self.hasfocus(): sbar = statusbar.generatedescription("general", "volumedown") sbar += statusbar.separator sbar += statusbar.generatedescription("general", "volumeup") sbar += statusbar.terminate hub.notify(events.statusbar_update(0, sbar))
def updatestatusbar(self): sbar = [] if self.playlist.selected is not None: sbar += statusbar.generatedescription("playlistwindow", "deleteitem") sbar += statusbar.separator sbar += statusbar.generatedescription("playlistwindow", "moveitemup") sbar += statusbar.separator sbar += statusbar.generatedescription("playlistwindow", "moveitemdown") sbar += statusbar.separator sbar += statusbar.generatedescription("playlistwindow", "activatefilelist") hub.notify(events.statusbar_update(0, sbar))
def requestinput(self, event): inputwin.requestinput(self, event) if self.inputprompt: self.inputprompt = self.inputprompt + " " sbar = [] sbar += [("Enter", config.colors.statusbar.key), (": " + _("ok"), config.colors.statusbar.description)] sbar += statusbar.separator sbar += [("ESC", config.colors.statusbar.key), (": " + _("cancel"), config.colors.statusbar.description)] sbar += statusbar.terminate hub.notify(events.statusbar_update(0, sbar)) self.update()
def requestinput(self, event): inputwin.requestinput(self, event) if self.inputprompt: self.inputprompt = self.inputprompt + " " sbar = [] sbar += [("Enter", config.colors.statusbar.key), (": "+_("ok"), config.colors.statusbar.description)] sbar += statusbar.separator sbar += [("ESC", config.colors.statusbar.key), (": "+_("cancel"), config.colors.statusbar.description)] sbar += statusbar.terminate hub.notify(events.statusbar_update(0, sbar)) self.update()
def updatestatusbar(self): sbar = [] if len(self.items.shistory)>0: sbar += statusbar.generatedescription("filelistwindow", "dirup") sbar += statusbar.separator if self.items.isdirselected(): sbar += statusbar.generatedescription("filelistwindow", "dirdown") sbar += statusbar.separator sbar += statusbar.generatedescription("filelistwindow", "adddirtoplaylist") sbar += statusbar.separator elif self.items.issongselected(): sbar += statusbar.generatedescription("filelistwindow", "addsongtoplaylist") sbar += statusbar.separator sbar += statusbar.generatedescription("filelistwindow", "activateplaylist") hub.notify(events.statusbar_update(0, sbar))
def updatestatusbar(self): if self.song and not self.paused and self.keybindings["playerpause"]: sbar = statusbar.generatedescription("general", "playerpause") else: sbar = statusbar.generatedescription("general", "playerstart") hub.notify(events.statusbar_update(1, sbar))