OSDN Git Service

Add Test Command for browseRef dialog
authorFrank Li <lznuaa@gmail.com>
Fri, 24 Apr 2009 01:59:05 +0000 (09:59 +0800)
committerFrank Li <lznuaa@gmail.com>
Fri, 24 Apr 2009 01:59:05 +0000 (09:59 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/Commands/Command.cpp

index 62d0cef..7e30f8f 100644 (file)
@@ -178,6 +178,7 @@ typedef enum
        cmdSubUpdate,\r
        cmdSubSync,\r
        cmdRefLog,\r
+       cmdTest\r
        \r
 } TGitCommand;\r
 \r
@@ -251,11 +252,22 @@ static const struct CommandInfo
        {       cmdSubAdd,                      _T("subadd")                    },\r
        {       cmdSubUpdate,           _T("subupdate")                 },\r
        {       cmdSubSync,                     _T("subsync")                   },\r
-       {       cmdRefLog,                      _T("reflog")                    }\r
+       {       cmdRefLog,                      _T("reflog")                    },\r
+       {       cmdTest,                        _T("test")                              },\r
 };\r
 \r
 \r
 \r
+class TestCommand : public Command\r
+{\r
+       virtual bool Execute()\r
+       {\r
+               CBrowseRefsDlg().DoModal();\r
+               return true;\r
+       }\r
+};\r
+       \r
+\r
 \r
 Command * CommandServer::GetCommand(const CString& sCmd)\r
 {\r
@@ -275,17 +287,7 @@ Command * CommandServer::GetCommand(const CString& sCmd)
 \r
                \r
        // CBrowseRefsDlg dialog\r
-#if 1\r
-       class TestCommand : public Command\r
-       {\r
-               virtual bool Execute()\r
-               {\r
-                       CBrowseRefsDlg().DoModal();\r
-                       return true;\r
-               }\r
-       };\r
-       return new TestCommand;\r
-#endif\r
+\r
 \r
        switch (command)\r
        {\r
@@ -373,6 +375,8 @@ Command * CommandServer::GetCommand(const CString& sCmd)
                return new SendMailCommand;\r
        case cmdCat:\r
                return new CatCommand;\r
+       case cmdTest:\r
+               return new TestCommand;\r
 #if 0\r
 \r
        \r