Author: ks156
Date: 2009-01-14 11:33:38 +0100 (Wed, 14 Jan 2009)
New Revision: 3443
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/es.po
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/fr.po
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/gadget.pot
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/nl.po
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/sources/xmms.java
Log:
* Added a TTS feedback when the XMMS isn't installed.
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/es.po
===================================================================
---
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/es.po
2009-01-14 10:20:29 UTC (rev 3442)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/es.po
2009-01-14 10:33:38 UTC (rev 3443)
@@ -12,3 +12,6 @@
msgid "Take control of XMMS with the Tux Droid remote control or flippers."
msgstr "El XMMS Player asume el control de XMMS con el control remoto de Tux
Droid o usando sus alas."
+
+msgid "The gadget could not find XMMS. For using this gadget, please make sure
you have XMMS installed."
+msgstr "The gadget could not find XMMS. For using this gadget, please make
sure you have XMMS installed."
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/fr.po
===================================================================
---
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/fr.po
2009-01-14 10:20:29 UTC (rev 3442)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/fr.po
2009-01-14 10:33:38 UTC (rev 3443)
@@ -13,3 +13,5 @@
msgid "Take control of XMMS with the Tux Droid remote control or flippers."
msgstr "Le gadget XMMS Player contrôle XMMS avec la télécommande ou les ailes
de Tux Droid."
+msgid "The gadget could not find XMMS. For using this gadget, please make sure
you have XMMS installed."
+msgstr "Le gadget ne peut pas trouver XMMS. Pour utiliser ce gadget,
assurez-vous que XMMS est installé."
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/gadget.pot
===================================================================
---
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/gadget.pot
2009-01-14 10:20:29 UTC (rev 3442)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/gadget.pot
2009-01-14 10:33:38 UTC (rev 3443)
@@ -12,3 +12,6 @@
msgid "Take control of XMMS with the Tux Droid remote control or flippers."
msgstr ""
+
+msgid "The gadget could not find XMMS. For using this gadget, please make sure
you have XMMS installed."
+msgstr ""
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/nl.po
===================================================================
---
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/nl.po
2009-01-14 10:20:29 UTC (rev 3442)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/resources/nl.po
2009-01-14 10:33:38 UTC (rev 3443)
@@ -13,3 +13,5 @@
msgid "Take control of XMMS with the Tux Droid remote control or flippers."
msgstr "Met XMMS gadget kan je XMMS controleren met de Tux Droid
afstandsbediening of met de vleugels."
+msgid "The gadget could not find XMMS. For using this gadget, please make sure
you have XMMS installed."
+msgstr "De gadget kan XMMS niet vinden. Gelieve te controleren of XMMS
geïnstalleerd is om deze gadget te gebruiken."
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/sources/xmms.java
===================================================================
---
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/sources/xmms.java
2009-01-14 10:20:29 UTC (rev 3442)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-xmms/trunk/tuxdroid-gadget-xmms/sources/xmms.java
2009-01-14 10:33:38 UTC (rev 3443)
@@ -48,15 +48,26 @@
/**
* Start xmms application.
*/
- public void startXMMS(String path)
+ public int startXMMS(String path)
{
+ try
+ {
if(path == null)
- new CommandThread("xmms").start();
- else
+ {
+ Runtime.getRuntime().exec("xmms");
+ }
+ else
{
- new CommandThread(new String[] { "xmms", path}).start();
+ Runtime.getRuntime().exec(new String[] { "xmms", path});
}
- }
+ return 0;
+ }
+ catch (java.io.IOException e)
+ {
+ throwMessage("The gadget could not find XMMS. For using this
gadget, please make sure you have XMMS installed.");
+ return -1;
+ }
+ }
/**
@@ -150,7 +161,7 @@
*/
@Override
protected void start() throws Throwable {
-
+ int ret;
this.tux = new TuxAPI(this.configuration().getIP(), 270);
this.tux.button.remote.registerEventOnPressed(this,
"onPreviousPushed", TuxAPIConst.K_UP);
this.tux.button.remote.registerEventOnPressed(this,
"onNextPushed", TuxAPIConst.K_DOWN);
@@ -168,12 +179,17 @@
if(this.configuration().userPlaylist)
{
- this.startXMMS(this.configuration().path);
+ ret = this.startXMMS(this.configuration().path);
}
else
{
- this.startXMMS(null);
+ ret = this.startXMMS(null);
}
+ if (ret < 0)
+ {
+ this.tux.destroy();
+ System.exit(1);
+ }
}
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn