From 004cab1aaf29666fc1fa52be994ccaaaed4f5000 Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Thu, 29 Apr 2010 22:34:42 +0200 Subject: [PATCH] Remove Maemo-specific anti-blanking code --- src/panucci/main.py | 17 ----------------- src/panucci/settings.py | 1 - src/panucci/util.py | 13 ------------- 3 files changed, 31 deletions(-) diff --git a/src/panucci/main.py b/src/panucci/main.py index 6362e80..fc5f84f 100644 --- a/src/panucci/main.py +++ b/src/panucci/main.py @@ -252,10 +252,6 @@ class PanucciGUI(object): self.main_window.connect('key-press-event', self.on_key_press) player.playlist.register( 'file_queued', self.on_file_queued ) - self.__anti_blank_timer = None - #settings.register('allow_blanking_changed',self.__set_anti_blank_timer) - self.__set_anti_blank_timer( settings.allow_blanking ) - player.playlist.register( 'playlist-to-be-overwritten', self.check_queue ) self.__player_tab.register( 'select-current-item-request', @@ -505,19 +501,6 @@ class PanucciGUI(object): if event == 'ButtonPressed' and button == 'phone': player.play_pause_toggle() - def __set_anti_blank_timer(self, allow_blanking): - if util.platform.MAEMO: - if allow_blanking and self.__anti_blank_timer is not None: - self.__log.info('Screen blanking enabled.') - gobject.source_remove(self.__anti_blank_timer) - self.__anti_blank_timer = None - elif not allow_blanking and self.__anti_blank_timer is None: - self.__log.info('Attempting to disable screen blanking.') - self.__anti_blank_timer = gobject.timeout_add( - 1000 * 59, util.poke_backlight ) - else: - self.__log.info('Blanking controls are for Maemo only.') - def __select_current_item( self ): # Select the currently playing track in the playlist tab # and switch to it (so we can edit bookmarks, etc.. there) diff --git a/src/panucci/settings.py b/src/panucci/settings.py index da3a0dd..ae5d73d 100644 --- a/src/panucci/settings.py +++ b/src/panucci/settings.py @@ -24,7 +24,6 @@ import logging import panucci DEFAULTS = { - 'allow_blanking' : True, 'dual_action_button_delay' : 0.5, 'enable_dual_action_btn' : True, 'last_folder' : '~', diff --git a/src/panucci/util.py b/src/panucci/util.py index 5cec170..a2a0257 100644 --- a/src/panucci/util.py +++ b/src/panucci/util.py @@ -163,19 +163,6 @@ def notify( msg, title='Panucci' ): return msg -def poke_backlight(): - """ Prevents the backlight from turning off (screen blanking). - Note: this needs to be called once a minute to be effective """ - - if have_osso: - dev = osso.DeviceState(osso.Context('ScreenManager', '0.0.1', False)) - dev.display_blanking_pause() - elif platform.MAEMO: - __log.info('Please install python2.5-osso for backlight ctl support.') - return False - - return True - def get_logfile(): if platform.MAEMO: f = '~/MyDocs/panucci.log' -- 2.11.4.GIT