52 isTranslationsBrowser, |
52 isTranslationsBrowser, |
53 parent, |
53 parent, |
54 name, |
54 name, |
55 ) |
55 ) |
56 |
56 |
57 def showContextMenu(self, menu, standardItems): |
57 def showContextMenu(self, menu, standardItems): # noqa: U100 |
58 """ |
58 """ |
59 Public slot called before the context menu is shown. |
59 Public slot called before the context menu is shown. |
60 |
60 |
61 It enables/disables the VCS menu entries depending on the overall |
61 It enables/disables the VCS menu entries depending on the overall |
62 VCS status and the file status. |
62 VCS status and the file status. |
87 if not os.path.isdir(name): |
87 if not os.path.isdir(name): |
88 self.vcsMenuAddTree.setEnabled(False) |
88 self.vcsMenuAddTree.setEnabled(False) |
89 for act in standardItems: |
89 for act in standardItems: |
90 act.setEnabled(True) |
90 act.setEnabled(True) |
91 |
91 |
92 def showContextMenuMulti(self, menu, standardItems): |
92 def showContextMenuMulti(self, menu, standardItems): # noqa: U100 |
93 """ |
93 """ |
94 Public slot called before the context menu (multiple selections) is |
94 Public slot called before the context menu (multiple selections) is |
95 shown. |
95 shown. |
96 |
96 |
97 It enables/disables the VCS menu entries depending on the overall |
97 It enables/disables the VCS menu entries depending on the overall |
128 if 1 in self.browser.specialMenuEntries and self.__itemsHaveFiles(items): |
128 if 1 in self.browser.specialMenuEntries and self.__itemsHaveFiles(items): |
129 self.vcsMultiMenuAddTree.setEnabled(False) |
129 self.vcsMultiMenuAddTree.setEnabled(False) |
130 for act in standardItems: |
130 for act in standardItems: |
131 act.setEnabled(True) |
131 act.setEnabled(True) |
132 |
132 |
133 def showContextMenuDir(self, menu, standardItems): |
133 def showContextMenuDir(self, menu, standardItems): # noqa: U100 |
134 """ |
134 """ |
135 Public slot called before the context menu is shown. |
135 Public slot called before the context menu is shown. |
136 |
136 |
137 It enables/disables the VCS menu entries depending on the overall |
137 It enables/disables the VCS menu entries depending on the overall |
138 VCS status and the directory status. |
138 VCS status and the directory status. |
154 for act in self.vcsAddDirMenuActions: |
154 for act in self.vcsAddDirMenuActions: |
155 act.setEnabled(True) |
155 act.setEnabled(True) |
156 for act in standardItems: |
156 for act in standardItems: |
157 act.setEnabled(True) |
157 act.setEnabled(True) |
158 |
158 |
159 def showContextMenuDirMulti(self, menu, standardItems): |
159 def showContextMenuDirMulti(self, menu, standardItems): # noqa: U100 |
160 """ |
160 """ |
161 Public slot called before the context menu is shown. |
161 Public slot called before the context menu is shown. |
162 |
162 |
163 It enables/disables the VCS menu entries depending on the overall |
163 It enables/disables the VCS menu entries depending on the overall |
164 VCS status and the directory status. |
164 VCS status and the directory status. |