7 class ImageStore(object):
16 "radio_header": "radio_header.png",
17 "conference_background": "conference_bg.png",
18 "magazine_background": "magazine_bg.png",
19 "scriptures_background": "scripture_bg.png",
21 "conferences": "conference.png",
22 "magazines": "magazines.png",
24 "mormonmessages": "mormonmessages.png",
26 "scriptures": "scriptures.png",
30 def __init__(self, storePath, cachePath):
31 self._storePath = storePath
32 self._cachePath = cachePath
34 def get_surface_from_store(self, image):
35 path = os.path.join(self._storePath, image)
36 image = cairo.ImageSurface.create_from_png(path)
39 def get_image_from_store(self, image):
40 path = os.path.join(self._storePath, image)
42 image.set_from_file(path)
45 def get_pixbuf_from_store(self, image):
46 path = os.path.join(self._storePath, image)
47 return gtk.gdk.pixbuf_new_from_file(path)