eric6/UI/PixmapCache.py

changeset 7488
36ec7469f492
parent 7360
9190402e4505
child 7533
88261c96484b
diff -r 1696bc52c683 -r 36ec7469f492 eric6/UI/PixmapCache.py
--- a/eric6/UI/PixmapCache.py	Tue Mar 31 19:07:11 2020 +0200
+++ b/eric6/UI/PixmapCache.py	Tue Mar 31 19:15:51 2020 +0200
@@ -74,11 +74,22 @@
     def addSearchPath(self, path):
         """
         Public method to add a path to the search path.
-
-        @param path path to add (string)
+        
+        @param path path to add
+        @type str
         """
         if path not in self.searchPath:
             self.searchPath.append(path)
+    
+    def removeSearchPath(self, path):
+        """
+        Public method to remove a path from the search path.
+        
+        @param path path to remove
+        @type str
+        """
+        if path in self.searchPath:
+            self.searchPath.remove(path)
 
 pixCache = PixmapCache()
 
@@ -176,7 +187,21 @@
     """
     Module function to add a path to the search path.
 
-    @param path path to add (string)
-    @param cache reference to the pixmap cache object (PixmapCache)
+    @param path path to add
+    @type str
+    @param cache reference to the pixmap cache object
+    @type PixmapCache
     """
     cache.addSearchPath(path)
+
+
+def removeSearchPath(path, cache=pixCache):
+    """
+    Public method to remove a path from the search path.
+    
+    @param path path to remove
+    @type str
+    @param cache reference to the pixmap cache object
+    @type PixmapCache
+    """
+    cache.removeSearchPath(path)

eric ide

mercurial