26 the default bookmarks file (string), an info text (string), |
26 the default bookmarks file (string), an info text (string), |
27 a prompt (string) and the default directory of the bookmarks file |
27 a prompt (string) and the default directory of the bookmarks file |
28 (string) |
28 (string) |
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 == "ie": |
31 if sourceId != "ie": |
32 if Globals.isWindowsPlatform(): |
|
33 standardDir = os.path.expandvars( |
|
34 "%USERPROFILE%\\Favorites") |
|
35 else: |
|
36 standardDir = "" |
|
37 return ( |
|
38 UI.PixmapCache.getPixmap("internet_explorer"), |
|
39 "Internet Explorer", |
|
40 "", |
|
41 QCoreApplication.translate( |
|
42 "IExplorerImporter", |
|
43 """Internet Explorer stores its bookmarks in the""" |
|
44 """ <b>Favorites</b> folder This folder is usually""" |
|
45 """ located in"""), |
|
46 QCoreApplication.translate( |
|
47 "IExplorerImporter", |
|
48 """Please choose the folder to begin importing bookmarks."""), |
|
49 standardDir, |
|
50 ) |
|
51 else: |
|
52 raise ValueError( |
32 raise ValueError( |
53 "Unsupported browser ID given ({0}).".format(sourceId)) |
33 "Unsupported browser ID given ({0}).".format(sourceId)) |
|
34 |
|
35 if Globals.isWindowsPlatform(): |
|
36 standardDir = os.path.expandvars( |
|
37 "%USERPROFILE%\\Favorites") |
|
38 else: |
|
39 standardDir = "" |
|
40 return ( |
|
41 UI.PixmapCache.getPixmap("internet_explorer"), |
|
42 "Internet Explorer", |
|
43 "", |
|
44 QCoreApplication.translate( |
|
45 "IExplorerImporter", |
|
46 """Internet Explorer stores its bookmarks in the""" |
|
47 """ <b>Favorites</b> folder This folder is usually""" |
|
48 """ located in"""), |
|
49 QCoreApplication.translate( |
|
50 "IExplorerImporter", |
|
51 """Please choose the folder to begin importing bookmarks."""), |
|
52 standardDir, |
|
53 ) |
54 |
54 |
55 |
55 |
56 class IExplorerImporter(BookmarksImporter): |
56 class IExplorerImporter(BookmarksImporter): |
57 """ |
57 """ |
58 Class implementing the Chrome bookmarks importer. |
58 Class implementing the Chrome bookmarks importer. |