Commit 899fa9b2 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Use PaletteItem for mapping the abstract colors

parent ad781585
...@@ -19,14 +19,15 @@ import urwid ...@@ -19,14 +19,15 @@ import urwid
from topydo.lib.Color import AbstractColor from topydo.lib.Color import AbstractColor
from topydo.lib.Todo import Todo from topydo.lib.Todo import Todo
from topydo.lib.TopydoString import TopydoString from topydo.lib.TopydoString import TopydoString
from topydo.ui.Utils import PaletteItem
PALETTE_LOOKUP = { PALETTE_LOOKUP = {
# omitting AbstractColor.NEUTRAL on purpose, so a text without any # omitting AbstractColor.NEUTRAL on purpose, so a text without any
# attribute will be added to the markup # attribute will be added to the markup
AbstractColor.PROJECT: 'project', AbstractColor.PROJECT: PaletteItem.PROJECT,
AbstractColor.CONTEXT: 'context', AbstractColor.CONTEXT: PaletteItem.CONTEXT,
AbstractColor.META: 'metadata', AbstractColor.META: PaletteItem.METADATA,
AbstractColor.LINK: 'link', AbstractColor.LINK: PaletteItem.LINK,
} }
def topydostringToMarkup(p_string): def topydostringToMarkup(p_string):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment