Пример #1
0
 def _set_listener ( self, database = None, remove = False ):
     """ Adds/Removes a file watch for the database specified by *database*.
     """
     file_watch.watch(
         self.update_all_items, facet_db.db( database or self.database ),
         remove = remove
     )
Пример #2
0
 def facets_init ( self ):
     """ Initializes the object.
     """
     if self.file_name == '':
         self.file_name = abspath( facets_env.bp or facet_db.db( 'fbi.bp' ) )
Пример #3
0
from facets.ui.pyface.api import ImageResource

from facets.ui.pyface.resource_manager import resource_manager

from facets.lib.resource.resource_reference import ImageReference, ResourceReference

# -------------------------------------------------------------------------------
#  Constants:
# -------------------------------------------------------------------------------

# Standard image file extensions:
ImageFileExts = (".png", ".gif", ".jpg", "jpeg")

# The image_cache root directory:
image_cache_path = facet_db.db("image_cache")

# Names of files that should not be copied when ceating a new library copy:
dont_copy_list = ("image_volume.py", "image_info.py", "license.txt")

# -- Code Generation Templates --------------------------------------------------

# Template for creating an ImageVolumeInfo object:
ImageVolumeInfoCodeTemplate = """
        ImageVolumeInfo(
            description = %(description)s,
            copyright   = %(copyright)s,
            license     = %(license)s,
            image_names = %(image_names)s
        )
"""[