Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorent <florent.pigout@gmail.com>2011-04-28 23:20:48 (GMT)
committer florent <florent.pigout@gmail.com>2011-04-28 23:20:48 (GMT)
commitd27938e59d0e43380c808b8be9f271a488ceebad (patch)
tree329a98686fa224e2f6bffbb7fbb6f116a545b4e6
parent43fe18a121c37bcbce1e66fce0d805d60281616d (diff)
small refactoring: remove unused code
-rw-r--r--atoidejouer/ui/screens.py25
1 files changed, 4 insertions, 21 deletions
diff --git a/atoidejouer/ui/screens.py b/atoidejouer/ui/screens.py
index ad9c1bd..ac1bf59 100644
--- a/atoidejouer/ui/screens.py
+++ b/atoidejouer/ui/screens.py
@@ -37,7 +37,7 @@ COLOR_WHITE = ui.get_color(1.0, 1.0, 1.0)
def _on_drag_finish(image, event, scene, sequence_name, frame, filename,
- image_size, scene_size):
+ image_size):
# get align values
_a_x, _a_y = scene._reverse_x_y(image_size, (image.x, image.y))
# update keys
@@ -253,21 +253,6 @@ class ScreenStory(graphics.Scene):
# ..
return _scene_with, _scene_height
- def __get_offset(self, scene_size):
- # ..
- _s_with, _s_height = scene_size
- # ..
- _o_x = float(self._screen_width - _s_with) / 2
- _o_y = float(self._screen_height - _s_height) / 2
- # DEBUG
- logger.debug('[screens] __get_offset - self._screen_width: %s' % self._screen_width)
- logger.debug('[screens] __get_offset - self._screen_height: %s' % self._screen_height)
- logger.debug('[screens] __get_offset - _s_with: %s' % _s_with)
- logger.debug('[screens] __get_offset - _s_height: %s' % _s_height)
- # DEBUG
- # ..
- return _o_x, _o_y - 46
-
def __refresh_default(self, default_name):
_code = '__%s' % default_name
# ensure current image
@@ -364,15 +349,13 @@ class ScreenStory(graphics.Scene):
_image = graphics.Image(_path, x=_x, y=_y, scale_x=_scale,
scale_y=_scale, z_order=_z_order, draggable=draggable)
# connect drag
- if self._set_canvas is True:
+ if self._set_canvas is True\
+ or self._type != 'graphics':
pass
else:
# ..
- _scene_size = self.__get_scene_size()
- _offset = self.__get_offset(_scene_size)
- # ..
_image.connect('on-drag-finish', _on_drag_finish, self, sequence_name,
- frame, filename, _offset, (_new_w, _new_h), _scene_size)
+ frame, filename, _offset, (_new_w, _new_h))
# connect on click
if sequence_name is None:
pass