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

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

eric ide

mercurial