30 """ |
30 """ |
31 if id == "chrome": |
31 if id == "chrome": |
32 if Globals.isWindowsPlatform(): |
32 if Globals.isWindowsPlatform(): |
33 standardDir = os.path.expandvars( |
33 standardDir = os.path.expandvars( |
34 "%USERPROFILE%\\AppData\\Local\\Google\\Chrome\\User Data\\Default") |
34 "%USERPROFILE%\\AppData\\Local\\Google\\Chrome\\User Data\\Default") |
|
35 elif Globals.isMacPlatform(): |
|
36 standardDir = os.path.expanduser( |
|
37 "~/Library/Application Support/Google/Chrome/Default") |
35 else: |
38 else: |
36 standardDir = os.path.expanduser("~/.config/google-chrome/Default") |
39 standardDir = os.path.expanduser("~/.config/google-chrome/Default") |
37 return ( |
40 return ( |
38 UI.PixmapCache.getPixmap("chrome.png"), |
41 UI.PixmapCache.getPixmap("chrome.png"), |
39 "Google Chrome", |
42 "Google Chrome", |
107 Public method to get the imported bookmarks. |
110 Public method to get the imported bookmarks. |
108 |
111 |
109 @return imported bookmarks (BookmarkNode) |
112 @return imported bookmarks (BookmarkNode) |
110 """ |
113 """ |
111 try: |
114 try: |
112 f = open(self.__fileName, "r") |
115 f = open(self.__fileName, "r", encoding="utf-8") |
113 contents = json.load(f) |
116 contents = json.load(f) |
114 f.close() |
117 f.close() |
115 except IOError as err: |
118 except IOError as err: |
116 self._error = True |
119 self._error = True |
117 self._errorString = self.trUtf8("File '{0}' cannot be read.\nReason: {1}")\ |
120 self._errorString = self.trUtf8("File '{0}' cannot be read.\nReason: {1}")\ |