From 72dfd6b47501cdf58c8f25cf648271a6092c75b8 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Fri, 24 Apr 2009 09:59:05 +0800 Subject: [PATCH] Add Test Command for browseRef dialog Signed-off-by: Frank Li --- src/TortoiseProc/Commands/Command.cpp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/TortoiseProc/Commands/Command.cpp b/src/TortoiseProc/Commands/Command.cpp index 62d0cef..7e30f8f 100644 --- a/src/TortoiseProc/Commands/Command.cpp +++ b/src/TortoiseProc/Commands/Command.cpp @@ -178,6 +178,7 @@ typedef enum cmdSubUpdate, cmdSubSync, cmdRefLog, + cmdTest } TGitCommand; @@ -251,11 +252,22 @@ static const struct CommandInfo { cmdSubAdd, _T("subadd") }, { cmdSubUpdate, _T("subupdate") }, { cmdSubSync, _T("subsync") }, - { cmdRefLog, _T("reflog") } + { cmdRefLog, _T("reflog") }, + { cmdTest, _T("test") }, }; +class TestCommand : public Command +{ + virtual bool Execute() + { + CBrowseRefsDlg().DoModal(); + return true; + } +}; + + Command * CommandServer::GetCommand(const CString& sCmd) { @@ -275,17 +287,7 @@ Command * CommandServer::GetCommand(const CString& sCmd) // CBrowseRefsDlg dialog -#if 1 - class TestCommand : public Command - { - virtual bool Execute() - { - CBrowseRefsDlg().DoModal(); - return true; - } - }; - return new TestCommand; -#endif + switch (command) { @@ -373,6 +375,8 @@ Command * CommandServer::GetCommand(const CString& sCmd) return new SendMailCommand; case cmdCat: return new CatCommand; + case cmdTest: + return new TestCommand; #if 0 -- 2.11.0