Fixed an issue opening help pages with a system web browser. 5_1_x

Sun, 24 Jul 2011 15:21:45 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 24 Jul 2011 15:21:45 +0200
branch
5_1_x
changeset 1194
9a54fec8559d
parent 1189
946daca989b5
child 1200
9de155b28f40

Fixed an issue opening help pages with a system web browser.

Documentation/Help/source.qch file | annotate | diff | comparison | revisions
Documentation/Source/eric5.UI.UserInterface.html file | annotate | diff | comparison | revisions
UI/UserInterface.py file | annotate | diff | comparison | revisions
Binary file Documentation/Help/source.qch has changed
--- a/Documentation/Source/eric5.UI.UserInterface.html	Tue Jul 19 19:26:09 2011 +0200
+++ b/Documentation/Source/eric5.UI.UserInterface.html	Sun Jul 24 15:21:45 2011 +0200
@@ -1537,15 +1537,10 @@
 </dd>
 </dl><a NAME="UserInterface.__startWebBrowser" ID="UserInterface.__startWebBrowser"></a>
 <h4>UserInterface.__startWebBrowser</h4>
-<b>__startWebBrowser</b>(<i>home = ""</i>)
+<b>__startWebBrowser</b>(<i></i>)
 <p>
         Private slot to start the eric5 web browser.
-</p><dl>
-<dt><i>home</i></dt>
-<dd>
-full pathname of a file to display (string)
-</dd>
-</dl><a NAME="UserInterface.__switchTab" ID="UserInterface.__switchTab"></a>
+</p><a NAME="UserInterface.__switchTab" ID="UserInterface.__switchTab"></a>
 <h4>UserInterface.__switchTab</h4>
 <b>__switchTab</b>(<i></i>)
 <p>
@@ -1756,10 +1751,15 @@
         from the internet.
 </p><a NAME="UserInterface.__webBrowser" ID="UserInterface.__webBrowser"></a>
 <h4>UserInterface.__webBrowser</h4>
-<b>__webBrowser</b>(<i></i>)
+<b>__webBrowser</b>(<i>home=""</i>)
 <p>
         Private slot to start the eric5 web browser.
-</p><a NAME="UserInterface.__whatsThis" ID="UserInterface.__whatsThis"></a>
+</p><dl>
+<dt><i>home</i></dt>
+<dd>
+full pathname of a file to display (string)
+</dd>
+</dl><a NAME="UserInterface.__whatsThis" ID="UserInterface.__whatsThis"></a>
 <h4>UserInterface.__whatsThis</h4>
 <b>__whatsThis</b>(<i></i>)
 <p>
--- a/UI/UserInterface.py	Tue Jul 19 19:26:09 2011 +0200
+++ b/UI/UserInterface.py	Sun Jul 24 15:21:45 2011 +0200
@@ -4187,13 +4187,11 @@
         """
         self.__assistant(version = 4)
     
-    def __startWebBrowser(self, home = ""):
+    def __startWebBrowser(self):
         """
         Private slot to start the eric5 web browser.
-        
-        @param home full pathname of a file to display (string)
-        """
-        self.launchHelpViewer(home)
+        """
+        self.launchHelpViewer("")
         
     def __customViewer(self, home = None):
         """
@@ -4868,11 +4866,17 @@
         
         self.launchHelpViewer("", searchWord = searchWord)
     
-    def __webBrowser(self):
+    def __webBrowser(self, home=""):
         """
         Private slot to start the eric5 web browser.
-        """
-        self.launchHelpViewer("")
+        
+        @param home full pathname of a file to display (string)
+        """
+        started = QDesktopServices.openUrl(QUrl(home))
+        if not started:
+            E5MessageBox.critical(self,
+                self.trUtf8('Open Browser'),
+                self.trUtf8('Could not start a web browser'))
 
     def showPreferences(self, pageName = None):
         """

eric ide

mercurial