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",
39 "mormonmessages": "mormonmessages.png",
41 "scriptures": "scriptures.png",
45 "nomagazineimage": "nomagazineimage.png",
48 def __init__(self, storePath, cachePath):
49 self._storePath = storePath
50 self._cachePath = cachePath
52 def get_surface_from_store(self, imageName):
53 path = os.path.join(self._storePath, imageName)
54 image = cairo.ImageSurface.create_from_png(path)
57 def get_image_from_store(self, imageName):
58 path = os.path.join(self._storePath, imageName)
60 image.set_from_file(path)
63 def set_image_from_store(self, image, imageName):
64 path = os.path.join(self._storePath, imageName)
65 image.set_from_file(path)
68 def get_pixbuf_from_store(self, imageName):
69 path = os.path.join(self._storePath, imageName)
70 return gtk.gdk.pixbuf_new_from_file(path)
72 def get_pixbuf_animation_from_store(self, imageName):
73 path = os.path.join(self._storePath, imageName)
74 return gtk.gdk.PixbufAnimation(path)