Difference between revisions of "Patch Enable LED Notifications"
(New page: Two files need to be modified. /usr/palm/applications/com.app.screenlock/app/controllers/securityconfig-assistant.js Uncomment lines 54,55,248-251. /usr/palm/applications/com.app.scree...) |
|||
(6 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{template:patch}} | ||
+ | '''A Common Complaint: ''' | ||
+ | This patch doesn't work for me on a Spanish Pre updated to 1.3.1. After applying it, the Screen & Lock application display the new option and doesn't allow to change the "Secure unblock" and "brightness" properties. | ||
+ | On an imported German o2 device in Switzerland I get the same behaviour as described above with 1.3.1. | ||
+ | <br> | ||
+ | '''And the answer to it: ''' A localized application has localized versions of the HTML files. Now when you change the English version only, and the Spanish or German version is displayed, the following happens: Not only will you not see the changes (that is the obvious part), the JavaScript adding a listener to ''blinkAlerts'' will not find that element and throw, thereby failing to initialize the page. The solution is to modify /usr/palm/applications/com.palm.app.screenlock/resources/de_de/views/securityconfig/securityconfig-scene.html instead (for each language besides de_de ideally). | ||
+ | |||
+ | This patch needs a rooted Pre to manually make these changes though a command line. | ||
+ | |||
Two files need to be modified. | Two files need to be modified. | ||
− | /usr/palm/applications/com.app.screenlock/app/controllers/securityconfig-assistant.js | + | /usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js |
+ | |||
+ | Uncomment lines 54,55,248-251 (291-294 on 1.3.1). | ||
+ | |||
+ | Here is what the files should look like: | ||
+ | <source lang=text> | ||
+ | Lines 54/55: | ||
+ | //this.controller.setupWidget('blinkAlerts', this.onOffToggleOpt, this.ledThrobberToggleModel); | ||
+ | //Mojo.Event.listen($('blinkAlerts'),'mojo-property-change', this.toggleLEDThrobber.bindAsEventListener(this)); | ||
+ | |||
+ | Should be changed to: | ||
+ | this.controller.setupWidget('blinkAlerts', this.onOffToggleOpt, this.ledThrobberToggleModel); | ||
+ | Mojo.Event.listen($('blinkAlerts'),'mojo-property-change', this.toggleLEDThrobber.bindAsEventListener(this)); | ||
+ | </source> | ||
+ | |||
+ | <source lang=text> | ||
+ | Lines 248-251 (291-294 in webOS 1.3.1): | ||
+ | /*if (payload.LEDThrobberEnabled != undefined) { | ||
+ | this.ledThrobberToggleModel.value = payload.LEDThrobberEnabled; | ||
+ | this.controller.modelChanged(this.ledThrobberToggleModel, this); | ||
+ | }*/ | ||
+ | |||
+ | Should be changed to: | ||
+ | if (payload.LEDThrobberEnabled != undefined) { | ||
+ | this.ledThrobberToggleModel.value = payload.LEDThrobberEnabled; | ||
+ | this.controller.modelChanged(this.ledThrobberToggleModel, this); | ||
+ | } | ||
+ | |||
+ | </source> | ||
+ | |||
+ | /usr/palm/applications/com.palm.app.screenlock/app/views/securityconfig/securityconfig-scene.html: | ||
+ | |||
+ | Uncomment 92-97 and 101-103 (97-102 and 106-108 in webOS 1.3.1). | ||
+ | |||
+ | <source lang=text> | ||
+ | Lines 92-97 (97-102 in 1.3.1): | ||
+ | <!--<div class="palm-row last"> | ||
+ | <div class="palm-row-wrapper"> | ||
+ | <div x-mojo-element="ToggleButton" id="blinkAlerts"></div> | ||
+ | <div class="title capitalize" x-mojo-loc=''>Blink notifications</div> | ||
+ | </div> | ||
+ | </div>--> | ||
− | + | Should be changed to: | |
+ | <div class="palm-row last"> | ||
+ | <div class="palm-row-wrapper"> | ||
+ | <div x-mojo-element="ToggleButton" id="blinkAlerts"></div> | ||
+ | <div class="title capitalize" x-mojo-loc=''>Blink notifications</div> | ||
+ | </div> | ||
+ | </div> | ||
+ | </source> | ||
− | + | <source lang=text> | |
+ | Lines 101-103 (106-108 in 1.3.1): | ||
+ | <!--<div class="palm-info-text single" x-mojo-loc=''> | ||
+ | The gesture area blinks when new notifications arrive. | ||
+ | </div>--> | ||
− | + | Should be changed to: | |
+ | <div class="palm-info-text single" x-mojo-loc=''> | ||
+ | The gesture area blinks when new notifications arrive. | ||
+ | </div> | ||
+ | </source> |
Latest revision as of 19:22, 19 January 2010
A Common Complaint:
This patch doesn't work for me on a Spanish Pre updated to 1.3.1. After applying it, the Screen & Lock application display the new option and doesn't allow to change the "Secure unblock" and "brightness" properties.
On an imported German o2 device in Switzerland I get the same behaviour as described above with 1.3.1.
And the answer to it: A localized application has localized versions of the HTML files. Now when you change the English version only, and the Spanish or German version is displayed, the following happens: Not only will you not see the changes (that is the obvious part), the JavaScript adding a listener to blinkAlerts will not find that element and throw, thereby failing to initialize the page. The solution is to modify /usr/palm/applications/com.palm.app.screenlock/resources/de_de/views/securityconfig/securityconfig-scene.html instead (for each language besides de_de ideally).
This patch needs a rooted Pre to manually make these changes though a command line.
Two files need to be modified.
/usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js
Uncomment lines 54,55,248-251 (291-294 on 1.3.1).
Here is what the files should look like: <source lang=text> Lines 54/55: //this.controller.setupWidget('blinkAlerts', this.onOffToggleOpt, this.ledThrobberToggleModel); //Mojo.Event.listen($('blinkAlerts'),'mojo-property-change', this.toggleLEDThrobber.bindAsEventListener(this));
Should be changed to: this.controller.setupWidget('blinkAlerts', this.onOffToggleOpt, this.ledThrobberToggleModel); Mojo.Event.listen($('blinkAlerts'),'mojo-property-change', this.toggleLEDThrobber.bindAsEventListener(this)); </source>
<source lang=text> Lines 248-251 (291-294 in webOS 1.3.1):
/*if (payload.LEDThrobberEnabled != undefined) {
this.ledThrobberToggleModel.value = payload.LEDThrobberEnabled; this.controller.modelChanged(this.ledThrobberToggleModel, this); }*/
Should be changed to:
if (payload.LEDThrobberEnabled != undefined) {
this.ledThrobberToggleModel.value = payload.LEDThrobberEnabled; this.controller.modelChanged(this.ledThrobberToggleModel, this); }
</source>
/usr/palm/applications/com.palm.app.screenlock/app/views/securityconfig/securityconfig-scene.html:
Uncomment 92-97 and 101-103 (97-102 and 106-108 in webOS 1.3.1).
<source lang=text> Lines 92-97 (97-102 in 1.3.1):
Should be changed to:
</source>
<source lang=text> Lines 101-103 (106-108 in 1.3.1):
Should be changed to:
The gesture area blinks when new notifications arrive.
</source>