From eeefc8a99227ccba81bc88f749baa789ea15dd99 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 18 Jan 2010 00:53:01 -0500 Subject: [PATCH] Color - Removed coloring of only the due date, which is operating outside of the colorization rules. - Removed commented out code. --- src/Context.cpp | 2 -- src/custom.cpp | 30 ++---------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index aaca35086..3846593b2 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -363,8 +363,6 @@ void Context::loadCorrectConfigFile () "Could not read home directory from the passwd file.")); std::string home = pw->pw_dir; -// std::string rc = home + "/.taskrc"; -// std::string data = home + "/.task"; File rc (home + "/.taskrc"); Directory data (home + "./task"); diff --git a/src/custom.cpp b/src/custom.cpp index 1de5b6149..eda344272 100644 --- a/src/custom.cpp +++ b/src/custom.cpp @@ -583,39 +583,13 @@ int runCustomReport ( } // Now auto colorize all rows. - std::string due; - Color color_due (context.config.get ("color.due")); - Color color_overdue (context.config.get ("color.overdue")); - - bool imminent; - bool overdue; - for (unsigned int row = 0; row < tasks.size (); ++row) + if (context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor")) { - imminent = false; - overdue = false; - due = tasks[row].get ("due"); - if (due.length ()) - { - switch (getDueState (due)) - { - case 2: overdue = true; break; - case 1: imminent = true; break; - case 0: - default: break; - } - } - - if (context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor")) + for (unsigned int row = 0; row < tasks.size (); ++row) { Color c (tasks[row].get ("fg") + " " + tasks[row].get ("bg")); autoColorize (tasks[row], c); table.setRowColor (row, c); - - if (dueColumn != -1) - { - c.blend (overdue ? color_overdue : color_due); - table.setCellColor (row, columnCount, c); - } } }