Helpviewer/HelpTabWidget.py

changeset 1670
6fd889391d2c
parent 1665
b248526d3a1b
child 1673
06eeffc8c97d
diff -r 02ad912c8645 -r 6fd889391d2c Helpviewer/HelpTabWidget.py
--- a/Helpviewer/HelpTabWidget.py	Fri Feb 24 11:15:28 2012 +0100
+++ b/Helpviewer/HelpTabWidget.py	Sat Feb 25 17:54:39 2012 +0100
@@ -282,9 +282,11 @@
         self.__closeButton.setEnabled(True)
         self.__navigationButton.setEnabled(True)
         
-        if not linkName and not requestData and \
-           Preferences.getHelp("StartupBehavior") == 0:
-            linkName = Preferences.getHelp("HomePage")
+        if not linkName and not requestData:
+            if Preferences.getHelp("StartupBehavior") == 0:
+                linkName = Preferences.getHelp("HomePage")
+            elif Preferences.getHelp("StartupBehavior") == 1:
+                linkName = "eric:speeddial"
         
         if linkName:
             browser.setSource(QUrl(linkName))
@@ -357,6 +359,8 @@
         del urlbar
         
         browser = self.widget(index)
+        if browser is None:
+            return
         browser.home()
         self.removeTab(index)
         self.browserClosed.emit(browser)
@@ -633,6 +637,8 @@
         @param ok flag indicating the result (boolean)
         """
         browser = self.sender()
+        if not isinstance(browser, HelpBrowser):
+            return
         
         if browser is not None:
             index = self.indexOf(browser)

eric ide

mercurial