Author: ks156
Date: 2009-01-14 11:20:29 +0100 (Wed, 14 Jan 2009)
New Revision: 3442
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/es.po
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/fr.po
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/gadget.pot
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/nl.po
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/sources/totem.java
Log:
* Added a TTS feedback when totem isn't installed.
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/es.po
===================================================================
---
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/es.po
2009-01-14 10:11:30 UTC (rev 3441)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/es.po
2009-01-14 10:20:29 UTC (rev 3442)
@@ -12,3 +12,6 @@
msgid "This gadget lets you control the Totem Movie Player with the remote
control."
msgstr "Este gadget le permite controlar el reproductor Totem Movie Player con
el control remoto alas"
+
+msgid "The gadget could not find totem. For using this gadget, please make
sure you have totem installed."
+msgstr "The gadget could not find totem. For using this gadget, please make
sure you have totem installed."
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/fr.po
===================================================================
---
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/fr.po
2009-01-14 10:11:30 UTC (rev 3441)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/fr.po
2009-01-14 10:20:29 UTC (rev 3442)
@@ -13,3 +13,5 @@
msgid "This gadget lets you control the Totem Movie Player with the remote
control."
msgstr "Ce gadget vous laisse prendre le controle de Totem avec la
télécommande."
+msgid "The gadget could not find totem. For using this gadget, please make
sure you have totem installed."
+msgstr "Le gadget ne peut pas trouver totem. Pour utiliser ce gadget,
assurez-vous que totem est installé."
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/gadget.pot
===================================================================
---
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/gadget.pot
2009-01-14 10:11:30 UTC (rev 3441)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/gadget.pot
2009-01-14 10:20:29 UTC (rev 3442)
@@ -13,3 +13,6 @@
msgid "This gadget lets you control the Totem Movie Player with the remote
control."
msgstr ""
+msgid "The gadget could not find totem. For using this gadget, please make
sure you have totem installed."
+msgstr ""
+
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/nl.po
===================================================================
---
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/nl.po
2009-01-14 10:11:30 UTC (rev 3441)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/resources/nl.po
2009-01-14 10:20:29 UTC (rev 3442)
@@ -12,3 +12,6 @@
msgid "This gadget lets you control the Totem Movie Player with the remote
control."
msgstr "Met deze gadget kan je Totem Movie Player controleren via de
afstandsbediening."
+
+msgid "The gadget could not find totem. For using this gadget, please make
sure you have totem installed."
+msgstr "De gadget kan totem niet vinden. Gelieve te controleren of totem
geïnstalleerd is om deze gadget te gebruiken."
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/sources/totem.java
===================================================================
---
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/sources/totem.java
2009-01-14 10:11:30 UTC (rev 3441)
+++
software_suite_v2/software/gadgets/tuxdroid-gadget-totem/trunk/tuxdroid-gadget-totem/sources/totem.java
2009-01-14 10:20:29 UTC (rev 3442)
@@ -47,15 +47,26 @@
/**
* Start Totem movie player application.
*/
- public void startTotem(String path)
- {
- if(path == null)
- new CommandThread("totem").start();
- else
- {
- new CommandThread(new String[] { "totem",
path}).start();
- }
- }
+ public int startTotem(String path)
+ {
+ try
+ {
+ if(path == null)
+ {
+ Runtime.getRuntime().exec("totem");
+ }
+ else
+ {
+ Runtime.getRuntime().exec(new String[] { "totem", path});
+ }
+ return 0;
+ }
+ catch (java.io.IOException e)
+ {
+ throwMessage("The gadget could not find totem. For using this
gadget, please make sure you have totem installed.");
+ return -1;
+ }
+ }
/**
@@ -199,7 +210,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);
@@ -221,7 +232,13 @@
this.tux.button.left.registerEventOnPressed(this,
"onNextPushed");
this.tux.server.autoConnect(TuxAPIConst.CLIENT_LEVEL_FREE,
"tuxdroid-gadget-totem", "tuxdroid-gadget-totem-2122");
- this.startTotem(this.configuration().path);
+ ret = this.startTotem(this.configuration().path);
+
+ 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