17 pyqtSignal, |
17 pyqtSignal, |
18 pyqtSlot, |
18 pyqtSlot, |
19 qWarning, |
19 qWarning, |
20 ) |
20 ) |
21 |
21 |
22 from eric7 import Utilities |
22 from eric7 import Globals, Utilities |
23 from eric7.EricWidgets import EricMessageBox |
23 from eric7.EricWidgets import EricMessageBox |
24 from eric7.Utilities.AutoSaver import AutoSaver |
24 from eric7.Utilities.AutoSaver import AutoSaver |
25 |
25 |
26 from ..Tools.WebBrowserTools import pixmapFileToDataUrl |
26 from ..Tools.WebBrowserTools import pixmapFileToDataUrl |
27 from .Page import Page |
27 from .Page import Page |
148 """ |
148 """ |
149 Public method to get the file name of the user agents file. |
149 Public method to get the file name of the user agents file. |
150 |
150 |
151 @return name of the user agents file (string) |
151 @return name of the user agents file (string) |
152 """ |
152 """ |
153 return os.path.join(Utilities.getConfigDir(), "web_browser", "speedDial.xml") |
153 return os.path.join(Globals.getConfigDir(), "web_browser", "speedDial.xml") |
154 |
154 |
155 def __initialize(self): |
155 def __initialize(self): |
156 """ |
156 """ |
157 Private method to initialize the speed dial. |
157 Private method to initialize the speed dial. |
158 """ |
158 """ |
159 self.__thumbnailsDirectory = os.path.join( |
159 self.__thumbnailsDirectory = os.path.join( |
160 Utilities.getConfigDir(), "web_browser", "thumbnails" |
160 Globals.getConfigDir(), "web_browser", "thumbnails" |
161 ) |
161 ) |
162 # Create directory if it does not exist yet |
162 # Create directory if it does not exist yet |
163 if not os.path.exists(self.__thumbnailsDirectory): |
163 if not os.path.exists(self.__thumbnailsDirectory): |
164 os.makedirs(self.__thumbnailsDirectory) |
164 os.makedirs(self.__thumbnailsDirectory) |
165 |
165 |