- Added legacy warnings about use of fg: or bg:.
This commit is contained in:
Paul Beckingham 2011-08-27 14:29:08 -04:00
parent 1c98544380
commit ab931b6af2
3 changed files with 7 additions and 4 deletions

View file

@ -469,6 +469,10 @@ void Command::modify_task (
// By default, just add it.
else
task.set (name, result);
// Legacy checks.
if (name == "fg" || name == "bg")
context.footnote (format (STRING_LEGACY_FEATURE, name));
}
else
throw format (STRING_CMD_ADD_BAD_ATTRIBUTE, name);

View file

@ -372,6 +372,9 @@
#define STRING_JSON_MISSING_OPEN "Error: expected '{' or '[' at position {1}"
#define STRING_JSON_EXTRA_CHARACTERS "Error: extra characters found at position {1}"
// Legacy
#define STRING_LEGACY_FEATURE "Note: the '{1}' feature is deprecated."
// Lua
#define STRING_LUA_BAD_HOOK_DEF "Malformed hook definition '{1}'."
#define STRING_LUA_BAD_EVENT "Unrecognized hook event '{1}'."
@ -428,7 +431,6 @@
#define STRING_TASK_VALID_WAIT_RECUR "You cannot create a task that is both waiting and recurring."
#define STRING_TASK_VALID_PRIORITY "Priority values may be 'H', 'M' or 'L', not '{1}'."
// Taskmod
#define STRING_TASKMOD_BAD_INIT "Taskmod::getUuid(): Task object not initialized."
#define STRING_TASKMOD_TIME "time "

View file

@ -497,11 +497,9 @@ const std::string encode (const std::string& value)
{
std::string modified = value;
str_replace (modified, "\t", "&tab;");
str_replace (modified, "\"", "&dquot;");
str_replace (modified, "[", "&open;");
str_replace (modified, "]", "&close;");
str_replace (modified, "\\", "\\\\");
return modified;
}
@ -520,7 +518,6 @@ const std::string decode (const std::string& value)
std::string modified = value;
// Supported encodings.
str_replace (modified, "&tab;", "\t");
str_replace (modified, "&dquot;", "\"");
str_replace (modified, """, "'");
str_replace (modified, "&open;", "[");