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

branch
eric7
changeset 10683
779cda568acb
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
equal deleted inserted replaced
10682:47be220abdaf 10683:779cda568acb
58 isTranslationsBrowser, 58 isTranslationsBrowser,
59 parent, 59 parent,
60 name, 60 name,
61 ) 61 )
62 62
63 def showContextMenu(self, menu, standardItems): # noqa: U100 63 def showContextMenu(self, _menu, standardItems):
64 """ 64 """
65 Public slot called before the context menu is shown. 65 Public slot called before the context menu is shown.
66 66
67 It enables/disables the VCS menu entries depending on the overall 67 It enables/disables the VCS menu entries depending on the overall
68 VCS status and the file status. 68 VCS status and the file status.
69 69
70 @param menu reference to the menu to be shown 70 @param _menu reference to the menu to be shown (unused)
71 @type QMenu 71 @type QMenu
72 @param standardItems array of standard items that need 72 @param standardItems array of standard items that need
73 activation/deactivation depending on the overall VCS status 73 activation/deactivation depending on the overall VCS status
74 @type list of QAction 74 @type list of QAction
75 """ 75 """
95 if not os.path.isdir(name): 95 if not os.path.isdir(name):
96 self.vcsMenuAddTree.setEnabled(False) 96 self.vcsMenuAddTree.setEnabled(False)
97 for act in standardItems: 97 for act in standardItems:
98 act.setEnabled(True) 98 act.setEnabled(True)
99 99
100 def showContextMenuMulti(self, menu, standardItems): # noqa: U100 100 def showContextMenuMulti(self, _menu, standardItems):
101 """ 101 """
102 Public slot called before the context menu (multiple selections) is 102 Public slot called before the context menu (multiple selections) is
103 shown. 103 shown.
104 104
105 It enables/disables the VCS menu entries depending on the overall 105 It enables/disables the VCS menu entries depending on the overall
106 VCS status and the files status. 106 VCS status and the files status.
107 107
108 @param menu reference to the menu to be shown 108 @param _menu reference to the menu to be shown (unused)
109 @type QMenu 109 @type QMenu
110 @param standardItems array of standard items that need 110 @param standardItems array of standard items that need
111 activation/deactivation depending on the overall VCS status 111 activation/deactivation depending on the overall VCS status
112 @type list of QAction 112 @type list of QAction
113 """ 113 """
138 if 1 in self.browser.specialMenuEntries and self.__itemsHaveFiles(items): 138 if 1 in self.browser.specialMenuEntries and self.__itemsHaveFiles(items):
139 self.vcsMultiMenuAddTree.setEnabled(False) 139 self.vcsMultiMenuAddTree.setEnabled(False)
140 for act in standardItems: 140 for act in standardItems:
141 act.setEnabled(True) 141 act.setEnabled(True)
142 142
143 def showContextMenuDir(self, menu, standardItems): # noqa: U100 143 def showContextMenuDir(self, _menu, standardItems):
144 """ 144 """
145 Public slot called before the context menu is shown. 145 Public slot called before the context menu is shown.
146 146
147 It enables/disables the VCS menu entries depending on the overall 147 It enables/disables the VCS menu entries depending on the overall
148 VCS status and the directory status. 148 VCS status and the directory status.
149 149
150 @param menu reference to the menu to be shown 150 @param _menu reference to the menu to be shown (unused)
151 @type QMenu 151 @type QMenu
152 @param standardItems array of standard items that need 152 @param standardItems array of standard items that need
153 activation/deactivation depending on the overall VCS status 153 activation/deactivation depending on the overall VCS status
154 @type list of QAction 154 @type list of QAction
155 """ 155 """
166 for act in self.vcsAddDirMenuActions: 166 for act in self.vcsAddDirMenuActions:
167 act.setEnabled(True) 167 act.setEnabled(True)
168 for act in standardItems: 168 for act in standardItems:
169 act.setEnabled(True) 169 act.setEnabled(True)
170 170
171 def showContextMenuDirMulti(self, menu, standardItems): # noqa: U100 171 def showContextMenuDirMulti(self, _menu, standardItems):
172 """ 172 """
173 Public slot called before the context menu is shown. 173 Public slot called before the context menu is shown.
174 174
175 It enables/disables the VCS menu entries depending on the overall 175 It enables/disables the VCS menu entries depending on the overall
176 VCS status and the directory status. 176 VCS status and the directory status.
177 177
178 @param menu reference to the menu to be shown 178 @param _menu reference to the menu to be shown (unused)
179 @type QMenu 179 @type QMenu
180 @param standardItems array of standard items that need 180 @param standardItems array of standard items that need
181 activation/deactivation depending on the overall VCS status 181 activation/deactivation depending on the overall VCS status
182 @type list of QAction 182 @type list of QAction
183 """ 183 """

eric ide

mercurial