From 433ac14704da4dba5d422aa41b91bc1311602481 Mon Sep 17 00:00:00 2001 From: 9and3r <9and3r@gmail.com> Date: Sat, 2 Aug 2014 12:53:50 +0200 Subject: [PATCH] Code cleanup --- mopidy_touchscreen/__init__.py | 6 +- mopidy_touchscreen/dynamic_background.py | 4 +- mopidy_touchscreen/fonts/icomoon/demo.html | 1158 ++++++++++---------- mopidy_touchscreen/library_screen.py | 26 +- mopidy_touchscreen/list_view.py | 21 +- mopidy_touchscreen/main_screen.py | 30 +- mopidy_touchscreen/menu_screen.py | 31 +- mopidy_touchscreen/playlist_screen.py | 4 +- mopidy_touchscreen/screen_manager.py | 27 +- mopidy_touchscreen/screen_objects.py | 19 +- mopidy_touchscreen/touch_manager.py | 3 - mopidy_touchscreen/touch_screen.py | 13 +- mopidy_touchscreen/touch_screen_backend.py | 7 +- mopidy_touchscreen/tracklist.py | 5 +- 14 files changed, 688 insertions(+), 666 deletions(-) diff --git a/mopidy_touchscreen/__init__.py b/mopidy_touchscreen/__init__.py index 02ae29d..8a3a245 100644 --- a/mopidy_touchscreen/__init__.py +++ b/mopidy_touchscreen/__init__.py @@ -3,11 +3,12 @@ from __future__ import unicode_literals import logging import os - from mopidy import config, ext + from .touch_screen import TouchScreen from .touch_screen_backend import TouchScreenBackend + __version__ = '0.1.0' # TODO: If you need to log, use loggers named after the current Python module @@ -15,7 +16,6 @@ logger = logging.getLogger(__name__) class Extension(ext.Extension): - dist_name = 'Mopidy-Touchscreen' ext_name = 'touchscreen' version = __version__ @@ -35,4 +35,6 @@ class Extension(ext.Extension): def setup(self, registry): registry.add('frontend', TouchScreen) + + #Backend used for controling volume registry.add('backend', TouchScreenBackend) \ No newline at end of file diff --git a/mopidy_touchscreen/dynamic_background.py b/mopidy_touchscreen/dynamic_background.py index 1417564..e4590ff 100644 --- a/mopidy_touchscreen/dynamic_background.py +++ b/mopidy_touchscreen/dynamic_background.py @@ -5,7 +5,6 @@ logger = logging.getLogger(__name__) class DynamicBackground(): - def __init__(self): self.current = get_valid_color() self.target = get_valid_color() @@ -23,7 +22,8 @@ class DynamicBackground(): self.target = get_valid_color() surface.fill(self.current) -#Returns an array with 3 integers in range of 0-255 + +# Returns an array with 3 integers in range of 0-255 #The sum of the three integers will be lower than 255*2 (510) to avoid very bright colors #White text should be seen ok with this background color diff --git a/mopidy_touchscreen/fonts/icomoon/demo.html b/mopidy_touchscreen/fonts/icomoon/demo.html index 255435b..1e63de2 100644 --- a/mopidy_touchscreen/fonts/icomoon/demo.html +++ b/mopidy_touchscreen/fonts/icomoon/demo.html @@ -1,585 +1,589 @@
- -Generated by IcoMoon
-Generated by IcoMoon
+