[tuxdroid-svn] r888 - in software/gadgets/shortcuts_manager/trunk: . shortcuts_manager shortcuts_ma
Status: Beta
Brought to you by:
ks156
From: jerome <c2m...@c2...> - 2008-01-25 15:39:37
|
Author: jerome Date: 2008-01-25 16:39:33 +0100 (Fri, 25 Jan 2008) New Revision: 888 Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager.tgf software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/init.pyp software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/main.pyp software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Strings/fr_ALL.xml software/gadgets/shortcuts_manager/trunk/shortcuts_manager/strings.xml Log: * Add a tts notification when no shortcuts into list Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/init.pyp =================================================================== --- software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/init.pyp 2008-01-25 15:37:33 UTC (rev 887) +++ software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/init.pyp 2008-01-25 15:39:33 UTC (rev 888) @@ -40,6 +40,8 @@ +_me.set_param('allow', True) + _me.set_param('shortcut', '') _me.set_param('name', '') Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/main.pyp =================================================================== --- software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/main.pyp 2008-01-25 15:37:33 UTC (rev 887) +++ software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/main.pyp 2008-01-25 15:39:33 UTC (rev 888) @@ -6,6 +6,13 @@ language = _me.get_var('language') _me.set_param('last_language', language) list = _me.get_param('list_of_shortcuts') + +if len(list) <= 0: + tux.tts.speak(_me.string('nothing')) + _me.set_param('allow', False) +else: + _me.set_param('allow', True) + tmp_list = [] availables_buttons_en = {'0':0, '1': 1, '2':2, '3':3, '4':4,\ @@ -57,4 +64,5 @@ _me.get_funct('assign_keys')() tux.event.on_remote_bt[K_STANDBY] = _me.exit_main_loop -_me.run_main_loop() +if _me.get_param('allow'): + _me.run_main_loop() Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Strings/fr_ALL.xml =================================================================== --- software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Strings/fr_ALL.xml 2008-01-25 15:37:33 UTC (rev 887) +++ software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Strings/fr_ALL.xml 2008-01-25 15:39:33 UTC (rev 888) @@ -45,6 +45,7 @@ :'thunderbird | firefox http://www.slashdot.org | xmms -p | pidgin'</help_text> <modify type='str'>raccourcis '%s' modifié</modify> <name_to_read type='str'>Manageur de raccourcis</name_to_read> + <nothing type='str'>Vous n'avez pas configuré de raccourcis. S'il vous plait, ajoutez un raccourcis dans la fenêtre de configuration.</nothing> <remote_key_name type='str'>Télécommande</remote_key_name> <shortcut_name type='str'>Nom</shortcut_name> <speaker_name type='str'>Bruno8k</speaker_name> Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager/strings.xml =================================================================== --- software/gadgets/shortcuts_manager/trunk/shortcuts_manager/strings.xml 2008-01-25 15:37:33 UTC (rev 887) +++ software/gadgets/shortcuts_manager/trunk/shortcuts_manager/strings.xml 2008-01-25 15:39:33 UTC (rev 888) @@ -47,6 +47,7 @@ :'thunderbird | firefox http://www.slashdot.org | xmms -p | pidgin'</help_text> <modify type='str'>'%s' shortcut modified</modify> <name_to_read type='str'>Shortcuts manager</name_to_read> + <nothing type='str'>You have no shortcuts configured. Please add a shortcut in the settings window</nothing> <remote_key_name type='str'>Remote key</remote_key_name> <shortcut_name type='str'>Name</shortcut_name> <speaker_name type='str'>Ryan8k</speaker_name> Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager.tgf =================================================================== (Binary files differ) |