Helpviewer/SpeedDial/SpeedDial.py

changeset 4954
36e92a908f3f
parent 4952
d3559dd4e1bc
child 5375
c55d7340ef39
--- a/Helpviewer/SpeedDial/SpeedDial.py	Sun Apr 24 14:19:17 2016 +0200
+++ b/Helpviewer/SpeedDial/SpeedDial.py	Sun Apr 24 17:26:54 2016 +0200
@@ -219,6 +219,22 @@
         else:
             self.speedDialSaved.emit()
     
+    def resetDials(self):
+        """
+        Public method to reset the speed dials to the default values.
+        """
+        ok = E5MessageBox.yesNo(
+            None,
+            self.tr("Reset Speed Dials"),
+            self.tr("""Are you sure you want to reset the speed dials to"""
+                    """ the default pages?"""))
+        if ok:
+            speedDialFile = self.getFileName()
+            if os.path.exists(speedDialFile):
+                os.remove(speedDialFile)
+            
+            self.__load()
+    
     def close(self):
         """
         Public method to close the user agents manager.

eric ide

mercurial