20 @return list of tuples with an icon (QIcon), readable name (string) and |
20 @return list of tuples with an icon (QIcon), readable name (string) and |
21 internal name (string) |
21 internal name (string) |
22 """ |
22 """ |
23 importers = [] |
23 importers = [] |
24 importers.append( |
24 importers.append( |
25 (UI.PixmapCache.getIcon("ericWeb48.png"), "eric5 Web Browser", "e5browser")) |
25 (UI.PixmapCache.getIcon("ericWeb48.png"), "eric5 Web Browser", |
|
26 "e5browser")) |
26 importers.append( |
27 importers.append( |
27 (UI.PixmapCache.getIcon("firefox.png"), "Mozilla Firefox", "firefox")) |
28 (UI.PixmapCache.getIcon("firefox.png"), "Mozilla Firefox", "firefox")) |
28 importers.append( |
29 importers.append( |
29 (UI.PixmapCache.getIcon("chrome.png"), "Google Chrome", "chrome")) |
30 (UI.PixmapCache.getIcon("chrome.png"), "Google Chrome", "chrome")) |
30 if Globals.isLinuxPlatform(): |
31 if Globals.isLinuxPlatform(): |
31 importers.append( |
32 importers.append( |
32 (UI.PixmapCache.getIcon("chromium.png"), "Chromium", "chromium")) |
33 (UI.PixmapCache.getIcon("chromium.png"), "Chromium", "chromium")) |
33 importers.append( |
34 importers.append( |
34 (UI.PixmapCache.getIcon("konqueror.png"), "Konqueror", "konqueror")) |
35 (UI.PixmapCache.getIcon("konqueror.png"), "Konqueror", |
|
36 "konqueror")) |
35 importers.append( |
37 importers.append( |
36 (UI.PixmapCache.getIcon("opera.png"), "Opera", "opera")) |
38 (UI.PixmapCache.getIcon("opera.png"), "Opera", "opera")) |
37 importers.append( |
39 importers.append( |
38 (UI.PixmapCache.getIcon("safari.png"), "Apple Safari", "safari")) |
40 (UI.PixmapCache.getIcon("safari.png"), "Apple Safari", "safari")) |
39 if Globals.isWindowsPlatform(): |
41 if Globals.isWindowsPlatform(): |
40 importers.append( |
42 importers.append( |
41 (UI.PixmapCache.getIcon("internet_explorer.png"), "Internet Explorer", "ie")) |
43 (UI.PixmapCache.getIcon("internet_explorer.png"), |
|
44 "Internet Explorer", "ie")) |
42 importers.append( |
45 importers.append( |
43 (UI.PixmapCache.getIcon("xbel.png"), |
46 (UI.PixmapCache.getIcon("xbel.png"), |
44 QCoreApplication.translate("BookmarksImporters", "XBEL File"), |
47 QCoreApplication.translate("BookmarksImporters", "XBEL File"), |
45 "xbel")) |
48 "xbel")) |
46 importers.append( |
49 importers.append( |
55 Module function to get information for the given source id. |
58 Module function to get information for the given source id. |
56 |
59 |
57 @param id source id to get info for (string) |
60 @param id source id to get info for (string) |
58 @return tuple with an icon (QPixmap), readable name (string), name of |
61 @return tuple with an icon (QPixmap), readable name (string), name of |
59 the default bookmarks file (string), an info text (string), |
62 the default bookmarks file (string), an info text (string), |
60 a prompt (string) and the default directory of the bookmarks file (string) |
63 a prompt (string) and the default directory of the bookmarks |
|
64 file (string) |
|
65 @exception ValueError raised to indicate an unsupported importer |
61 """ |
66 """ |
62 if id in ["e5browser", "xbel", "konqueror"]: |
67 if id in ["e5browser", "xbel", "konqueror"]: |
63 from . import XbelImporter |
68 from . import XbelImporter |
64 return XbelImporter.getImporterInfo(id) |
69 return XbelImporter.getImporterInfo(id) |
65 elif id == "html": |
70 elif id == "html": |
89 Module function to get an importer for the given source id. |
94 Module function to get an importer for the given source id. |
90 |
95 |
91 @param id source id to get an importer for (string) |
96 @param id source id to get an importer for (string) |
92 @param parent reference to the parent object (QObject) |
97 @param parent reference to the parent object (QObject) |
93 @return bookmarks importer (BookmarksImporter) |
98 @return bookmarks importer (BookmarksImporter) |
|
99 @exception ValueError raised to indicate an unsupported importer |
94 """ |
100 """ |
95 if id in ["e5browser", "xbel", "konqueror"]: |
101 if id in ["e5browser", "xbel", "konqueror"]: |
96 from . import XbelImporter |
102 from . import XbelImporter |
97 return XbelImporter.XbelImporter(id, parent) |
103 return XbelImporter.XbelImporter(id, parent) |
98 elif id == "html": |
104 elif id == "html": |