Commit 4269ef4c authored by Seblu's avatar Seblu
Browse files

new color theme

parent c06d466a
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -53,12 +53,12 @@ class Command_list(OptionCommand):
        '''Trivial listing of tag'''
        for o in objs:
            id = self.td("id", o.pop("id"))
            tags = " ".join([ "%s%s:%s%s"%(color["green"],
            tags = " ".join([ "%s%s:%s%s"%(color["reset"],
                                           t,
                                           self.tc(t),
                                           self.td(t, v))
                              for (t,v) in o.items() ])
            self.printer.out("%sid:%s%s %s%s"%(color["green"], color["lblue"], id, tags, color["reset"]))
            self.printer.out("%sid:%s%s %s%s"%(color["reset"], color["lblue"], id, tags, color["reset"]))

    def _list_align(self, objs):
        '''Listing line aligned'''
@@ -72,12 +72,12 @@ class Command_list(OptionCommand):
        # dislay each object by line
        for o in objs:
            # show id tag
            line = "%sid:%s%s"%(color["green"],
            line = "%sid:%s%s"%(color["reset"],
                                  self.tc("id"),
                                  self.td("id", o.pop("id")).ljust(idsize + 2))
            # show others tags
            for tagname in sorted(tags.keys()):
                line += "%s%s:%s%s"%(color["green"],
                line += "%s%s:%s%s"%(color["reset"],
                                      tagname,
                                      self.tc(tagname),
                                      self.td(tagname, o.get(tagname, "")).ljust(tags[tagname] + 1))
@@ -93,7 +93,7 @@ class Command_list(OptionCommand):
        # extract id size
        idsize = tags.pop("id")
        # print id title
        self.printer.out(color["green"], nl="")
        self.printer.out(color["reset"], nl="")
        self.printer.out("id".ljust(idsize+1), nl=" ")
        # print others titles
        for t,v in tags.items():
+2 −2
Original line number Diff line number Diff line
@@ -52,12 +52,12 @@ class Command_tags(OptionCommand):
        # display answer
        for o in objs:
            id = self.td("id", o.pop("id"))
            tags = " ".join([ "%s%s:%s%s"%(color["green"],
            tags = " ".join([ "%s%s:%s%s"%(color["reset"],
                                           t,
                                           self.tc(t),
                                           self.td(t, v))
                              for (t,v) in o.items() ])
            self.printer.out("%sid:%s%s %s%s"%(color["green"], color["lblue"], id, tags, color["reset"]))
            self.printer.out("%sid:%s%s %s%s"%(color["reset"], color["lblue"], id, tags, color["reset"]))


class Command_addtag(Command):
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ class TagDisplay(object):
        '''Return the current tag color'''
        if tagname in self.tagcolor and self.tagcolor[tagname] in color:
            return color[self.tagcolor[tagname]]
        return color["reset"]
        return color["yellow"]

    def resolve(self, tagname, tagvalue):
        '''Transform a tagvalue respecting custom display settings'''