Patch webOS Email App Patch to Prompt for IPK Installation

Preamble
You will need write permissions to the filesystem on your pre to apply this patch.

To get write persmissions execute:

rootfs_open -w

To remount the filesystem as read-only:

mount -o remount,ro /

Procedure
I have patched the email application to prompt for installation. It involves modifying/replacing the handleLinkClicked function inside the following file:

/usr/palm/applications/com.palm.app.email/app/controllers/message-assistant.js

Be sure to make a backup of your message-assistant.js before modifying it.

simplyflipflops

This patch is available at http://gitorious.org/webos-internals/modifications/blobs/raw/master/email/prompt-for-ipk-installation.patch

It is as follows:

/**  * User clicked on a hyperlink. */ handleLinkClicked: function(event) { Mojo.Log.info("handleLinkClicked %s", event.url);

var extensionIndex2 = event.url.lastIndexOf('.'); if (extensionIndex2 > 0 ){ var extensionTemp = event.url.substring(extensionIndex2 +1).toLowerCase; }   if (extensionTemp === "ipk") { this.controller.showAlertDialog({         onChoose: function(value) {             if (value===true) {              this.controller.serviceRequest('palm://com.palm.applicationManager', {                   method: 'open', parameters: {target: event.url} });           }          },          message: $L("Found Palm Application Bundle IPK. You should only install packages from trusted sources."),

choices: [             {label:$L('I Trust This Source - Install'), value: true, type:'affirmative'}, {label:$L('Cancel Install'), value: false, type:'alert'} ]     });    } else {      this.controller.serviceRequest('palm://com.palm.applicationManager', {           method: 'open', parameters: {target: event.url} });   }  },