diff --git a/src/helpers.cpp b/src/helpers.cpp index 9657a6d6f..8c0d281c1 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -222,139 +222,3 @@ static void countTasks ( } //////////////////////////////////////////////////////////////////////////////// -int deltaAppend (Task& task) -{ -/* - if (context.task.has ("description")) - { - task.set ("description", - task.get ("description") + " " + context.task.get ("description")); - return 1; - } -*/ - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -int deltaPrepend (Task& task) -{ -/* - if (context.task.has ("description")) - { - task.set ("description", - context.task.get ("description") + " " + task.get ("description")); - return 1; - } -*/ - - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -int deltaDescription (Task& task) -{ -/* - if (context.task.has ("description")) - { - task.set ("description", context.task.get ("description")); - return 1; - } -*/ - - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -int deltaTags (Task& task) -{ - int changes = 0; - -/* - // Apply or remove tags, if any. - std::vector tags; - context.task.getTags (tags); - std::vector ::iterator tag; - for (tag = tags.begin (); tag != tags.end (); ++tag) - { - task.addTag (*tag); - ++changes; - } - - for (tag = context.tagRemovals.begin (); tag != context.tagRemovals.end (); ++tag) - { - task.removeTag (*tag); - ++changes; - } -*/ - - return changes; -} - -//////////////////////////////////////////////////////////////////////////////// -int deltaAttributes (Task& task) -{ - int changes = 0; - -/* - std::map ::iterator att; - for (att = context.task.begin (); att != context.task.end (); ++att) - { - if (att->second.name () != "uuid" && - att->second.name () != "description" && - att->second.name () != "tags") - { - // Some things don't propagate to the parent task. - if (att->second.name () == "wait" && - task.getStatus () == Task::recurring) - { - // NOP - } - - // Modifying "wait" changes status, but not for recurring parent tasks. - else if (att->second.name () == "wait") - { - if (att->second.value () == "") - { - task.remove (att->first); - task.setStatus (Task::pending); - } - else - { - task.set (att->first, att->second.value ()); - task.setStatus (Task::waiting); - } - } - - // Modifying dependencies requires adding/removing uuids. - else if (att->second.name () == "depends") - { - std::vector deps; - split (deps, att->second.value (), ','); - - std::vector ::iterator i; - for (i = deps.begin (); i != deps.end (); i++) - { - int id = atoi (i->c_str ()); - if (id < 0) - task.removeDependency (-id); - else - task.addDependency (id); - } - } - - // Now the generalized handling. - else if (att->second.value () == "") - task.remove (att->second.name ()); - else - // One of the few places where the compound attribute name is used. - task.set (att->first, att->second.value ()); - - ++changes; - } - } -*/ - - return changes; -} - -//////////////////////////////////////////////////////////////////////////////// diff --git a/src/main.h b/src/main.h index 52d96b3c3..cdcfaaf29 100644 --- a/src/main.h +++ b/src/main.h @@ -50,11 +50,6 @@ std::string getFullDescription (Task&, const std::string&); std::string getDueDate (Task&, const std::string&); std::string onProjectChange (Task&, bool scope = true); std::string onProjectChange (Task&, Task&); -int deltaAppend (Task&); -int deltaPrepend (Task&); -int deltaDescription (Task&); -int deltaTags (Task&); -int deltaAttributes (Task&); // rules.cpp void initializeColorRules ();