1
# -*- coding: utf-8 -*-
4
#Módulo usbjoystick - Módulo que implementa el "actor hardware" para los
5
#dispositivos USB Joystick/Gamepad
7
#Copyright (C) 2007 Junta de Andalucía
11
#- J. Félix Ontañón <fontanon@emergya.es>
13
#Este fichero es parte de Detección de Hardware de Guadalinex
15
#Detección de Hardware de Guadalinex es software libre. Puede redistribuirlo y/o modificarlo
16
#bajo los términos de la Licencia Pública General de GNU según es
17
#publicada por la Free Software Foundation, bien de la versión 2 de dicha
18
#Licencia o bien (según su elección) de cualquier versión posterior.
20
#Detección de Hardware de Guadalinex se distribuye con la esperanza de que sea útil,
21
#pero SIN NINGUNA GARANTÍA, incluso sin la garantía MERCANTIL
22
#implícita o sin garantizar la CONVENIENCIA PARA UN PROPÓSITO
23
#PARTICULAR. Véase la Licencia Pública General de GNU para más detalles.
25
#Debería haber recibido una copia de la Licencia Pública General
26
#junto con Detección de Hardware de Guadalinex . Si no ha sido así, escriba a la Free Software
27
#Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
29
#-------------------------------------------------------------------------
31
#This file is part of Detección de Hardware de Guadalinex .
33
#Detección de Hardware de Guadalinex is free software; you can redistribute it and/or modify
34
#it under the terms of the GNU General Public License as published by
35
#the Free Software Foundation; either version 2 of the License, or
36
#at your option) any later version.
38
#Detección de Hardware de Guadalinex is distributed in the hope that it will be useful,
39
#but WITHOUT ANY WARRANTY; without even the implied warranty of
40
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41
#GNU General Public License for more details.
43
#You should have received a copy of the GNU General Public License
44
#along with Foobar; if not, write to the Free Software
45
#Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
49
from utils.pkginstaller import PkgInstaller
50
from deviceactor import PkgDeviceActor
51
from gettext import gettext as _
55
valid_list = ['usb joystick']
56
if (value.lower() in valid_list):
59
class Actor(PkgDeviceActor):
61
__required__ = {'info.bus':'usb_device',
62
'info.product': is_valid,
65
# Important for compatibility with usbmouse.py
68
__icon_path__ = os.path.abspath('actors/img/usb.png')
69
__iconoff_path__ = os.path.abspath('actors/img/usboff.png')
71
__device_title__ = 'USB Joystick'
72
__device_conn_description__ = _('Joystick/Gamepad connected')
73
__device_disconn_description__ = _('Joystick/Gamepad disconnected')