From 4e1704fd6d735ac1284f13a775167fd8d777dd92 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Wed, 16 Apr 2014 16:45:03 -0400 Subject: [PATCH 1/6] added warning note, to help others not to waste 2 hours on a pygame bug on OSX --- doc/sources/installation/installation-macosx.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/sources/installation/installation-macosx.rst b/doc/sources/installation/installation-macosx.rst index 611f2a13e..708004a84 100644 --- a/doc/sources/installation/installation-macosx.rst +++ b/doc/sources/installation/installation-macosx.rst @@ -10,6 +10,9 @@ Installation on MacOSX components yourself. We suggest using `homebrew `_ to do that. + There can be a limitation on some OS X with more than one monitor. + The application will crash when you try to start it on the second monitor. + For Mac OS X 10.7 and later, we provide a Kivy.app with all dependencies bundled. Download it from our `Download Page `_. It comes as a .dmg From 510b4b18c868923992767cd9e117a74da8fbc85d Mon Sep 17 00:00:00 2001 From: tshirtman Date: Fri, 18 Apr 2014 13:16:14 +0200 Subject: [PATCH 2/6] add .jpe to the supported extensions for providers that supports jpeg As it seems to be an accepted extension for jpeg, guess_extension can return it, and make AsyncImage save the image to .jpe, which was breaking it. --- kivy/core/image/img_imageio.pyx | 7 ++++--- kivy/core/image/img_pil.py | 7 ++++--- kivy/core/image/img_pygame.py | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/kivy/core/image/img_imageio.pyx b/kivy/core/image/img_imageio.pyx index 498293fa2..1c6dfb12f 100644 --- a/kivy/core/image/img_imageio.pyx +++ b/kivy/core/image/img_imageio.pyx @@ -278,9 +278,10 @@ class ImageLoaderImageIO(ImageLoaderBase): # FIXME check which one are available on osx return ('bmp', 'bufr', 'cur', 'dcx', 'fits', 'fl', 'fpx', 'gbr', 'gd', 'gif', 'grib', 'hdf5', 'ico', 'im', 'imt', 'iptc', - 'jpeg', 'jpg', 'mcidas', 'mic', 'mpeg', 'msp', 'pcd', - 'pcx', 'pixar', 'png', 'ppm', 'psd', 'sgi', 'spider', - 'tga', 'tiff', 'wal', 'wmf', 'xbm', 'xpm', 'xv') + 'jpeg', 'jpg', 'jpe', 'mcidas', 'mic', 'mpeg', 'msp', + 'pcd', 'pcx', 'pixar', 'png', 'ppm', 'psd', 'sgi', + 'spider', 'tga', 'tiff', 'wal', 'wmf', 'xbm', 'xpm', + 'xv') def load(self, filename): # FIXME: if the filename is unicode, the loader is failing. diff --git a/kivy/core/image/img_pil.py b/kivy/core/image/img_pil.py index f3deb5e8e..051b897c5 100644 --- a/kivy/core/image/img_pil.py +++ b/kivy/core/image/img_pil.py @@ -40,9 +40,10 @@ class ImageLoaderPIL(ImageLoaderBase): # See http://www.pythonware.com/library/pil/handbook/index.htm return ('bmp', 'bufr', 'cur', 'dcx', 'fits', 'fl', 'fpx', 'gbr', 'gd', 'gif', 'grib', 'hdf5', 'ico', 'im', 'imt', 'iptc', - 'jpeg', 'jpg', 'mcidas', 'mic', 'mpeg', 'msp', 'pcd', - 'pcx', 'pixar', 'png', 'ppm', 'psd', 'sgi', 'spider', - 'tga', 'tiff', 'wal', 'wmf', 'xbm', 'xpm', 'xv') + 'jpeg', 'jpg', 'jpe', 'mcidas', 'mic', 'mpeg', 'msp', + 'pcd', 'pcx', 'pixar', 'png', 'ppm', 'psd', 'sgi', + 'spider', 'tga', 'tiff', 'wal', 'wmf', 'xbm', 'xpm', + 'xv') def _img_correct(self, _img_tmp): '''Convert image to the correct format and orientation. diff --git a/kivy/core/image/img_pygame.py b/kivy/core/image/img_pygame.py index 4b97a09a1..23c900634 100644 --- a/kivy/core/image/img_pygame.py +++ b/kivy/core/image/img_pygame.py @@ -28,7 +28,7 @@ class ImageLoaderPygame(ImageLoaderBase): return ('bmp', ) # Note to self:try to learn to use loader preferences instead- # of this- remove gif support from pygame - return ('jpg', 'jpeg', 'png', 'bmp', 'pcx', 'tga', 'tiff', + return ('jpg', 'jpeg', 'jpe', 'png', 'bmp', 'pcx', 'tga', 'tiff', 'tif', 'lbm', 'pbm', 'ppm', 'xpm') @staticmethod From 2cb8499e4581a94262e7c4e588e9d408e479f69b Mon Sep 17 00:00:00 2001 From: Matthew Einhorn Date: Fri, 18 Apr 2014 15:44:52 -0400 Subject: [PATCH 3/6] allow Observeable list asignemnt to VariableListProperty. Fixes #2079. From 92cf516579ee16f76d472dba94803e5055615418 Mon Sep 17 00:00:00 2001 From: Matthew Einhorn Date: Fri, 18 Apr 2014 15:46:38 -0400 Subject: [PATCH 4/6] allow Observeable list asignemnt to VariableListProperty. Fixes #2079. --- kivy/properties.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kivy/properties.pyx b/kivy/properties.pyx index 684e5a1ce..b2faea503 100644 --- a/kivy/properties.pyx +++ b/kivy/properties.pyx @@ -1280,7 +1280,7 @@ cdef class VariableListProperty(Property): return x tp = type(x) - if tp is list or tp is tuple: + if isinstance(x, (list, tuple)): l = len(x) if l == 1: y = self._convert_numeric(obj, x[0]) From 6924de107e4d217d4619bfe01aebb27a4ee40acb Mon Sep 17 00:00:00 2001 From: Matthew Einhorn Date: Fri, 18 Apr 2014 20:12:39 -0400 Subject: [PATCH 5/6] Don't include comments when binding kv properties. --- kivy/lang.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kivy/lang.py b/kivy/lang.py index 5f7275aee..a40dbc51c 100755 --- a/kivy/lang.py +++ b/kivy/lang.py @@ -919,6 +919,9 @@ class ParserRuleProperty(object): # now, detect obj.prop # first, remove all the string from the value tmp = sub(lang_str, '', value) + idx = tmp.find('#') + if idx != -1: + tmp = tmp[:idx] # detect key.value inside value, and split them wk = list(set(findall(lang_keyvalue, tmp))) if len(wk): From 2baee6668c669c65c2eaebb946cc4a06dd7b94c2 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Sat, 19 Apr 2014 15:02:34 +0100 Subject: [PATCH 6/6] Update vertex_instructions.pyx --- kivy/graphics/vertex_instructions.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kivy/graphics/vertex_instructions.pyx b/kivy/graphics/vertex_instructions.pyx index 7ac996d95..bad67f72d 100644 --- a/kivy/graphics/vertex_instructions.pyx +++ b/kivy/graphics/vertex_instructions.pyx @@ -370,7 +370,8 @@ cdef class Mesh(VertexInstruction): property mode: '''VBO Mode used for drawing vertices/indices. Can be one of 'points', - 'line_strip', 'line_loop', 'lines', 'triangle_strip' or 'triangle_fan'. + 'line_strip', 'line_loop', 'lines', 'triangles', 'triangle_strip' or + 'triangle_fan'. ''' def __get__(self): self.batch.get_mode()