105 not self.__extensionMenus[extensionName][key].isEnabled() |
105 not self.__extensionMenus[extensionName][key].isEnabled() |
106 and self.__extensionMenus[extensionName][key].isTearOffMenuVisible() |
106 and self.__extensionMenus[extensionName][key].isTearOffMenuVisible() |
107 ): |
107 ): |
108 self.__extensionMenus[extensionName][key].hideTearOffMenu() |
108 self.__extensionMenus[extensionName][key].hideTearOffMenu() |
109 |
109 |
110 def showContextMenu(self, menu, standardItems): # noqa: U100 |
110 def showContextMenu(self, _menu, standardItems): |
111 """ |
111 """ |
112 Public slot called before the context menu is shown. |
112 Public slot called before the context menu is shown. |
113 |
113 |
114 It enables/disables the VCS menu entries depending on the overall |
114 It enables/disables the VCS menu entries depending on the overall |
115 VCS status and the file status. |
115 VCS status and the file status. |
116 |
116 |
117 @param menu reference to the menu to be shown |
117 @param _menu reference to the menu to be shown (unused) |
118 @type QMenu |
118 @type QMenu |
119 @param standardItems array of standard items that need |
119 @param standardItems array of standard items that need |
120 activation/deactivation depending on the overall VCS status |
120 activation/deactivation depending on the overall VCS status |
121 @type list of QAction |
121 @type list of QAction |
122 """ |
122 """ |
141 act.setEnabled(True) |
141 act.setEnabled(True) |
142 for act in standardItems: |
142 for act in standardItems: |
143 act.setEnabled(True) |
143 act.setEnabled(True) |
144 self.__showExtensionMenu("mainMenu", controlled) |
144 self.__showExtensionMenu("mainMenu", controlled) |
145 |
145 |
146 def showContextMenuMulti(self, menu, standardItems): # noqa: U100 |
146 def showContextMenuMulti(self, _menu, standardItems): |
147 """ |
147 """ |
148 Public slot called before the context menu (multiple selections) is |
148 Public slot called before the context menu (multiple selections) is |
149 shown. |
149 shown. |
150 |
150 |
151 It enables/disables the VCS menu entries depending on the overall |
151 It enables/disables the VCS menu entries depending on the overall |
152 VCS status and the files status. |
152 VCS status and the files status. |
153 |
153 |
154 @param menu reference to the menu to be shown |
154 @param _menu reference to the menu to be shown (unused) |
155 @type QMenu |
155 @type QMenu |
156 @param standardItems array of standard items that need |
156 @param standardItems array of standard items that need |
157 activation/deactivation depending on the overall VCS status |
157 activation/deactivation depending on the overall VCS status |
158 @type list of QAction |
158 @type list of QAction |
159 """ |
159 """ |
185 act.setEnabled(True) |
185 act.setEnabled(True) |
186 for act in standardItems: |
186 for act in standardItems: |
187 act.setEnabled(True) |
187 act.setEnabled(True) |
188 self.__showExtensionMenu("multiMenu", controlled) |
188 self.__showExtensionMenu("multiMenu", controlled) |
189 |
189 |
190 def showContextMenuDir(self, menu, standardItems): # noqa: U100 |
190 def showContextMenuDir(self, _menu, standardItems): |
191 """ |
191 """ |
192 Public slot called before the context menu is shown. |
192 Public slot called before the context menu is shown. |
193 |
193 |
194 It enables/disables the VCS menu entries depending on the overall |
194 It enables/disables the VCS menu entries depending on the overall |
195 VCS status and the directory status. |
195 VCS status and the directory status. |
196 |
196 |
197 @param menu reference to the menu to be shown |
197 @param _menu reference to the menu to be shown (unused) |
198 @type QMenu |
198 @type QMenu |
199 @param standardItems array of standard items that need |
199 @param standardItems array of standard items that need |
200 activation/deactivation depending on the overall VCS status |
200 activation/deactivation depending on the overall VCS status |
201 @type list of QAction |
201 @type list of QAction |
202 """ |
202 """ |
216 act.setEnabled(True) |
216 act.setEnabled(True) |
217 for act in standardItems: |
217 for act in standardItems: |
218 act.setEnabled(True) |
218 act.setEnabled(True) |
219 self.__showExtensionMenu("dirMenu", controlled) |
219 self.__showExtensionMenu("dirMenu", controlled) |
220 |
220 |
221 def showContextMenuDirMulti(self, menu, standardItems): # noqa: U100 |
221 def showContextMenuDirMulti(self, _menu, standardItems): |
222 """ |
222 """ |
223 Public slot called before the context menu is shown. |
223 Public slot called before the context menu is shown. |
224 |
224 |
225 It enables/disables the VCS menu entries depending on the overall |
225 It enables/disables the VCS menu entries depending on the overall |
226 VCS status and the directory status. |
226 VCS status and the directory status. |
227 |
227 |
228 @param menu reference to the menu to be shown |
228 @param _menu reference to the menu to be shown (unused) |
229 @type QMenu |
229 @type QMenu |
230 @param standardItems list of standard items that need |
230 @param standardItems list of standard items that need |
231 activation/deactivation depending on the overall VCS status |
231 activation/deactivation depending on the overall VCS status |
232 @type list of QAction |
232 @type list of QAction |
233 """ |
233 """ |