- Applied patch from Johannes to add missing hooks.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
This commit is contained in:
Johannes Schlatow 2010-08-04 14:39:17 -04:00 committed by Paul Beckingham
parent c640e05049
commit aa891401e4
2 changed files with 6 additions and 0 deletions

View file

@ -74,6 +74,7 @@ Hook& Hook::operator= (const Hook& other)
Hooks::Hooks ()
{
validProgramEvents.push_back ("post-start");
validProgramEvents.push_back ("post-commit");
validProgramEvents.push_back ("pre-fatal-error");
validProgramEvents.push_back ("pre-exit");
validProgramEvents.push_back ("pre-command-line");
@ -158,6 +159,8 @@ Hooks::Hooks ()
validProgramEvents.push_back ("post-import-command");
validProgramEvents.push_back ("pre-info-command");
validProgramEvents.push_back ("post-info-command");
validProgramEvents.push_back ("pre-modify-command");
validProgramEvents.push_back ("post-modify-command");
validProgramEvents.push_back ("pre-prepend-command");
validProgramEvents.push_back ("post-prepend-command");
validProgramEvents.push_back ("pre-projects-command");

View file

@ -1421,6 +1421,8 @@ int handleDone (std::string &outs)
////////////////////////////////////////////////////////////////////////////////
int handleModify (std::string &outs)
{
context.hooks.trigger ("pre-modify-command");
int count = 0;
std::stringstream out;
@ -1526,6 +1528,7 @@ int handleModify (std::string &outs)
out << "Modified " << count << " task" << (count == 1 ? "." : "s.") << std::endl;
outs = out.str ();
context.hooks.trigger ("post-modify-command");
return 0;
}