src/eric7/Plugins/VcsPlugins/vcsGit/ProjectHelper.py

branch
eric7
changeset 9620
9563c83ce83d
parent 9576
be9f8e7e42e0
child 9653
e67609152c5e
--- a/src/eric7/Plugins/VcsPlugins/vcsGit/ProjectHelper.py	Wed Dec 14 15:52:39 2022 +0100
+++ b/src/eric7/Plugins/VcsPlugins/vcsGit/ProjectHelper.py	Thu Dec 15 17:15:09 2022 +0100
@@ -1722,6 +1722,28 @@
         self.gitSubmodulesSummaryAct.triggered.connect(self.__gitSubmodulesSummary)
         self.actions.append(self.gitSubmodulesSummaryAct)
 
+        self.gitWorktreeManagementAct = EricAction(
+            self.tr("Show Worktree Management"),
+            EricPixmapCache.getIcon("viewListTree"),
+            self.tr("Show Worktree Management"),
+            0,
+            0,
+            self,
+            "git_worktree_management",
+        )
+        self.gitWorktreeManagementAct.setStatusTip(
+            self.tr("Show a dialog to manage the worktree containing the project")
+        )
+        self.gitWorktreeManagementAct.setWhatsThis(
+            self.tr(
+                """<b>Show Worktree Management</b>"""
+                """<p>This shows a dialog to manage the worktree containing the"""
+                """ current project.</p>"""
+            )
+        )
+        self.gitWorktreeManagementAct.triggered.connect(self.__gitWorktreeManagement)
+        self.actions.append(self.gitWorktreeManagementAct)
+
     def initMenu(self, menu):
         """
         Public method to generate the VCS menu.
@@ -1915,6 +1937,7 @@
         menu.addSeparator()
         menu.addAction(self.vcsCommandAct)
         menu.addSeparator()
+        menu.addAction(self.gitWorktreeManagementAct)
         menu.addMenu(adminMenu)
         menu.addSeparator()
         menu.addAction(self.gitEditUserConfigAct)
@@ -2792,3 +2815,9 @@
         Private slot to show summary information for submodules of the project.
         """
         self.vcs.gitSubmoduleSummary(self.project.getProjectPath())
+
+    def __gitWorktreeManagement(self):
+        """
+        Private slot to show the worktree management dialog.
+        """
+        self.vcs.gitWorktreeManagement(self.project.getProjectPath())

eric ide

mercurial