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