Helpviewer/Bookmarks/BookmarksManager.py

changeset 1621
85653d5d3bf9
parent 1509
c0b5e693b0eb
child 1623
6b9654035a7c
--- a/Helpviewer/Bookmarks/BookmarksManager.py	Mon Feb 13 19:02:09 2012 +0100
+++ b/Helpviewer/Bookmarks/BookmarksManager.py	Wed Feb 15 14:27:43 2012 +0100
@@ -122,6 +122,14 @@
         self.entryRemoved.connect(self.__saveTimer.changeOccurred)
         self.entryChanged.connect(self.__saveTimer.changeOccurred)
     
+    def getFileName(self):
+        """
+        Public method to get the file name of the bookmark file.
+        
+        @return name of the bookmark file (string)
+        """
+        return os.path.join(Utilities.getConfigDir(), "browser", "bookmarks.xbel")
+    
     def close(self):
         """
         Public method to close the bookmark manager.
@@ -151,7 +159,7 @@
         
         self.__loaded = True
         
-        bookmarkFile = os.path.join(Utilities.getConfigDir(), "browser", "bookmarks.xbel")
+        bookmarkFile = self.getFileName()
         if not QFile.exists(bookmarkFile):
             ba = QByteArray(DefaultBookmarks)
             bookmarkFile = QBuffer(ba)
@@ -215,7 +223,7 @@
             return
         
         writer = XbelWriter()
-        bookmarkFile = os.path.join(Utilities.getConfigDir(), "browser", "bookmarks.xbel")
+        bookmarkFile = self.getFileName()
         
         # save root folder titles in English (i.e. not localized)
         self.__menu.title = BOOKMARKMENU

eric ide

mercurial