[Sugar-devel] [PATCH] Pippy: remove slideshow until it is fixed #2054

Anish Mangal anishmangal2002 at gmail.com
Mon Jul 12 06:06:15 EDT 2010


On Tue, Jun 22, 2010 at 8:48 AM, James Cameron <quozl at laptop.org> wrote:
> From b599e9842eb6bca119e08b100b4602d328a48fe0 Mon Sep 17 00:00:00 2001
> From: James Cameron <quozl at laptop.org>
> Date: Tue, 22 Jun 2010 13:16:54 +1000
> Subject: [PATCH] remove broken slideshow until it is fixed #2054
>
> ---
>  data/graphics/slideshow |   66 -----------------------------------------------
>  1 files changed, 0 insertions(+), 66 deletions(-)
>  delete mode 100644 data/graphics/slideshow
>
> diff --git a/data/graphics/slideshow b/data/graphics/slideshow
> deleted file mode 100644
> index 7ddd58b..0000000
> --- a/data/graphics/slideshow
> +++ /dev/null
> @@ -1,66 +0,0 @@
> -# slideshow: show datastore photos
> -
> -# FIXME: does not currently work, because no objects are returned by
> -# the journal query.
> -
> -def pippy_activity_class(): return 'activity.PyGameActivity'
> -if __name__ == '__main__':
> -  import gst, pippy, pygame, sys, time
> -  from pippy import query
> -
> -  from random import *
> -
> -  # grey background
> -  bgcolor = (128, 128, 128)
> -
> -  # Create a search dict
> -  search = {}
> -  search["mime_type"] = "image/jpeg"
> -
> -  # Perform the search and retrieve the jobjects
> -  results = query.find(search)
> -  # XXX: Fix caching limit in query.py
> -  objects = results.read(15)
> -
> -  if len(objects) == 0:
> -    print "No photos found."
> -    time.sleep(3)
> -    sys.exit()
> -
> -  def get_image():
> -    for jobject in objects:
> -      yield jobject.get_file_path()
> -
> -  next_image = get_image()
> -
> -  # pygame always needs to be initialized as the first call
> -  pygame.init()
> -
> -  # turn off cursor
> -  pygame.mouse.set_visible(False)
> -
> -  # create the pygame window and return a Surface object for
> -  # drawing in that window.
> -  screen = pygame.display.set_mode()
> -
> -  # load in previously grabbed frame
> -  image = pygame.image.load(next_image.next())
> -
> -  while pippy.pygame.next_frame():
> -    for event in pygame.event.get():
> -      if event.type == pygame.QUIT: sys.exit()
> -      elif event.type == pygame.KEYDOWN:
> -        try:
> -          image = pygame.image.load(next_image.next())
> -        except StopIteration:
> -          sys.exit()
> -
> -    # Scale up from 640x480 -> 1280x960
> -    newImage = pygame.transform.rotozoom(image, 0, 2.0)
> -    newImageRect = newImage.get_rect()
> -    newImageRect.centerx = screen.get_rect().centerx
> -    newImageRect.centery = screen.get_rect().centery
> -
> -    screen.fill(bgcolor)
> -    screen.blit(newImage, newImageRect)
> -    pygame.display.flip()
> --
> 1.7.1
>
>
> --
> James Cameron
> http://quozl.linux.org.au/
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>

Reviewed-By: Anish Mangal <anish at sugarlabs.org>
Acked-By: Anish Mangal <anish at sugarlabs.org>


More information about the Sugar-devel mailing list