diff --git a/AUTHORS b/AUTHORS index 5730ab5db..b83f244a5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -78,6 +78,7 @@ The following submitted code, packages or analysis, and deserve special thanks: Erik Wenzel Štěpán Henek Fidel Mato + Justin Forest Thanks to the following, who submitted detailed bug reports and excellent suggestions: diff --git a/ChangeLog b/ChangeLog index 49913ccb4..d52bbff2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,8 @@ Features to Jake Bell). + Added Feature #1099, which supports the 'color.uda.' color rule (thanks to Florian Hollerweger). + + Added feature #1147, applying patch to display duration of each activity + session (thanks to Justin Forest). + The 'projects' command now outputs abstract parents and reduces repetition by not printing parent names in front of children names. + Added framework for testing bash autocompletion. diff --git a/src/commands/CmdInfo.cpp b/src/commands/CmdInfo.cpp index 3e3a0b43a..eef6cf3eb 100644 --- a/src/commands/CmdInfo.cpp +++ b/src/commands/CmdInfo.cpp @@ -381,7 +381,8 @@ int CmdInfo::execute (std::string& output) std::string previous; std::string current; unsigned int i = 0; - long total_time = 0, last_timestamp = 0; + long total_time = 0; + long last_timestamp = 0; while (i < undo.size ()) { when = undo[i++]; diff --git a/src/es-ES.h b/src/es-ES.h index 88ed3824d..28f97552e 100644 --- a/src/es-ES.h +++ b/src/es-ES.h @@ -727,6 +727,7 @@ #define STRING_FEEDBACK_ATT_SET "{1} se establecerá como '{2}'." #define STRING_FEEDBACK_ATT_MOD "{1} se cambiará de '{2}' a '{3}'." #define STRING_FEEDBACK_ATT_DEL "{1} eliminado." +#define STRING_FEEDBACK_ATT_DEL_DUR "{1} eliminado (duración: {2})." #define STRING_FEEDBACK_ATT_WAS_SET "{1} establecido como '{2}'." #define STRING_FEEDBACK_ATT_WAS_MOD "{1} cambiado de '{2}' a '{3}'." #define STRING_FEEDBACK_ANN_ADD "Anotación de '{1}' añadida." diff --git a/src/feedback.cpp b/src/feedback.cpp index e28bcefbf..c5dff6c08 100644 --- a/src/feedback.cpp +++ b/src/feedback.cpp @@ -206,9 +206,10 @@ std::string taskInfoDifferences (const Task& before, const Task& after, const st out << format (STRING_FEEDBACK_ANN_DEL, before.get (*name)) << "\n"; } - else if (*name == "start") { + else if (*name == "start") + { out << format (STRING_FEEDBACK_ATT_DEL_DUR, ucFirst (*name), - Duration(current_timestamp - last_timestamp).formatPrecise()) + Duration(current_timestamp - last_timestamp).formatPrecise()) << "\n"; } else @@ -239,6 +240,7 @@ std::string taskInfoDifferences (const Task& before, const Task& after, const st { if (*name == "start") last_timestamp = current_timestamp; + out << format (STRING_FEEDBACK_ATT_WAS_SET, ucFirst (*name), renderAttribute (*name, after.get (*name), dateformat))