10 import os |
10 import os |
11 import plistlib |
11 import plistlib |
12 |
12 |
13 from PyQt6.QtCore import QCoreApplication, QDate, Qt |
13 from PyQt6.QtCore import QCoreApplication, QDate, Qt |
14 |
14 |
15 from eric7 import Globals |
|
16 from eric7.EricGui import EricPixmapCache |
15 from eric7.EricGui import EricPixmapCache |
|
16 from eric7.SystemUtilities import OSUtilities |
17 |
17 |
18 from .BookmarksImporter import BookmarksImporter |
18 from .BookmarksImporter import BookmarksImporter |
19 |
19 |
20 |
20 |
21 def getImporterInfo(sourceId): |
21 def getImporterInfo(sourceId): |
30 @exception ValueError raised to indicate an invalid browser ID |
30 @exception ValueError raised to indicate an invalid browser ID |
31 """ |
31 """ |
32 if sourceId != "safari": |
32 if sourceId != "safari": |
33 raise ValueError("Unsupported browser ID given ({0}).".format(sourceId)) |
33 raise ValueError("Unsupported browser ID given ({0}).".format(sourceId)) |
34 |
34 |
35 if Globals.isWindowsPlatform(): |
35 if OSUtilities.isWindowsPlatform(): |
36 standardDir = os.path.expandvars("%APPDATA%\\Apple Computer\\Safari") |
36 standardDir = os.path.expandvars("%APPDATA%\\Apple Computer\\Safari") |
37 elif Globals.isMacPlatform(): |
37 elif OSUtilities.isMacPlatform(): |
38 standardDir = os.path.expanduser("~/Library/Safari") |
38 standardDir = os.path.expanduser("~/Library/Safari") |
39 else: |
39 else: |
40 standardDir = "" |
40 standardDir = "" |
41 return ( |
41 return ( |
42 EricPixmapCache.getPixmap("safari"), |
42 EricPixmapCache.getPixmap("safari"), |