X-Git-Url: http://git.maemo.org/git/?p=watersofshiloah;a=blobdiff_plain;f=src%2Fimagestore.py;h=7bd0e9668949ff9b7c44affbf9cab0050649c005;hp=af0a1e2e8c8dba8f23c42419a19edd89f4e2d2e7;hb=1f71861f5edaf1f6e8bd678a0125ce1d429a5cc8;hpb=fa4c407a4d2638b6a06a2b1a76280e766b561ebb diff --git a/src/imagestore.py b/src/imagestore.py index af0a1e2..7bd0e96 100644 --- a/src/imagestore.py +++ b/src/imagestore.py @@ -9,39 +9,66 @@ class ImageStore(object): STORE_LOOKUP = { "next": "next.png", "prev": "prev.png", + "home": "home.png", "pause": "pause.png", "play": "play.png", "stop": "stop.png", + "pause_pressed": "pausepressed.png", + "play_pressed": "playpressed.png", + "stop_pressed": "stoppressed.png", + + "small_next": "small_next.png", + "small_prev": "small_prev.png", + "small_home": "small_home.png", + "small_pause": "small_pause.png", + "small_play": "small_play.png", + "small_stop": "small_stop.png", + "small_pause_pressed": "small_pausepressed.png", + "small_play_pressed": "small_playpressed.png", + "small_stop_pressed": "small_stoppressed.png", + + "loading": "loading.gif", "radio_header": "radio_header.png", "conference_background": "conference_bg.png", "magazine_background": "magazine_bg.png", - "scriptures_background": "scripture_bg.png", + "scripture_background": "scripture_bg.png", "conferences": "conference.png", "magazines": "magazines.png", - "more": "more.png", "mormonmessages": "mormonmessages.png", "radio": "radio.png", "scriptures": "scriptures.png", + + "more": "more.png", "icon": "icon.png", + "nomagazineimage": "nomagazineimage.png", } def __init__(self, storePath, cachePath): 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 get_pixbuf_from_store(self, image): - path = os.path.join(self._storePath, 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)