204 itm = self.imagesTree.itemAt(pos) |
204 itm = self.imagesTree.itemAt(pos) |
205 if itm is None: |
205 if itm is None: |
206 return |
206 return |
207 |
207 |
208 menu = QMenu() |
208 menu = QMenu() |
209 act = menu.addAction(self.trUtf8("Copy Image Location to Clipboard"), |
209 act = menu.addAction( |
|
210 self.trUtf8("Copy Image Location to Clipboard"), |
210 self.__copyAction) |
211 self.__copyAction) |
211 act.setData(itm.text(1)) |
212 act.setData(itm.text(1)) |
212 act = menu.addAction(self.trUtf8("Copy Image Name to Clipboard"), |
213 act = menu.addAction( |
|
214 self.trUtf8("Copy Image Name to Clipboard"), |
213 self.__copyAction) |
215 self.__copyAction) |
214 act.setData(itm.text(0)) |
216 act.setData(itm.text(0)) |
215 menu.addSeparator() |
217 menu.addSeparator() |
216 act = menu.addAction(self.trUtf8("Save Image"), self.__saveImage) |
218 act = menu.addAction(self.trUtf8("Save Image"), self.__saveImage) |
217 act.setData(self.imagesTree.indexOfTopLevelItem(itm)) |
219 act.setData(self.imagesTree.indexOfTopLevelItem(itm)) |
244 if cache: |
246 if cache: |
245 cacheData = cache.data(imageUrl) |
247 cacheData = cache.data(imageUrl) |
246 else: |
248 else: |
247 cacheData = None |
249 cacheData = None |
248 if not cacheData: |
250 if not cacheData: |
249 E5MessageBox.critical(self, |
251 E5MessageBox.critical( |
|
252 self, |
250 self.trUtf8("Save Image"), |
253 self.trUtf8("Save Image"), |
251 self.trUtf8("""This image is not available.""")) |
254 self.trUtf8("""This image is not available.""")) |
252 return |
255 return |
253 |
256 |
254 downloadDirectory = Helpviewer.HelpWindow.HelpWindow\ |
257 downloadDirectory = Helpviewer.HelpWindow.HelpWindow\ |