Author: jerome
Date: 2009-02-06 09:49:41 +0100 (Fri, 06 Feb 2009)
New Revision: 3580
Modified:
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterface.java
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/gadget/GadgetsFramework.java
Log:
* Fixed : #130 ?\226?\128?\148 Alert action triggered after the first gadget
sentense.
Modified:
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterface.java
===================================================================
---
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterface.java
2009-02-06 08:28:16 UTC (rev 3579)
+++
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/CcInterface.java
2009-02-06 08:49:41 UTC (rev 3580)
@@ -190,8 +190,6 @@
Vector<JMenuItem> toolsMenus;
Hashtable<String, Object[]> savedProperties = new Hashtable<String,
Object[]>();
private GadgetInstance instance;
-
- public int timeout = 0;
/**
* CcInterface constructor.
@@ -1881,6 +1879,7 @@
CCRemoteActions.restoreContext();
this.setPlayerControlsConsistants(true);
FiFo.canRelease = true;
+
}
//An update event has been received.
@@ -1951,7 +1950,8 @@
try{
CcCommons.tux.tts.stop();
}catch(Exception except){}
- FiFo.canRelease = true;
+ FiFo.canRelease = true;
+
}
else
if(arg0.getPropertyName().equalsIgnoreCase("deployement-terminated")){
Modified:
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/gadget/GadgetsFramework.java
===================================================================
---
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/gadget/GadgetsFramework.java
2009-02-06 08:28:16 UTC (rev 3579)
+++
software_suite_v2/software/control_center/trunk/control_center/sources/com/tuxdroid/cc/gadget/GadgetsFramework.java
2009-02-06 08:49:41 UTC (rev 3580)
@@ -60,7 +60,7 @@
// Example of global notification handling
if ((name.equalsIgnoreCase("speak")) ||
(name.contains("message"))){
-
+ FiFo.canRelease = false;
if(talk)
{
gadget = source;
@@ -76,7 +76,9 @@
}
else
{
-
changes.firePropertyChange("gadget-talk", null, null);
+ isAlert = true;
+ FiFo.canRelease = false;
+ CcCommons.isFrameworkBusy = true;
}
}
}
@@ -98,8 +100,17 @@
//Reset the gadgets notifications fifo.
if(talk)
changes.firePropertyChange("Gadget-stopped",
null, null);
+
+ CcCommons.isFrameworkBusy = false;
+
+ if(isAlert)
+ {
+ isAlert = false;
+ FiFo.canRelease = true;
+ changes.firePropertyChange("gadget-talk", null,
null);
+ }
+
GadgetsFramework.gadget = null;
- CcCommons.isFrameworkBusy = false;
talk = true;
}
@@ -196,12 +207,14 @@
/** Talk receiving message from a gadget **/
private boolean talk = true;
+ private boolean isAlert = false;
public static GadgetInstance gadget = null;
@SuppressWarnings("unused")
private boolean GadgetRunning = false;
- private String lastAdded;
+ private String lastAdded;
+
public GadgetsFramework(){
super();
@@ -316,6 +329,6 @@
}
public boolean isAlert(){
- return !talk;
+ return isAlert;
}
}
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn