Author: dmeyer
Date: Mon Jan 29 19:41:39 2007
New Revision: 9073
Modified:
trunk/ui/share/freevo_config.py
trunk/ui/src/gui/areas/listing_area.py
trunk/ui/src/input/plugins/sdl.py
Log:
remove mouse support (never worked as it should)
Modified: trunk/ui/share/freevo_config.py
==============================================================================
--- trunk/ui/share/freevo_config.py (original)
+++ trunk/ui/share/freevo_config.py Mon Jan 29 19:41:39 2007
@@ -117,14 +117,6 @@
DIRECTFB_MAP = input.DIRECTFB_MAP
#
-# Basic mouse support. It still needs much work and isn't working very
-# good. E.g. you can't go a menu back, popups won't work and inside the
-# player you have no control. Activate this if you want to help in the
-# development of this feature. This only works when using sdl as gui engine.
-#
-INPUT_MOUSE_SUPPORT = 0
-
-#
# Use Internet resources to fetch information?
# For example, Freevo can use CDDB for album information,
# the IMDB movie database for movie info, and Amazon for cover searches.
Modified: trunk/ui/src/gui/areas/listing_area.py
==============================================================================
--- trunk/ui/src/gui/areas/listing_area.py (original)
+++ trunk/ui/src/gui/areas/listing_area.py Mon Jan 29 19:41:39 2007
@@ -624,9 +624,6 @@
listing_info[1] = choice.image
- if config.INPUT_MOUSE_SUPPORT:
- for g in gui_objects:
- g.action = weakref.ref(choice)
# calculate next item position
if current_col == cols:
@@ -652,8 +649,6 @@
if start > 0 and settings.images['uparrow']:
i = settings.images['uparrow'].filename
i = self.drawimage(i, settings.images['uparrow'])
- if config.INPUT_MOUSE_SUPPORT:
- i.action = 'PAGE_UP'
self.arrows.append(i)
if end < len(menu.choices):
if isinstance(settings.images['downarrow'].y, str):
@@ -663,8 +658,6 @@
v = settings.images['downarrow']
i = settings.images['downarrow'].filename
i = self.drawimage(i, v)
- if config.INPUT_MOUSE_SUPPORT:
- i.action = 'PAGE_DOWN'
self.arrows.append(i)
except Exception, e:
log.error(e)
Modified: trunk/ui/src/input/plugins/sdl.py
==============================================================================
--- trunk/ui/src/input/plugins/sdl.py (original)
+++ trunk/ui/src/input/plugins/sdl.py Mon Jan 29 19:41:39 2007
@@ -65,15 +65,12 @@
else:
log.error('unable to find key code for %s' % key)
- # set mouse hiding on/off
- gui.display._window.hide_mouse = not config.INPUT_MOUSE_SUPPORT
+ # set mouse hiding on
+ gui.display._window.hide_mouse = True
# connect to signals
signals = gui.display._window.signals
signals['key_press_event'].connect(self.key_press_event)
- if config.INPUT_MOUSE_SUPPORT:
- signals['mouse_down_event'].connect(self.mouse_down_event)
- signals['mouse_up_event'].connect(self.mouse_up_event)
def key_press_event(self, key):
@@ -82,74 +79,3 @@
"""
if key in self.keymap:
self.post_key(self.keymap[key])
-
-
- def get_widget_at(self, point):
- """
- Return action at the given point.
- """
- for widget in gui.display.get_childs_at(point):
- if hasattr(widget, 'action'):
- if isinstance(widget.action, weakref.ReferenceType):
- # follow the weakref
- return widget.action()
- return widget.action
- return None
-
-
- def mouse_down_event(self, button, pos):
- """
- Mouse button event handling.
- This code is in an very early stage and may fail. It also
- only works with the menu right now, going back one menu
- is not working, there is a visible button the the screen
- missing to do that.
- A bigger eventmap should be created somewhere to make this
- work for the player as well.
- """
- action = self.get_widget_at(pos)
- if not action:
- return True
-
- if isinstance(action, Item):
- # Action is an item, do some menu code here.
- MENU_CHANGE_SELECTION.post(action)
- return True
-
-
- def mouse_up_event(self, button, pos):
- """
- Mouse button event handling.
- This code is in an very early stage and may fail. It also
- only works with the menu right now, going back one menu
- is not working, there is a visible button the the screen
- missing to do that.
- A bigger eventmap should be created somewhere to make this
- work for the player as well.
- """
- action = self.get_widget_at(pos)
- if not action:
- return True
-
- if isinstance(action, str):
- if action == 'PAGE_UP':
- # Action 'UP' is defined in the listing_area
- MENU_PAGEUP.post()
- elif action == 'PAGE_DOWN':
- # Action 'DOWN' is defined in the listing_area
- MENU_PAGEDOWN.post()
-
- elif isinstance(action, Item):
- if action.menu and action.menu.selected == action:
- # Action is an item, do some menu code here.
- if button == 1:
- MENU_SELECT.post()
- elif button == 3:
- MENU_SUBMENU.post()
- else:
- # mouse moved to much
- pass
-
- elif callable(action):
- # Action can be called
- action()
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog