169 |
169 |
170 def initMenu(self, mainMenu): |
170 def initMenu(self, mainMenu): |
171 """ |
171 """ |
172 Public method to generate the extension menu. |
172 Public method to generate the extension menu. |
173 |
173 |
174 @param mainMenu reference to the main menu (QMenu) |
174 @param mainMenu reference to the main menu |
175 @return populated menu (QMenu) |
175 @type QMenu |
|
176 @return populated menu |
|
177 @rtype QMenu |
176 """ |
178 """ |
177 menu = QMenu(self.menuTitle(), mainMenu) |
179 menu = QMenu(self.menuTitle(), mainMenu) |
178 menu.setTearOffEnabled(True) |
180 menu.setTearOffEnabled(True) |
179 |
181 |
180 menu.addAction(self.hgShelveAct) |
182 menu.addAction(self.hgShelveAct) |
192 |
194 |
193 def menuTitle(self): |
195 def menuTitle(self): |
194 """ |
196 """ |
195 Public method to get the menu title. |
197 Public method to get the menu title. |
196 |
198 |
197 @return title of the menu (string) |
199 @return title of the menu |
|
200 @rtype str |
198 """ |
201 """ |
199 return self.tr("Shelve") |
202 return self.tr("Shelve") |
200 |
203 |
201 def __reopenProject(self, shouldReopen, title): |
204 def __reopenProject(self, shouldReopen, title): |
202 """ |
205 """ |
203 Private method to reopen the project if needed and wanted. |
206 Private method to reopen the project if needed and wanted. |
204 |
207 |
205 @param shouldReopen flag indicating that the project should |
208 @param shouldReopen flag indicating that the project should |
206 be reopened (boolean) |
209 be reopened |
207 @param title title of the message box (string) |
210 @type bool |
|
211 @param title title of the message box |
|
212 @type str |
208 """ |
213 """ |
209 if shouldReopen: |
214 if shouldReopen: |
210 res = EricMessageBox.yesNo( |
215 res = EricMessageBox.yesNo( |
211 None, |
216 None, |
212 title, |
217 title, |