Helpviewer/Bookmarks/BookmarksImporters/XbelImporter.py

changeset 5587
ea526b78ee6c
parent 5389
9b1c800daff3
child 6048
82ad8ec9548c
--- a/Helpviewer/Bookmarks/BookmarksImporters/XbelImporter.py	Tue Mar 07 18:46:09 2017 +0100
+++ b/Helpviewer/Bookmarks/BookmarksImporters/XbelImporter.py	Tue Mar 07 18:53:18 2017 +0100
@@ -18,18 +18,18 @@
 import UI.PixmapCache
 
 
-def getImporterInfo(id):
+def getImporterInfo(sourceId):
     """
     Module function to get information for the given XBEL source id.
     
-    @param id id of the browser ("chrome" or "chromium")
+    @param sourceId id of the browser ("chrome" or "chromium")
     @return tuple with an icon (QPixmap), readable name (string), name of
         the default bookmarks file (string), an info text (string),
         a prompt (string) and the default directory of the bookmarks file
         (string)
     @exception ValueError raised to indicate an invalid browser ID
     """
-    if id == "e5browser":
+    if sourceId == "e5browser":
         from ..BookmarksManager import BookmarksManager
         bookmarksFile = BookmarksManager.getFileName()
         return (
@@ -46,7 +46,7 @@
                 """Please choose the file to begin importing bookmarks."""),
             os.path.dirname(bookmarksFile),
         )
-    elif id == "konqueror":
+    elif sourceId == "konqueror":
         if os.path.exists(os.path.expanduser("~/.kde4")):
             standardDir = os.path.expanduser("~/.kde4/share/apps/konqueror")
         elif os.path.exists(os.path.expanduser("~/.kde")):
@@ -67,7 +67,7 @@
                 """Please choose the file to begin importing bookmarks."""),
             standardDir,
         )
-    elif id == "xbel":
+    elif sourceId == "xbel":
         return (
             UI.PixmapCache.getPixmap("xbel.png"),
             "XBEL Bookmarks",
@@ -84,21 +84,22 @@
             "",
         )
     else:
-        raise ValueError("Unsupported browser ID given ({0}).".format(id))
+        raise ValueError(
+            "Unsupported browser ID given ({0}).".format(sourceId))
 
 
 class XbelImporter(BookmarksImporter):
     """
     Class implementing the XBEL bookmarks importer.
     """
-    def __init__(self, id="", parent=None):
+    def __init__(self, sourceId="", parent=None):
         """
         Constructor
         
-        @param id source ID (string)
+        @param sourceId source ID (string)
         @param parent reference to the parent object (QObject)
         """
-        super(XbelImporter, self).__init__(id, parent)
+        super(XbelImporter, self).__init__(sourceId, parent)
         
         self.__fileName = ""
     

eric ide

mercurial