From fe299cbb1a2df7b52155e69bb0f2dc82c929cfeb Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Tue, 17 Mar 2015 01:37:15 +0100 Subject: [PATCH 01/14] core/audio: new pure-python/pyobjus AVFoundation audio player This extend our audio provider with a native provider, and supports far more format than the current sdl2 (mp3, ogg, wav). The full list is available at https://developer.apple.com/library/ios/documentation/MusicAudio/Concept ual/CoreAudioOverview/SupportedAudioFormatsMacOSX/SupportedAudioFormatsM acOSX.html --- kivy/__init__.py | 4 +- kivy/core/audio/__init__.py | 4 +- kivy/core/audio/audio_avplayer.py | 71 +++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 kivy/core/audio/audio_avplayer.py diff --git a/kivy/__init__.py b/kivy/__init__.py index 1ae994fc9..f1f086524 100644 --- a/kivy/__init__.py +++ b/kivy/__init__.py @@ -186,7 +186,9 @@ kivy_options = { 'video': ( 'gstplayer', 'ffmpeg', 'ffpyplayer', 'gi', 'pygst', 'pyglet', 'null'), - 'audio': ('gstplayer', 'pygame', 'gi', 'pygst', 'ffpyplayer', 'sdl2'), + 'audio': ( + 'gstplayer', 'pygame', 'gi', 'pygst', 'ffpyplayer', 'sdl2', + 'avplayer'), 'image': ('tex', 'imageio', 'dds', 'gif', 'sdl2', 'pygame', 'pil', 'ffpy'), 'camera': ('opencv', 'gi', 'pygst', 'videocapture', 'avfoundation'), 'spelling': ('enchant', 'osxappkit', ), diff --git a/kivy/core/audio/__init__.py b/kivy/core/audio/__init__.py index 84ffa3dc0..538cc4503 100644 --- a/kivy/core/audio/__init__.py +++ b/kivy/core/audio/__init__.py @@ -40,6 +40,7 @@ from kivy.compat import PY2 from kivy.resources import resource_find from kivy.properties import StringProperty, NumericProperty, OptionProperty, \ AliasProperty, BooleanProperty +from kivy.utils import platform from kivy.setupconfig import USE_SDL2 @@ -193,7 +194,8 @@ class Sound(EventDispatcher): # Little trick here, don't activate gstreamer on window # seem to have lot of crackle or something... audio_libs = [] - +if platform in ('macosx', 'ios'): + audio_libs += [('avplayer', 'audio_avplayer')] # from now on, prefer our gstplayer instead of gi/pygst. try: from kivy.lib.gstplayer import GstPlayer # NOQA diff --git a/kivy/core/audio/audio_avplayer.py b/kivy/core/audio/audio_avplayer.py new file mode 100644 index 000000000..09454e19a --- /dev/null +++ b/kivy/core/audio/audio_avplayer.py @@ -0,0 +1,71 @@ +''' +AudioAvplayer: implementation of Sound using pyobjus / AVFoundation. +Works on iOS / OSX. +''' + +__all__ = ('SoundAvplayer', ) + +from kivy.core.audio import Sound, SoundLoader +from pyobjus import autoclass +from pyobjus.dylib_manager import load_framework, INCLUDE +import sys + +load_framework(INCLUDE.AVFoundation) +AVAudioPlayer = autoclass("AVAudioPlayer") +NSURL = autoclass("NSURL") +NSString = autoclass("NSString") + + +class SoundAvplayer(Sound): + @staticmethod + def extensions(): + # taken from https://developer.apple.com/library/ios/documentation/MusicAudio/Conceptual/CoreAudioOverview/SupportedAudioFormatsMacOSX/SupportedAudioFormatsMacOSX.html + return ("aac", "adts", "aif", "aiff", "aifc", "caf", "mp3", "mp4", + "m4a", "snd", "au", "sd2", "wav") + + def __init__(self, **kwargs): + self._avplayer = None + super(SoundAvplayer, self).__init__(**kwargs) + + def load(self): + self.unload() + fn = NSString.alloc().initWithUTF8String_(self.filename) + url = NSURL.alloc().initFileURLWithPath_(fn) + self._avplayer = AVAudioPlayer.alloc().initWithContentsOfURL_error_(url, None) + + def unload(self): + self.stop() + self._avplayer = None + + def play(self): + if not self._avplayer: + return + self._avplayer.play() + super(SoundAvplayer, self).play() + + def stop(self): + if not self._avplayer: + return + self._avplayer.stop() + super(SoundAvplayer, self).stop() + + def seek(self, position): + if not self._avplayer: + return + self._avplayer.playAtTime_(float(position)) + + def get_pos(self): + if self._avplayer: + return self._avplayer.currentTime + return super(SoundAvplayer, self).get_pos() + + def on_volume(self, instance, volume): + if self._avplayer: + self._avplayer.volume = float(volume) + + def _get_length(self): + if self._avplayer: + return self._avplayer.duration + return super(SoundAvplayer, self)._get_length() + +SoundLoader.register(SoundAvplayer) From 4af4298a7fcd0e7959e56a1854cdeb3da47f1b82 Mon Sep 17 00:00:00 2001 From: Ryan Pessa Date: Wed, 1 Apr 2015 22:53:05 -0500 Subject: [PATCH 02/14] respect PYTHON var when running make test --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c5c899bba..2e975cf84 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ PYTHON = python CHECKSCRIPT = kivy/tools/pep8checker/pep8kivy.py KIVY_DIR = kivy/ -NOSETESTS = nosetests +NOSETESTS = $(PYTHON) -m nose.core KIVY_USE_DEFAULTCONFIG = 1 HOSTPYTHON = $(KIVYIOSROOT)/tmp/Python-$(PYTHON_VERSION)/hostpython From d7fb03cf9b9bfe7625f39b49c1a26ac1f932375b Mon Sep 17 00:00:00 2001 From: Ryan Pessa Date: Wed, 1 Apr 2015 22:54:37 -0500 Subject: [PATCH 03/14] fix popup weakref --- examples/demo/showcase/data/screens/popups.kv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo/showcase/data/screens/popups.kv b/examples/demo/showcase/data/screens/popups.kv index a120ccf28..8adb7856f 100644 --- a/examples/demo/showcase/data/screens/popups.kv +++ b/examples/demo/showcase/data/screens/popups.kv @@ -1,5 +1,5 @@ ShowcaseScreen: - popup: popup + popup: popup.__self__ fullscreen: True name: 'Popups' BoxLayout: From f2e8c6b901192adc7fcb8584ef5f688eb6ef6fc9 Mon Sep 17 00:00:00 2001 From: Ryan Pessa Date: Wed, 1 Apr 2015 22:56:19 -0500 Subject: [PATCH 04/14] skip bytes filename tests on py3 --- kivy/tests/test_filechooser_unicode.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/kivy/tests/test_filechooser_unicode.py b/kivy/tests/test_filechooser_unicode.py index af132d341..f3c8bdb97 100644 --- a/kivy/tests/test_filechooser_unicode.py +++ b/kivy/tests/test_filechooser_unicode.py @@ -44,7 +44,7 @@ class FileChooserUnicodeTestCase(unittest.TestCase): \xc3\xa0\xc2\xa4\xc2\xb5\xc3\xa0\xc2\xa5\xe2\x82\xactestb', b'oor\xff\xff\xff\xff\xee\xfe\xef\x81\x8D\x99testb'] self.ufiles = [join(basepathu, f) for f in ufiles] - self.bfiles = [join(basepathb, f) for f in bfiles] + self.bfiles = [join(basepathb, f) for f in bfiles] if PY2 else [] if not os.path.isdir(basepathu): os.mkdir(basepathu) for f in self.ufiles: @@ -79,11 +79,13 @@ class FileChooserUnicodeTestCase(unittest.TestCase): # unicode encoding to be able to compare to returned unicode for f in self.exitsfiles: self.assertIn(f, files) - wid = FileChooserListView(path=self.basepathb) - Clock.tick() - files = [join(self.basepathb, f) for f in wid.files] - for f in self.bfiles: - self.assertIn(f, files) + + if PY2: + wid = FileChooserListView(path=self.basepathb) + Clock.tick() + files = [join(self.basepathb, f) for f in wid.files] + for f in self.bfiles: + self.assertIn(f, files) def tearDown(self): if self.skip_test: From 7c5b1dc7c50a67079a41f27b1cea1a652119a7bc Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Thu, 2 Apr 2015 13:07:40 +0200 Subject: [PATCH 05/14] bump to 1.9 --- kivy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kivy/__init__.py b/kivy/__init__.py index 388628565..92823c8e7 100644 --- a/kivy/__init__.py +++ b/kivy/__init__.py @@ -28,7 +28,7 @@ __all__ = ( 'kivy_config_fn', 'kivy_usermodules_dir', ) -__version__ = '1.9.0-dev' +__version__ = '1.9.0' import sys import shutil From 97c596d8022c8160f04f85b0f0c94beaa6f0d0a1 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Thu, 2 Apr 2015 13:08:32 +0200 Subject: [PATCH 06/14] bump to 1.9.1-dev --- kivy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kivy/__init__.py b/kivy/__init__.py index 92823c8e7..66b339af9 100644 --- a/kivy/__init__.py +++ b/kivy/__init__.py @@ -28,7 +28,7 @@ __all__ = ( 'kivy_config_fn', 'kivy_usermodules_dir', ) -__version__ = '1.9.0' +__version__ = '1.9.1-dev' import sys import shutil From a0b20c9bfe2c1b65d90c7143d8adbf1c61d1e419 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Thu, 2 Apr 2015 21:03:49 +0000 Subject: [PATCH 07/14] Syncing packaging files for Debian/Ubuntu for 1.9.0 --- .../linux/debian/python-kivy-bin.install | 9 ++- .../linux/debian/python-kivy.install | 42 +++++++---- .../linux/debian/python3-kivy-bin.install | 9 ++- .../linux/debian/python3-kivy.install | 72 ++++++++++++++----- 4 files changed, 100 insertions(+), 32 deletions(-) diff --git a/kivy/tools/packaging/linux/debian/python-kivy-bin.install b/kivy/tools/packaging/linux/debian/python-kivy-bin.install index e8ec83ed0..7a079475d 100644 --- a/kivy/tools/packaging/linux/debian/python-kivy-bin.install +++ b/kivy/tools/packaging/linux/debian/python-kivy-bin.install @@ -1,2 +1,9 @@ usr/lib/python2.7/dist-packages/kivy/*.so -usr/lib/python2.7/dist-packages/kivy/graphics/*.so \ No newline at end of file +usr/lib/python2.7/dist-packages/kivy/core/clipboard/*.so +usr/lib/python2.7/dist-packages/kivy/graphics/*.so +usr/lib/python2.7/dist-packages/kivy/core/audio/*.so +usr/lib/python2.7/dist-packages/kivy/core/image/*.so +usr/lib/python2.7/dist-packages/kivy/core/text/*.so +usr/lib/python2.7/dist-packages/kivy/core/text/*.so +usr/lib/python2.7/dist-packages/kivy/core/window/*.so +usr/lib/python2.7/dist-packages/kivy/lib/gstplayer/*.so \ No newline at end of file diff --git a/kivy/tools/packaging/linux/debian/python-kivy.install b/kivy/tools/packaging/linux/debian/python-kivy.install index a996e3759..120bcc108 100644 --- a/kivy/tools/packaging/linux/debian/python-kivy.install +++ b/kivy/tools/packaging/linux/debian/python-kivy.install @@ -1,21 +1,35 @@ usr/lib/python2.7/dist-packages/Kivy-*.egg-info -usr/lib/python2.7/dist-packages/kivy/*.py -usr/lib/python2.7/dist-packages/kivy/*.pyc +usr/lib/python2.7/dist-packages/kivy/*.py* usr/lib/python2.7/dist-packages/kivy/*.pxd -usr/lib/python2.7/dist-packages/kivy/adapters/* -usr/lib/python2.7/dist-packages/kivy/core/* -usr/lib/python2.7/dist-packages/kivy/effects/* -usr/lib/python2.7/dist-packages/kivy/ext/* -usr/lib/python2.7/dist-packages/kivy/extras/* +usr/lib/python2.7/dist-packages/kivy/adapters/*.py* +usr/lib/python2.7/dist-packages/kivy/core/*.py* +usr/lib/python2.7/dist-packages/kivy/core/audio/*.py* +usr/lib/python2.7/dist-packages/kivy/core/camera/*.py* +usr/lib/python2.7/dist-packages/kivy/core/clipboard/*.py* +usr/lib/python2.7/dist-packages/kivy/core/gl/*.py* +usr/lib/python2.7/dist-packages/kivy/core/image/*.py* +usr/lib/python2.7/dist-packages/kivy/core/spelling/*.py* +usr/lib/python2.7/dist-packages/kivy/core/text/*.py* +usr/lib/python2.7/dist-packages/kivy/core/text/*.pxd +usr/lib/python2.7/dist-packages/kivy/core/video/*.py* +usr/lib/python2.7/dist-packages/kivy/core/window/*.py* +usr/lib/python2.7/dist-packages/kivy/effects/*.py* +usr/lib/python2.7/dist-packages/kivy/ext/*.py* +usr/lib/python2.7/dist-packages/kivy/extras/*.py* usr/lib/python2.7/dist-packages/kivy/garden/*.py* usr/lib/python2.7/dist-packages/kivy/graphics/config.h usr/lib/python2.7/dist-packages/kivy/graphics/*.py* usr/lib/python2.7/dist-packages/kivy/graphics/*.pxd usr/lib/python2.7/dist-packages/kivy/graphics/*.pxi -usr/lib/python2.7/dist-packages/kivy/input -usr/lib/python2.7/dist-packages/kivy/lib -usr/lib/python2.7/dist-packages/kivy/modules -usr/lib/python2.7/dist-packages/kivy/network -usr/lib/python2.7/dist-packages/kivy/uix - -usr/lib/python2.7/dist-packages/kivy/storage +usr/lib/python2.7/dist-packages/kivy/input/*.py* +usr/lib/python2.7/dist-packages/kivy/input/postproc/*.py* +usr/lib/python2.7/dist-packages/kivy/input/providers/*.py* +usr/lib/python2.7/dist-packages/kivy/lib/*.py* +usr/lib/python2.7/dist-packages/kivy/lib/gstplayer/*.py* +usr/lib/python2.7/dist-packages/kivy/lib/osc/*.py* +usr/lib/python2.7/dist-packages/kivy/lib/vidcore_lite/*.py* +usr/lib/python2.7/dist-packages/kivy/lib/vidcore_lite/*.pxd +usr/lib/python2.7/dist-packages/kivy/modules/*.py* +usr/lib/python2.7/dist-packages/kivy/network/*.py* +usr/lib/python2.7/dist-packages/kivy/storage/*.py* +usr/lib/python2.7/dist-packages/kivy/uix/*.py* diff --git a/kivy/tools/packaging/linux/debian/python3-kivy-bin.install b/kivy/tools/packaging/linux/debian/python3-kivy-bin.install index db9595da8..4874c3160 100644 --- a/kivy/tools/packaging/linux/debian/python3-kivy-bin.install +++ b/kivy/tools/packaging/linux/debian/python3-kivy-bin.install @@ -1,2 +1,9 @@ usr/lib/python3/dist-packages/kivy/*.so -usr/lib/python3/dist-packages/kivy/graphics/*.so \ No newline at end of file +usr/lib/python3/dist-packages/kivy/core/clipboard/*.so +usr/lib/python3/dist-packages/kivy/graphics/*.so +usr/lib/python3/dist-packages/kivy/core/audio/*.so +usr/lib/python3/dist-packages/kivy/core/image/*.so +usr/lib/python3/dist-packages/kivy/core/text/*.so +usr/lib/python3/dist-packages/kivy/core/text/*.so +usr/lib/python3/dist-packages/kivy/core/window/*.so +usr/lib/python3/dist-packages/kivy/lib/gstplayer/*.so \ No newline at end of file diff --git a/kivy/tools/packaging/linux/debian/python3-kivy.install b/kivy/tools/packaging/linux/debian/python3-kivy.install index 98fef6328..d0252851b 100644 --- a/kivy/tools/packaging/linux/debian/python3-kivy.install +++ b/kivy/tools/packaging/linux/debian/python3-kivy.install @@ -1,24 +1,64 @@ usr/lib/python3/dist-packages/Kivy-*.egg-info -usr/lib/python3/dist-packages/kivy/*.py +usr/lib/python3/dist-packages/kivy/*.py* usr/lib/python3/dist-packages/kivy/*.pxd -usr/lib/python3/dist-packages/kivy/__pycache__/*.pyc -usr/lib/python3/dist-packages/kivy/adapters/* -usr/lib/python3/dist-packages/kivy/core/* -usr/lib/python3/dist-packages/kivy/effects/* -usr/lib/python3/dist-packages/kivy/ext/* -usr/lib/python3/dist-packages/kivy/extras/* +usr/lib/python3/dist-packages/kivy/adapters/*.py* +usr/lib/python3/dist-packages/kivy/core/*.py* +usr/lib/python3/dist-packages/kivy/core/audio/*.py* +usr/lib/python3/dist-packages/kivy/core/camera/*.py* +usr/lib/python3/dist-packages/kivy/core/clipboard/*.py* +usr/lib/python3/dist-packages/kivy/core/gl/*.py* +usr/lib/python3/dist-packages/kivy/core/image/*.py* +usr/lib/python3/dist-packages/kivy/core/spelling/*.py* +usr/lib/python3/dist-packages/kivy/core/text/*.py* +usr/lib/python3/dist-packages/kivy/core/text/*.pxd +usr/lib/python3/dist-packages/kivy/core/video/*.py* +usr/lib/python3/dist-packages/kivy/core/window/*.py* +usr/lib/python3/dist-packages/kivy/effects/*.py* +usr/lib/python3/dist-packages/kivy/ext/*.py* +usr/lib/python3/dist-packages/kivy/extras/*.py* usr/lib/python3/dist-packages/kivy/garden/*.py* -usr/lib/python3/dist-packages/kivy/garden/__pycache__/*.pyc usr/lib/python3/dist-packages/kivy/graphics/config.h usr/lib/python3/dist-packages/kivy/graphics/*.py* usr/lib/python3/dist-packages/kivy/graphics/*.pxd usr/lib/python3/dist-packages/kivy/graphics/*.pxi -usr/lib/python3/dist-packages/kivy/graphics/__pycache__/*.pyc -usr/lib/python3/dist-packages/kivy/input -usr/lib/python3/dist-packages/kivy/lib -usr/lib/python3/dist-packages/kivy/modules -usr/lib/python3/dist-packages/kivy/network -usr/lib/python3/dist-packages/kivy/uix +usr/lib/python3/dist-packages/kivy/input/*.py* +usr/lib/python3/dist-packages/kivy/input/postproc/*.py* +usr/lib/python3/dist-packages/kivy/input/providers/*.py* +usr/lib/python3/dist-packages/kivy/lib/*.py* +usr/lib/python3/dist-packages/kivy/lib/gstplayer/*.py* +usr/lib/python3/dist-packages/kivy/lib/osc/*.py* +usr/lib/python3/dist-packages/kivy/lib/vidcore_lite/*.py* +usr/lib/python3/dist-packages/kivy/lib/vidcore_lite/*.pxd +usr/lib/python3/dist-packages/kivy/modules/*.py* +usr/lib/python3/dist-packages/kivy/network/*.py* +usr/lib/python3/dist-packages/kivy/storage/*.py* +usr/lib/python3/dist-packages/kivy/uix/*.py* -usr/lib/python3/dist-packages/kivy/storage/* -usr/lib/python3/dist-packages/kivy/storage/__pycache__/* +usr/lib/python3/dist-packages/kivy/adapters/__pycache__ +usr/lib/python3/dist-packages/kivy/lib/vidcore_lite/__pycache__ +usr/lib/python3/dist-packages/kivy/lib/__pycache__ +usr/lib/python3/dist-packages/kivy/lib/osc/__pycache__ +usr/lib/python3/dist-packages/kivy/lib/gstplayer/__pycache__ +usr/lib/python3/dist-packages/kivy/storage/__pycache__ +usr/lib/python3/dist-packages/kivy/uix/__pycache__ +usr/lib/python3/dist-packages/kivy/network/__pycache__ +usr/lib/python3/dist-packages/kivy/__pycache__ +usr/lib/python3/dist-packages/kivy/modules/__pycache__ +usr/lib/python3/dist-packages/kivy/effects/__pycache__ +usr/lib/python3/dist-packages/kivy/input/__pycache__ +usr/lib/python3/dist-packages/kivy/input/postproc/__pycache__ +usr/lib/python3/dist-packages/kivy/input/providers/__pycache__ +usr/lib/python3/dist-packages/kivy/garden/__pycache__ +usr/lib/python3/dist-packages/kivy/extras/__pycache__ +usr/lib/python3/dist-packages/kivy/core/__pycache__ +usr/lib/python3/dist-packages/kivy/core/image/__pycache__ +usr/lib/python3/dist-packages/kivy/core/text/__pycache__ +usr/lib/python3/dist-packages/kivy/core/camera/__pycache__ +usr/lib/python3/dist-packages/kivy/core/video/__pycache__ +usr/lib/python3/dist-packages/kivy/core/clipboard/__pycache__ +usr/lib/python3/dist-packages/kivy/core/gl/__pycache__ +usr/lib/python3/dist-packages/kivy/core/audio/__pycache__ +usr/lib/python3/dist-packages/kivy/core/window/__pycache__ +usr/lib/python3/dist-packages/kivy/core/spelling/__pycache__ +usr/lib/python3/dist-packages/kivy/ext/__pycache__ +usr/lib/python3/dist-packages/kivy/graphics/__pycache__ \ No newline at end of file From 3403110ed52fe88b4ae3f5305ccac95302382ff1 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Fri, 3 Apr 2015 07:16:00 +0000 Subject: [PATCH 08/14] No need to have python3-pygame installed Removing this section in the docs --- doc/sources/installation/installation-linux.rst | 7 ------- 1 file changed, 7 deletions(-) diff --git a/doc/sources/installation/installation-linux.rst b/doc/sources/installation/installation-linux.rst index 4efebc9fa..bf12a8ba5 100644 --- a/doc/sources/installation/installation-linux.rst +++ b/doc/sources/installation/installation-linux.rst @@ -11,13 +11,6 @@ For installing distribution relative packages .deb/.rpm/... Ubuntu / Kubuntu / Xubuntu / Lubuntu (Saucy and above) -------------------------------------------------------- -0. In case you want to use Python3, add this Pygame PPA before - - ``$ sudo add-apt-repository ppa:thopiekar/pygame`` - - ** These Pygame packages are neither provided nor supported by the Kivy project. - ** Please contact the creator of the package(s) or maintainer of the sourcecode for further help. - #. Add one of the PPAs as you prefer :stable builds: From 240ce422a08678981a4883a7cbb3c3232c874b0e Mon Sep 17 00:00:00 2001 From: Zen-CODE Date: Sat, 4 Apr 2015 17:58:01 +0200 Subject: [PATCH 09/14] doc: tweaks to examples/demo/multistroke/main.py --- examples/demo/multistroke/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/demo/multistroke/main.py b/examples/demo/multistroke/main.py index 081d78694..38e79a321 100644 --- a/examples/demo/multistroke/main.py +++ b/examples/demo/multistroke/main.py @@ -11,11 +11,11 @@ name the gesture, and add it to the database, then simliar gestures in the future will be recognized. You can load and save databases of gestures in .kg files. -This demonstration code is many files, with this being the primary file. +This demonstration code spans many files, with this being the primary file. The information pop-up ('No match') comes from the file helpers.py. The history pane is managed in the file historymanager.py and described in the file historymanager.kv. The database pane and storage is managed in -the file gestureDatabase.py and the described in the file gestureDatabase.kv. +the file gestureDatabase.py and the described in the file gestureDatabase.kv. The general logic of the sliders and buttons are in the file settings.py and described in settings.kv. but the actual settings pane is described in the file multistroke.kv and managed from this file. From 4fb96f0c7b97e2cc2b0c2a29df284b34759931d6 Mon Sep 17 00:00:00 2001 From: Zen-CODE Date: Sat, 4 Apr 2015 18:01:52 +0200 Subject: [PATCH 10/14] doc: tweaks to examples/demo/pictures/main.py --- examples/demo/pictures/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo/pictures/main.py b/examples/demo/pictures/main.py index 13dfb9631..b5e3bf4d7 100755 --- a/examples/demo/pictures/main.py +++ b/examples/demo/pictures/main.py @@ -11,7 +11,7 @@ photos. The photos are loaded from the local images directory, while the background picture is from the data shipped with kivy in kivy/data/images/background.jpg. The file pictures.kv describes the interface and the file shadow32.png is -the boarder to make the images looks like framed photographs. Finally, +the border to make the images look like framed photographs. Finally, the file android.txt is used to package the application for use with the Kivy Launcher Android application. From 509f160fa808391a314fcb134e9b144bfc27512e Mon Sep 17 00:00:00 2001 From: Zen-CODE Date: Sat, 4 Apr 2015 18:09:04 +0200 Subject: [PATCH 11/14] doc: tweaks to examples/demo/showcase/main.py --- examples/demo/showcase/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/demo/showcase/main.py b/examples/demo/showcase/main.py index 4fb8ca0b3..fcd8fdd85 100755 --- a/examples/demo/showcase/main.py +++ b/examples/demo/showcase/main.py @@ -9,7 +9,7 @@ first demonstration is the accordion layout. You can see, but not edit, the kv language code for any screen by pressing the bug or 'show source' icon. Scroll through the demonstrations using the left and right icons in the top right or selecting from the menu -bar. This showcases dozens of features. +bar. The file showcase.kv describes the main container, while each demonstration pane is described in a separate .kv file in the data/screens directory. From 5474ea1d99d26ac4b1a742ee8e9c3d774df31818 Mon Sep 17 00:00:00 2001 From: Zen-CODE Date: Sat, 4 Apr 2015 18:37:32 +0200 Subject: [PATCH 12/14] doc: tweaks to examples/demo/touchdtracer/main.py --- examples/demo/touchtracer/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/demo/touchtracer/main.py b/examples/demo/touchtracer/main.py index 3fc8cc97a..c97a7e190 100755 --- a/examples/demo/touchtracer/main.py +++ b/examples/demo/touchtracer/main.py @@ -3,15 +3,15 @@ Touch Tracer Line Drawing Demonstration ======================================= -The demonstrates tracking each touch registered to a device. You should +This demonstrates tracking each touch registered to a device. You should see a basic background image. When you press and hold the mouse, you -should see a cross-hairs with the coordinates written next to them. As +should see cross-hairs with the coordinates written next to them. As you drag, it leaves a trail. Additional information, like pressure, will be shown if they are in your device's touch.profile. This program specifies an icon, the file icon.png, in its App subclass. -It also uses the particle.png file as source for drawing the trails, which -white on transparent. The file touchtracer.kv describes the application. +It also uses the particle.png file as the source for drawing the trails which +are white on transparent. The file touchtracer.kv describes the application. The file android.txt is used to package the application for use with the Kivy Launcher Android application. For Android devices, you can From 886187117e774f3e9d33908d7317c07bf3bedce6 Mon Sep 17 00:00:00 2001 From: Ryan Pessa Date: Sat, 4 Apr 2015 15:33:55 -0500 Subject: [PATCH 13/14] fix py3 builds --- kivy/tools/packaging/linux/debian/rules | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) mode change 100644 => 100755 kivy/tools/packaging/linux/debian/rules diff --git a/kivy/tools/packaging/linux/debian/rules b/kivy/tools/packaging/linux/debian/rules old mode 100644 new mode 100755 index e2f03febc..6d3eb82f8 --- a/kivy/tools/packaging/linux/debian/rules +++ b/kivy/tools/packaging/linux/debian/rules @@ -13,16 +13,16 @@ export DH_VERBOSE=1 dh $@ --with python2,python3 override_dh_auto_build: + rm -rf $(CURDIR)/debian/tmp-build for PYX in $(shell pyversions -i) $(shell py3versions -r) ; do \ + $(MAKE) clean; \ $(MAKE) build PYTHON=$$PYX; \ - done - - cd doc && PYTHONPATH=.. make html + $(MAKE) install PYTHON=$$PYX INSTALL_ROOT=$(CURDIR)/debian/tmp-build INSTALL_PREFIX=/usr INSTALL_LAYOUT=deb; \ + done; \ + cd doc && PYTHONPATH=.. make PYTHON=$$PYX html override_dh_auto_install: - for PYX in $(shell pyversions -i) $(shell py3versions -r) ; do \ - $(MAKE) install PYTHON=$$PYX INSTALL_ROOT=$(CURDIR)/debian/tmp INSTALL_PREFIX=/usr INSTALL_LAYOUT=deb; \ - done + mv $(CURDIR)/debian/tmp-build $(CURDIR)/debian/tmp override_dh_auto_test: #xvfb-run -s "+extension GLX" dh_auto_test From 2684b4f08ad0255089c2f492a5b2534cbb085d96 Mon Sep 17 00:00:00 2001 From: akshayaurora Date: Mon, 6 Apr 2015 02:10:13 +0530 Subject: [PATCH 14/14] sdl2:Window: Introduce keycodes swaps for numpad keys --- kivy/core/window/window_sdl2.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/kivy/core/window/window_sdl2.py b/kivy/core/window/window_sdl2.py index 8979a21c5..9fd347171 100644 --- a/kivy/core/window/window_sdl2.py +++ b/kivy/core/window/window_sdl2.py @@ -58,6 +58,22 @@ SDLK_SUPER = 1073742051 SDLK_CAPS = 1073741881 SDLK_INSERT = 1073741897 SDLK_KEYPADNUM = 1073741907 +SDLK_KP_DEVIDE = 1073741908 +SDLK_KP_MULTIPLY = 1073741909 +SDLK_KP_MINUS = 1073741910 +SDLK_KP_PLUS = 1073741911 +SDLK_KP_ENTER = 1073741912 +SDLK_KP_1 = 1073741913 +SDLK_KP_2 = 1073741914 +SDLK_KP_3 = 1073741915 +SDLK_KP_4 = 1073741916 +SDLK_KP_5 = 1073741917 +SDLK_KP_6 = 1073741918 +SDLK_KP_7 = 1073741919 +SDLK_KP_8 = 1073741920 +SDLK_KP_9 = 1073741921 +SDLK_KP_0 = 1073741922 +SDLK_KP_DOT = 1073741923 SDLK_F1 = 1073741882 SDLK_F2 = 1073741883 SDLK_F3 = 1073741884 @@ -416,7 +432,11 @@ class WindowSDL(WindowBase): SDLK_F2: 283, SDLK_F3: 284, SDLK_F4: 285, SDLK_F5: 286, SDLK_F6: 287, SDLK_F7: 288, SDLK_F8: 289, SDLK_F9: 290, SDLK_F10: 291, SDLK_F11: 292, SDLK_F12: 293, SDLK_F13: 294, - SDLK_F14: 295, SDLK_F15: 296, SDLK_KEYPADNUM: 300} + SDLK_F14: 295, SDLK_F15: 296, SDLK_KEYPADNUM: 300, SDLK_KP_DEVIDE: 267, + SDLK_KP_MULTIPLY: 268, SDLK_KP_MINUS: 269, SDLK_KP_PLUS: 270, + SDLK_KP_ENTER: 271, SDLK_KP_DOT: 266, SDLK_KP_0: 256, SDLK_KP_1: 257, + SDLK_KP_2: 258, SDLK_KP_3: 259, SDLK_KP_4: 260, SDLK_KP_5: 261, + SDLK_KP_6: 262, SDLK_KP_7: 263, SDLK_KP_8: 264, SDLK_KP_9:265 } if platform == 'ios': # XXX ios keyboard suck, when backspace is hit, the delete