Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
www-data
committed
Aug 3, 2010
1 parent
dfac5f6
commit b67235c
Showing
2 changed files
with
93 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
Name: VZ Navigator GPS Fix | ||
Version: 1.4.1.1-1 | ||
Author: James Harris | ||
|
||
--- .orig/usr/palm/applications/com.nim.app.vznavigator/javascripts/app2app.js | ||
+++ /usr/palm/applications/com.nim.app.vznavigator/javascripts/app2app.js | ||
@@ -42,6 +42,12 @@ | ||
//split the mime type | ||
var mimeAndRest = urlString.split(":"); | ||
|
||
+ //PATCH CODE: Allow for a close request result | ||
+ if (mimeAndRest[0] == "close") { | ||
+ return "close"; //No error | ||
+ } | ||
+ //PATCH CODE | ||
+ | ||
if (mimeAndRest[0] == "mapto" || mimeAndRest[0] == "maploc" || mimeAndRest[0] == "target") { | ||
//Palm URL | ||
app2appQueryObj.mimeType = mimeAndRest[0]; | ||
--- .orig/usr/palm/applications/com.nim.app.vznavigator/app/assistants/startup/splash-assistant.js | ||
+++ /usr/palm/applications/com.nim.app.vznavigator/app/assistants/startup/splash-assistant.js | ||
@@ -36,6 +36,19 @@ | ||
|
||
SplashAssistant.prototype.onLogin = function (obj) | ||
{ | ||
+ //PATCH CODE: If a close request, just put in message and wait for stage close | ||
+ if (String(Mojo.Controller.stageController.getAppController().app2app) != "undefined"){ | ||
+ Mojo.Log.error("this.app2app.result: " + Mojo.Controller.stageController.getAppController().app2app.result); | ||
+ if (Mojo.Controller.stageController.getAppController().app2app.result == "close"){ | ||
+ $("SPLASH_WRAPPER").innerHTML = "<div style='padding:10px;'><div style='background-color:#fff; opacity:0.5; -webkit-border-radius: 5px; border:2px solid #000; padding:10px;'>NOTE: Activating GPS systems.<br><br>This window will close automatically in 30 seconds.</div></div>"; | ||
+ (function(){ | ||
+ Mojo.Controller.appController.closeStage("card"); | ||
+ }).bind(this).delay(32); | ||
+ break; | ||
+ } | ||
+ } | ||
+ //END PATCH CODE | ||
+ | ||
if (obj.errorCode == 0) { | ||
if (!obj.authorized) { | ||
if (obj.message && obj.message.title && obj.message.text) { | ||
@@ -71,6 +84,7 @@ | ||
|
||
SplashAssistant.prototype.onServerMessage = function (obj) | ||
{ | ||
+ | ||
if (obj.errorCode == 0) { | ||
if (APP.Connection.isConnected()) { | ||
if (obj.results) { | ||
--- .orig/usr/palm/applications/com.nim.app.vznavigator/app/assistants/stage-assistant.js | ||
+++ /usr/palm/applications/com.nim.app.vznavigator/app/assistants/stage-assistant.js | ||
@@ -294,8 +294,17 @@ | ||
Mojo.Event.listen(document, Mojo.Event.activate, this.uncarded.bind(this)); | ||
Mojo.Event.listen(document, Mojo.Event.deactivate, this.carded.bind(this)); | ||
|
||
- this.checkDisplayOffHandler = this.checkDisplayOff.bind(this); | ||
- this.powerMonitorHandler = this.powerMonitor.bind(this); | ||
+ //PATCH CODE: Do not listen for power monitor or screen state | ||
+ this.powerMonitorActivate = true; | ||
+ if (String(Mojo.Controller.stageController.getAppController().app2app) != "undefined"){ | ||
+ if (Mojo.Controller.stageController.getAppController().app2app.result == "close"){ | ||
+ this.powerMonitorActivate = false; | ||
+ } | ||
+ } | ||
+ | ||
+ if (this.powerMonitorActivate){ | ||
+ this.checkDisplayOffHandler = this.checkDisplayOff.bind(this); | ||
+ this.powerMonitorHandler = this.powerMonitor.bind(this); | ||
|
||
this.monitorRequest = APP.Util.registerForEvents(this.powerMonitorHandler); | ||
}; | ||
@@ -297,7 +306,9 @@ | ||
this.checkDisplayOffHandler = this.checkDisplayOff.bind(this); | ||
this.powerMonitorHandler = this.powerMonitor.bind(this); | ||
|
||
- this.monitorRequest = APP.Util.registerForEvents(this.powerMonitorHandler); | ||
+ this.monitorRequest = APP.Util.registerForEvents(this.powerMonitorHandler); | ||
+ } | ||
+ //END PATCH CODE | ||
}; | ||
|
||
StageAssistant.prototype.showScene = function(directory, sceneName) | ||
|