Author: ks156
Date: 2009-01-14 10:55:16 +0100 (Wed, 14 Jan 2009)
New Revision: 3440

Modified:
   
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/es.po
   
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/fr.po
   
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/gadget.pot
   
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/nl.po
   
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/sources/audacious.java
Log:
* Added a TTS feedback when audacious cannot be found in the system.


Modified: 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/es.po
===================================================================
--- 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/es.po
        2009-01-13 14:57:35 UTC (rev 3439)
+++ 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/es.po
        2009-01-14 09:55:16 UTC (rev 3440)
@@ -9,3 +9,6 @@
 
 msgid "The Audacious Player gadget takes control of Audacious with the Tux 
Droid remote control or flippers."
 msgstr "El gedget Reproductor Audacious controla Audacious usando el control 
remoto o sus alas."
+
+msgid "The gadget could not find audacious. For using this gadget, please make 
sure you have audacious installed."
+msgstr "The gadget could not find audacious. For using this gadget, please 
make sure you have audacious installed."

Modified: 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/fr.po
===================================================================
--- 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/fr.po
        2009-01-13 14:57:35 UTC (rev 3439)
+++ 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/fr.po
        2009-01-14 09:55:16 UTC (rev 3440)
@@ -10,3 +10,5 @@
 msgid "The Audacious Player gadget takes control of Audacious with the Tux 
Droid remote control or flippers."
 msgstr "Le gadget Audacious prend le controle d'Audacious avec la télécommande 
ou les ailes de Tux Droid."
 
+msgid "The gadget could not find audacious. For using this gadget, please make 
sure you have audacious installed."
+msgstr "Le gadget ne peut pas trouver audacious. Pour utiliser ce gadget, 
assurez-vous que audacious est installé"

Modified: 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/gadget.pot
===================================================================
--- 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/gadget.pot
   2009-01-13 14:57:35 UTC (rev 3439)
+++ 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/gadget.pot
   2009-01-14 09:55:16 UTC (rev 3440)
@@ -10,3 +10,5 @@
 msgid "The Audacious Player gadget takes control of Audacious with the Tux 
Droid remote control or flippers."
 msgstr ""
 
+msgid "The gadget could not find audacious. For using this gadget, please make 
sure you have audacious installed."
+msgstr ""

Modified: 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/nl.po
===================================================================
--- 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/nl.po
        2009-01-13 14:57:35 UTC (rev 3439)
+++ 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/resources/nl.po
        2009-01-14 09:55:16 UTC (rev 3440)
@@ -10,3 +10,5 @@
 msgid "The Audacious Player gadget takes control of Audacious with the Tux 
Droid remote control or flippers."
 msgstr "Met de Audacious gadget kan je Audacious controleren met de 
afstandsbediening of met de vleugels."
 
+msgid "The gadget could not find audacious. For using this gadget, please make 
sure you have audacious installed."
+msgstr "De gadget kan audacious niet vinden. Gelieve te controleren of 
audacious geïnstalleerd is om deze gadget te gebruiken."

Modified: 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/sources/audacious.java
===================================================================
--- 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/sources/audacious.java
 2009-01-13 14:57:35 UTC (rev 3439)
+++ 
software_suite_v2/software/gadgets/tuxdroid-gadget-audacious/trunk/tuxdroid-gadget-audacious/sources/audacious.java
 2009-01-14 09:55:16 UTC (rev 3440)
@@ -47,12 +47,25 @@
        /**
         * Start audacious application.
         */
-       public void startAudacious(String path)
+       public int startAudacious(String path)
        {
+           try 
+           {
                if(path == null)
-                       new CommandThread("audacious").start();
+               {
+                   Runtime.getRuntime().exec("audacious");
+               }
                else
-                       new CommandThread(new String[] { "audacious", 
path}).start();
+               {
+                   Runtime.getRuntime().exec(new String[] {"audacious", path});
+               }
+               return 0;
+           }
+           catch (java.io.IOException e)
+           {
+               throwMessage("The gadget could not find audacious. For using 
this gadget, please make sure you have audacious installed.");
+               return -1;
+           }
        }
        
        
@@ -143,7 +156,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);
@@ -161,12 +174,17 @@
                
                if(this.configuration().userPlaylist)
                {
-                       this.startAudacious(this.configuration().path);
+                       ret = this.startAudacious(this.configuration().path);
                }
                else
                {
-                       this.startAudacious(null);
+                       ret = this.startAudacious(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

Reply via email to