OSDN Git Service

Add Rebase menu to explore contextmenu.
authorFrank Li <lznuaa@gmail.com>
Thu, 19 Feb 2009 15:09:50 +0000 (23:09 +0800)
committerFrank Li <lznuaa@gmail.com>
Thu, 19 Feb 2009 15:09:50 +0000 (23:09 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseShell/ContextMenu.cpp
src/TortoiseShell/Globals.h
src/TortoiseShell/ShellExt.h
src/TortoiseShell/resource.h
src/TortoiseShell/resourceshell.rc

index 7bd9c4a..d6adae9 100644 (file)
@@ -73,6 +73,9 @@ CShellExt::MenuInfo CShellExt::menuInfo[] =
        { ShellMenuShowChanged,                                 MENUSHOWCHANGED,        IDI_SHOWCHANGED,                IDS_MENUSHOWCHANGED,            IDS_MENUDESCSHOWCHANGED,\r
        ITEMIS_INSVN|ITEMIS_ONLYONE, 0, ITEMIS_FOLDER|ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0},\r
 \r
+       { ShellMenuRebase,                                          MENUREBASE,                 IDI_SHOWCHANGED,                IDS_MENUREBASE,                         IDS_MENUREBASE,\r
+       ITEMIS_INSVN|ITEMIS_ONLYONE, 0, ITEMIS_FOLDER|ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, 0, 0, 0, 0, 0},\r
+\r
 //     { ShellMenuRevisionGraph,                               MENUREVISIONGRAPH,      IDI_REVISIONGRAPH,              IDS_MENUREVISIONGRAPH,          IDS_MENUDESCREVISIONGRAPH,\r
 //     ITEMIS_INSVN|ITEMIS_ONLYONE, ITEMIS_ADDED, ITEMIS_FOLDER|ITEMIS_FOLDERINSVN|ITEMIS_ONLYONE, ITEMIS_ADDED, 0, 0, 0, 0},\r
 \r
@@ -1615,6 +1618,14 @@ STDMETHODIMP CShellExt::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi)
                                        svnCmd += folder_;\r
                                svnCmd += _T("\"");\r
                                break;\r
+                       case ShellMenuRebase:\r
+                               svnCmd += _T("rebase /path:\"");\r
+                               if (files_.size() > 0)\r
+                                       svnCmd += files_.front();\r
+                               else\r
+                                       svnCmd += folder_;\r
+                               svnCmd += _T("\"");\r
+                               break;\r
                        case ShellMenuShowChanged:\r
                                if (files_.size() > 1)\r
                 {\r
index 834c4fe..36efbf6 100644 (file)
@@ -61,6 +61,7 @@
 #define MENUIMPORTPATCH                0x0000010000000000\r
 #define MENUCHERRYPICK         0x0000020000000000\r
 #define MENUFETCH                      0x0000040000000000\r
+#define MENUREBASE                     0x0000080000000000\r
 \r
 \r
 #define MENUSETTINGS           0x2000000000000000\r
index e87abfb..928ede3 100644 (file)
@@ -156,6 +156,7 @@ protected:
                ShellMenuImportPatch,\r
                ShellMenuCherryPick,\r
                ShellMenuFetch,\r
+               ShellMenuRebase,\r
                ShellMenuLastEntry                      // used to mark the menu array end\r
        };\r
 \r
index c42a1dc..17913f5 100644 (file)
 #define IDS_MENUIMPORTPATCH                            309\r
 #define IDS_MENUCHERRYPICK                             310\r
 #define IDS_MENUFETCH                                  311\r
+#define IDS_MENUREBASE                                 312\r
 #define IDC_REVISION                    1001\r
 #define IDC_LOCKED                      1002\r
 #define IDC_REPOURL                     1003\r
index d96b7ad..fe58498 100644 (file)
@@ -254,7 +254,8 @@ BEGIN
        IDS_MENUFORMATPATCH             "Create Patch Serial"\r
        IDS_MENUIMPORTPATCH             "Apply Patch Serial"\r
        IDS_MENUCHERRYPICK              "Cherry Pick"\r
-       IDS_MENUFETCH                   "Fetch"\r
+       IDS_MENUFETCH                   "Fetch..."\r
+       IDS_MENUREBASE                  "Rebase..."\r
 END\r
 \r
 STRINGTABLE \r