194 menu.addAction(self.hgBookmarkPullAct) |
194 menu.addAction(self.hgBookmarkPullAct) |
195 menu.addSeparator() |
195 menu.addSeparator() |
196 menu.addAction(self.hgBookmarkOutgoingAct) |
196 menu.addAction(self.hgBookmarkOutgoingAct) |
197 menu.addAction(self.hgBookmarkPushAct) |
197 menu.addAction(self.hgBookmarkPushAct) |
198 |
198 |
|
199 menu.aboutToShow.connect(self.__aboutToShowMenu) |
|
200 |
199 return menu |
201 return menu |
200 |
202 |
|
203 def __aboutToShowMenu(self): |
|
204 """ |
|
205 Private slot to handle the aboutToShow signal of the background menu. |
|
206 """ |
|
207 self.hgBookmarkPullAct.setEnabled(self.vcs.canPull()) |
|
208 self.hgBookmarkIncomingAct.setEnabled(self.vcs.canPull()) |
|
209 |
|
210 self.hgBookmarkPushAct.setEnabled(self.vcs.canPush()) |
|
211 self.hgBookmarkOutgoingAct.setEnabled(self.vcs.canPush()) |
|
212 |
201 def menuTitle(self): |
213 def menuTitle(self): |
202 """ |
214 """ |
203 Public method to get the menu title. |
215 Public method to get the menu title. |
204 |
216 |
205 @return title of the menu (string) |
217 @return title of the menu (string) |