12 from PyQt6.QtCore import ( |
12 from PyQt6.QtCore import ( |
13 pyqtSignal, pyqtSlot, QObject, QCryptographicHash, QByteArray, QUrl, |
13 pyqtSignal, pyqtSlot, QObject, QCryptographicHash, QByteArray, QUrl, |
14 qWarning |
14 qWarning |
15 ) |
15 ) |
16 |
16 |
17 from E5Gui import E5MessageBox |
17 from E5Gui import EricMessageBox |
18 |
18 |
19 from ..Tools.WebBrowserTools import pixmapFileToDataUrl |
19 from ..Tools.WebBrowserTools import pixmapFileToDataUrl |
20 |
20 |
21 from Utilities.AutoSaver import AutoSaver |
21 from Utilities.AutoSaver import AutoSaver |
22 import Utilities |
22 import Utilities |
203 from .SpeedDialWriter import SpeedDialWriter |
203 from .SpeedDialWriter import SpeedDialWriter |
204 speedDialFile = self.getFileName() |
204 speedDialFile = self.getFileName() |
205 writer = SpeedDialWriter() |
205 writer = SpeedDialWriter() |
206 if not writer.write(speedDialFile, self.__webPages, |
206 if not writer.write(speedDialFile, self.__webPages, |
207 self.__pagesPerRow, self.__speedDialSize): |
207 self.__pagesPerRow, self.__speedDialSize): |
208 E5MessageBox.critical( |
208 EricMessageBox.critical( |
209 None, |
209 None, |
210 self.tr("Saving Speed Dial data"), |
210 self.tr("Saving Speed Dial data"), |
211 self.tr( |
211 self.tr( |
212 """<p>Speed Dial data could not be saved to""" |
212 """<p>Speed Dial data could not be saved to""" |
213 """ <b>{0}</b></p>""").format(speedDialFile)) |
213 """ <b>{0}</b></p>""").format(speedDialFile)) |
216 |
216 |
217 def resetDials(self): |
217 def resetDials(self): |
218 """ |
218 """ |
219 Public method to reset the speed dials to the default values. |
219 Public method to reset the speed dials to the default values. |
220 """ |
220 """ |
221 ok = E5MessageBox.yesNo( |
221 ok = EricMessageBox.yesNo( |
222 None, |
222 None, |
223 self.tr("Reset Speed Dials"), |
223 self.tr("Reset Speed Dials"), |
224 self.tr("""Are you sure you want to reset the speed dials to""" |
224 self.tr("""Are you sure you want to reset the speed dials to""" |
225 """ the default pages?""")) |
225 """ the default pages?""")) |
226 if ok: |
226 if ok: |