Helpviewer/HelpBrowserWV.py

changeset 675
2f626dcab902
parent 668
b0061a6f7484
child 676
6771da84fb0c
equal deleted inserted replaced
674:59c4b38b20a5 675:2f626dcab902
173 @return flag indicating acceptance (boolean) 173 @return flag indicating acceptance (boolean)
174 """ 174 """
175 # TODO: extend with more functionality 175 # TODO: extend with more functionality
176 self.__lastRequest = request 176 self.__lastRequest = request
177 self.__lastRequestType = type_ 177 self.__lastRequestType = type_
178
179 if type_ == QWebPage.NavigationTypeFormResubmitted:
180 res = E5MessageBox.yesNo(self.view(),
181 self.trUtf8("Resending POST request"),
182 self.trUtf8("""In order to display the site, the request along with"""
183 """ all the data must be sent once again, which may lead"""
184 """ to some unexpected behaviour of the site e.g. the"""
185 """ same action might be performed once again. Do you want"""
186 """ to continue anyway?"""),
187 icon = E5MessageBox.Warning)
188 if not res:
189 return False
178 190
179 return QWebPage.acceptNavigationRequest(self, frame, request, type_) 191 return QWebPage.acceptNavigationRequest(self, frame, request, type_)
180 192
181 def populateNetworkRequest(self, request): 193 def populateNetworkRequest(self, request):
182 """ 194 """
840 act = self.sender() 852 act = self.sender()
841 url = act.data() 853 url = act.data()
842 if url.isEmpty(): 854 if url.isEmpty():
843 return 855 return
844 856
845 oldCtrlPressed = self.ctrlPressed
846 self.ctrlPressed = True 857 self.ctrlPressed = True
847 self.setSource(url) 858 self.setSource(url)
848 self.ctrlPressed = oldCtrlPressed 859 self.ctrlPressed = False
849 860
850 def __bookmarkLink(self): 861 def __bookmarkLink(self):
851 """ 862 """
852 Private slot to bookmark a link via the context menu. 863 Private slot to bookmark a link via the context menu.
853 """ 864 """

eric ide

mercurial