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

branch
eric7
changeset 10683
779cda568acb
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
equal deleted inserted replaced
10682:47be220abdaf 10683:779cda568acb
57 isTranslationsBrowser, 57 isTranslationsBrowser,
58 parent, 58 parent,
59 name, 59 name,
60 ) 60 )
61 61
62 def showContextMenu(self, menu, standardItems): # noqa: U100 62 def showContextMenu(self, _menu, standardItems):
63 """ 63 """
64 Public slot called before the context menu is shown. 64 Public slot called before the context menu is shown.
65 65
66 It enables/disables the VCS menu entries depending on the overall 66 It enables/disables the VCS menu entries depending on the overall
67 VCS status and the file status. 67 VCS status and the file status.
68 68
69 @param menu reference to the menu to be shown 69 @param _menu reference to the menu to be shown (unused)
70 @type QMenu 70 @type QMenu
71 @param standardItems array of standard items that need 71 @param standardItems array of standard items that need
72 activation/deactivation depending on the overall VCS status 72 activation/deactivation depending on the overall VCS status
73 @type list of QAction 73 @type list of QAction
74 """ 74 """
83 for act in self.vcsMenuActions: 83 for act in self.vcsMenuActions:
84 act.setEnabled(False) 84 act.setEnabled(False)
85 for act in standardItems: 85 for act in standardItems:
86 act.setEnabled(True) 86 act.setEnabled(True)
87 87
88 def showContextMenuMulti(self, menu, standardItems): # noqa: U100 88 def showContextMenuMulti(self, _menu, standardItems):
89 """ 89 """
90 Public slot called before the context menu (multiple selections) is 90 Public slot called before the context menu (multiple selections) is
91 shown. 91 shown.
92 92
93 It enables/disables the VCS menu entries depending on the overall 93 It enables/disables the VCS menu entries depending on the overall
94 VCS status and the files status. 94 VCS status and the files status.
95 95
96 @param menu reference to the menu to be shown 96 @param _menu reference to the menu to be shown (unused)
97 @type QMenu 97 @type QMenu
98 @param standardItems array of standard items that need 98 @param standardItems array of standard items that need
99 activation/deactivation depending on the overall VCS status 99 activation/deactivation depending on the overall VCS status
100 @type list of QAction 100 @type list of QAction
101 """ 101 """
120 for act in self.vcsMultiMenuActions: 120 for act in self.vcsMultiMenuActions:
121 act.setEnabled(False) 121 act.setEnabled(False)
122 for act in standardItems: 122 for act in standardItems:
123 act.setEnabled(True) 123 act.setEnabled(True)
124 124
125 def showContextMenuDir(self, menu, standardItems): # noqa: U100 125 def showContextMenuDir(self, _menu, standardItems):
126 """ 126 """
127 Public slot called before the context menu is shown. 127 Public slot called before the context menu is shown.
128 128
129 It enables/disables the VCS menu entries depending on the overall 129 It enables/disables the VCS menu entries depending on the overall
130 VCS status and the directory status. 130 VCS status and the directory status.
131 131
132 @param menu reference to the menu to be shown 132 @param _menu reference to the menu to be shown (unused)
133 @type QMenu 133 @type QMenu
134 @param standardItems array of standard items that need 134 @param standardItems array of standard items that need
135 activation/deactivation depending on the overall VCS status 135 activation/deactivation depending on the overall VCS status
136 @type list of QAction 136 @type list of QAction
137 """ 137 """
144 for act in self.vcsDirMenuActions: 144 for act in self.vcsDirMenuActions:
145 act.setEnabled(False) 145 act.setEnabled(False)
146 for act in standardItems: 146 for act in standardItems:
147 act.setEnabled(True) 147 act.setEnabled(True)
148 148
149 def showContextMenuDirMulti(self, menu, standardItems): # noqa: U100 149 def showContextMenuDirMulti(self, _menu, standardItems):
150 """ 150 """
151 Public slot called before the context menu is shown. 151 Public slot called before the context menu is shown.
152 152
153 It enables/disables the VCS menu entries depending on the overall 153 It enables/disables the VCS menu entries depending on the overall
154 VCS status and the directory status. 154 VCS status and the directory status.
155 155
156 @param menu reference to the menu to be shown 156 @param _menu reference to the menu to be shown (unused)
157 @type QMenu 157 @type QMenu
158 @param standardItems array of standard items that need 158 @param standardItems array of standard items that need
159 activation/deactivation depending on the overall VCS status 159 activation/deactivation depending on the overall VCS status
160 @type list of QAction 160 @type list of QAction
161 """ 161 """

eric ide

mercurial