99 Private method to generate the image file name for a URL. |
99 Private method to generate the image file name for a URL. |
100 |
100 |
101 @param url URL to generate the file name from (string) |
101 @param url URL to generate the file name from (string) |
102 @return name of the image file (string) |
102 @return name of the image file (string) |
103 """ |
103 """ |
104 return os.path.join(self.__thumbnailsDirectory, |
104 return os.path.join( |
|
105 self.__thumbnailsDirectory, |
105 str(QCryptographicHash.hash(QByteArray(url.encode("utf-8")), |
106 str(QCryptographicHash.hash(QByteArray(url.encode("utf-8")), |
106 QCryptographicHash.Md5).toHex(), encoding="utf-8") + ".png") |
107 QCryptographicHash.Md5).toHex(), encoding="utf-8") + ".png") |
107 |
108 |
108 def initialScript(self): |
109 def initialScript(self): |
109 """ |
110 """ |
197 Public method to save the speed dial configuration. |
198 Public method to save the speed dial configuration. |
198 """ |
199 """ |
199 from .SpeedDialWriter import SpeedDialWriter |
200 from .SpeedDialWriter import SpeedDialWriter |
200 speedDialFile = self.getFileName() |
201 speedDialFile = self.getFileName() |
201 writer = SpeedDialWriter() |
202 writer = SpeedDialWriter() |
202 if not writer.write(speedDialFile, |
203 if not writer.write(speedDialFile, self.__webPages, |
203 self.__webPages, self.__pagesPerRow, self.__speedDialSize): |
204 self.__pagesPerRow, self.__speedDialSize): |
204 E5MessageBox.critical( |
205 E5MessageBox.critical( |
205 None, |
206 None, |
206 self.trUtf8("Saving Speed Dial data"), |
207 self.trUtf8("Saving Speed Dial data"), |
207 self.trUtf8( |
208 self.trUtf8( |
208 """<p>Speed Dial data could not be saved to""" |
209 """<p>Speed Dial data could not be saved to""" |