7 class ImageStore(object):
16 "pause_pressed": "pausepressed.png",
17 "play_pressed": "playpressed.png",
18 "stop_pressed": "stoppressed.png",
20 "small_next": "small_next.png",
21 "small_prev": "small_prev.png",
22 "small_home": "small_home.png",
23 "small_pause": "small_pause.png",
24 "small_play": "small_play.png",
25 "small_stop": "small_stop.png",
26 "small_pause_pressed": "small_pausepressed.png",
27 "small_play_pressed": "small_playpressed.png",
28 "small_stop_pressed": "small_stoppressed.png",
30 "loading": "loading.gif",
32 "radio_header": "radio_header.png",
33 "conference_background": "conference_bg.png",
34 "magazine_background": "magazine_bg.png",
35 "scripture_background": "scripture_bg.png",
37 "conferences": "conference.png",
38 "magazines": "magazines.png",
40 "mormonmessages": "mormonmessages.png",
42 "scriptures": "scriptures.png",
46 def __init__(self, storePath, cachePath):
47 self._storePath = storePath
48 self._cachePath = cachePath
50 def get_surface_from_store(self, imageName):
51 path = os.path.join(self._storePath, imageName)
52 image = cairo.ImageSurface.create_from_png(path)
55 def get_image_from_store(self, imageName):
56 path = os.path.join(self._storePath, imageName)
58 image.set_from_file(path)
61 def set_image_from_store(self, image, imageName):
62 path = os.path.join(self._storePath, imageName)
63 image.set_from_file(path)
66 def get_pixbuf_from_store(self, imageName):
67 path = os.path.join(self._storePath, imageName)
68 return gtk.gdk.pixbuf_new_from_file(path)
70 def get_pixbuf_animation_from_store(self, imageName):
71 path = os.path.join(self._storePath, imageName)
72 return gtk.gdk.PixbufAnimation(path)