Exemplo n.º 1
0
 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))
Exemplo n.º 2
0
    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))
Exemplo n.º 3
0
 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))
Exemplo n.º 4
0
    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))
Exemplo n.º 5
0
    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))
Exemplo n.º 6
0
    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))
Exemplo n.º 7
0
    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))
Exemplo n.º 8
0
    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()
Exemplo n.º 9
0
    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()
Exemplo n.º 10
0
    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))
Exemplo n.º 11
0
    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))
Exemplo n.º 12
0
    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))
Exemplo n.º 13
0
 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))
Exemplo n.º 14
0
 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))