X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fimagestore.py;h=9ca9964cf3c53bd74bc04a9897a462f7534ca55a;hb=26178fdaeca905e3c74e464a4d6e5b6510cb4f44;hp=cc2ea558d80e0bb13f891af28aa9f9e78a73a047;hpb=ed27fe5f073929a7b3de7ea3ef2966f0cac8c72d;p=watersofshiloah diff --git a/src/imagestore.py b/src/imagestore.py index cc2ea55..9ca9964 100644 --- a/src/imagestore.py +++ b/src/imagestore.py @@ -12,12 +12,21 @@ class ImageStore(object): "pause": "pause.png", "play": "play.png", "stop": "stop.png", + "home": "home.png", - "generic_background": "radiobackground_01.png", - "night_temple_background": "radiobackground_02.png", - "day_temple_background": "radiobackground_03.png", - "presidency_background": "radiobackground_04.png", - "scriptures_background": "radiobackground_05.png", + "small_next": "small_next.png", + "small_prev": "small_prev.png", + "small_pause": "small_pause.png", + "small_play": "small_play.png", + "small_stop": "small_stop.png", + "small_home": "small_home.png", + + "loading": "loading.gif", + + "radio_header": "radio_header.png", + "conference_background": "conference_bg.png", + "magazine_background": "magazine_bg.png", + "scriptures_background": "scripture_bg.png", "conferences": "conference.png", "magazines": "magazines.png", @@ -32,13 +41,26 @@ class ImageStore(object): self._storePath = storePath self._cachePath = cachePath - def get_surface_from_store(self, image): - path = os.path.join(self._storePath, image) + def get_surface_from_store(self, imageName): + path = os.path.join(self._storePath, imageName) image = cairo.ImageSurface.create_from_png(path) return image - def get_image_from_store(self, image): - path = os.path.join(self._storePath, image) + def get_image_from_store(self, imageName): + path = os.path.join(self._storePath, imageName) image = gtk.Image() image.set_from_file(path) return image + + def set_image_from_store(self, image, imageName): + path = os.path.join(self._storePath, imageName) + image.set_from_file(path) + return image + + def get_pixbuf_from_store(self, imageName): + path = os.path.join(self._storePath, imageName) + return gtk.gdk.pixbuf_new_from_file(path) + + def get_pixbuf_animation_from_store(self, imageName): + path = os.path.join(self._storePath, imageName) + return gtk.gdk.PixbufAnimation(path)