Sat, 20 Oct 2012 17:28:38 +0200
Merged remote changes.
UI/UserInterface.py | file | annotate | diff | comparison | revisions |
--- a/APIs/Python3/eric5.api Sat Oct 20 17:27:09 2012 +0200 +++ b/APIs/Python3/eric5.api Sat Oct 20 17:28:38 2012 +0200 @@ -2546,6 +2546,7 @@ eric5.Helpviewer.HelpWindow.HelpWindow.setForwardAvailable?4(b) eric5.Helpviewer.HelpWindow.HelpWindow.setLoadingActions?4(b) eric5.Helpviewer.HelpWindow.HelpWindow.setPrivateMode?4(on) +eric5.Helpviewer.HelpWindow.HelpWindow.shutdown?4() eric5.Helpviewer.HelpWindow.HelpWindow.speedDial?4() eric5.Helpviewer.HelpWindow.HelpWindow.syncManager?4() eric5.Helpviewer.HelpWindow.HelpWindow.userAgentsManager?4()
--- a/Documentation/Help/source.qhp Sat Oct 20 17:27:09 2012 +0200 +++ b/Documentation/Help/source.qhp Sat Oct 20 17:28:38 2012 +0200 @@ -5196,6 +5196,7 @@ <keyword name="HelpWindow.setForwardAvailable" id="HelpWindow.setForwardAvailable" ref="eric5.Helpviewer.HelpWindow.html#HelpWindow.setForwardAvailable" /> <keyword name="HelpWindow.setLoadingActions" id="HelpWindow.setLoadingActions" ref="eric5.Helpviewer.HelpWindow.html#HelpWindow.setLoadingActions" /> <keyword name="HelpWindow.setPrivateMode" id="HelpWindow.setPrivateMode" ref="eric5.Helpviewer.HelpWindow.html#HelpWindow.setPrivateMode" /> + <keyword name="HelpWindow.shutdown" id="HelpWindow.shutdown" ref="eric5.Helpviewer.HelpWindow.html#HelpWindow.shutdown" /> <keyword name="HelpWindow.speedDial" id="HelpWindow.speedDial" ref="eric5.Helpviewer.HelpWindow.html#HelpWindow.speedDial" /> <keyword name="HelpWindow.syncManager" id="HelpWindow.syncManager" ref="eric5.Helpviewer.HelpWindow.html#HelpWindow.syncManager" /> <keyword name="HelpWindow.userAgentsManager" id="HelpWindow.userAgentsManager" ref="eric5.Helpviewer.HelpWindow.html#HelpWindow.userAgentsManager" />
--- a/Documentation/Source/eric5.Helpviewer.HelpWindow.html Sat Oct 20 17:27:09 2012 +0200 +++ b/Documentation/Source/eric5.Helpviewer.HelpWindow.html Sat Oct 20 17:28:38 2012 +0200 @@ -490,6 +490,9 @@ </tr><tr> <td><a href="#HelpWindow.setPrivateMode">setPrivateMode</a></td> <td>Public method to set the privacy mode.</td> +</tr><tr> +<td><a href="#HelpWindow.shutdown">shutdown</a></td> +<td>Public method to shut down the web browser.</td> </tr> </table> <h3>Static Methods</h3> @@ -1592,6 +1595,16 @@ <dd> flag indicating the privacy state (boolean) </dd> +</dl><a NAME="HelpWindow.shutdown" ID="HelpWindow.shutdown"></a> +<h4>HelpWindow.shutdown</h4> +<b>shutdown</b>(<i></i>) +<p> + Public method to shut down the web browser. +</p><dl> +<dt>Returns:</dt> +<dd> +flag indicating successful shutdown (boolean) +</dd> </dl><a NAME="HelpWindow.__getWebIcon" ID="HelpWindow.__getWebIcon"></a> <h4>HelpWindow.__getWebIcon (static)</h4> <b>__getWebIcon</b>(<i></i>)
--- a/Helpviewer/HelpWindow.py Sat Oct 20 17:27:09 2012 +0200 +++ b/Helpviewer/HelpWindow.py Sat Oct 20 17:28:38 2012 +0200 @@ -257,6 +257,7 @@ self.__virusTotal.fileScanReport.connect(self.__virusTotalFileScanReport) self.__previewer = None + self.__shutdownCalled = False QTimer.singleShot(0, self.__lookForNewDocumentation) if self.__searchWord is not None: @@ -1941,13 +1942,28 @@ <br />This event is simply accepted after the history has been saved and all window references have been deleted. """ + if not self.__shutdownCalled: + res = self.shutdown() + + if res: + e.accept() + self.helpClosed.emit() + else: + e.ignore() + else: + e.accept() + + def shutdown(self): + """ + Public method to shut down the web browser. + + @return flag indicating successful shutdown (boolean) + """ if not self.tabWidget.shallShutDown(): - e.ignore() - return + return False if not self.downloadManager().allowQuit(): - e.ignore() - return + return False self.downloadManager().shutdown() @@ -1997,8 +2013,8 @@ if not self.fromEric: Preferences.syncPreferences() - e.accept() - self.helpClosed.emit() + self.__shutdownCalled = True + return True def __backward(self): """
--- a/UI/UserInterface.py Sat Oct 20 17:27:09 2012 +0200 +++ b/UI/UserInterface.py Sat Oct 20 17:28:38 2012 +0200 @@ -5236,6 +5236,10 @@ if self.shutdownCalled: return True + if self.helpWindow is not None: + if not self.helpWindow.shutdown(): + return False + self.__writeSession() if not self.project.closeProject():