Messaging Mods

From WebOS Internals
Revision as of 04:18, 20 July 2009 by HattCzech (talk | contribs) (New page: All files are located in '''/usr/palm/applications/''' = Force Message send to an offline user without question dialog box. = <code><pre> sudo mount -o remount,rw /...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

All files are located in /usr/palm/applications/

Force Message send to an offline user without question dialog box.

sudo mount -o remount,rw /
sudo vi /usr/palm/applications/
/forceSendIfOffline =

Change the line to true (below) , writequit , remount, reload , enjoy

forceSendIfOffline = true; 
sudo mount -o remount,ro /
sudo stop LunaSysMgr ; sudo start LunaSysMgr

Character Counter

One of the features I liked about my old Treo was the character counter built-in to the messaging application. I thought it would be useful on the Pre, so I modified the messaging application to show the current character count. I made this a separate page from the other modifications because it requires many code changes. Maybe the other messaging modifications could be rolled into this page as well.


This modification is the same for both files, just inserted on different lines.
app/controllers/chatview-assistant.js Line 157:
app/controllers/compose-assistant.js Line 115:

charCounter: {
	charCountContainer: this.controller.get('charCounterContainer'),
	charCountElement: this.controller.get('charCounter'),
	setTextFieldValueFn: this.setTextFieldValue.bind(this)

app/utilities/CharacterCounter.js Line 40:

var charCounterUI = {
	containerElement: null,
	valueElement: null

Line 188:

var setCurrentCharCount = function(newCharCount) {
	if(charCounterUI.valueElement) {
		if (newCharCount > 0)
	if(charCounterUI.containerElement) {
		if (newCharCount == 0) {
			if (charCounterUI.containerElement.visible())
		} else {
			if (!charCounterUI.containerElement.visible());

Line 286:

if(params.charCounter) {
	charCounterUI.containerElement = params.charCounter.charCountContainer;
	charCounterUI.valueElement = params.charCounter.charCountElement;
	if(params.charCounter.setTextFieldValueFn) {
		setTextFieldValueFn = params.charCounter.setTextFieldValueFn;

Line 331:


Again, same code for both files, inserted on different lines.
app/views/chatview/chatview-scene.html Line 25:
app/views/compose/compose-scene.html Line 8:

<div id="charCounterContainer">
	<div id="charCounter">

stylesheets/messaging.css Line 839:

#messageContainer #charCounterContainer {
	line-height: 20px;
	height: 20px;
	border-width: 0px 10px 0px 9px;
	-webkit-border-image: url(../images/message-segment-badge.png) 0 10 0 9 stretch stretch;
	position: absolute;
	z-index: 3;
	top: 2px;
	left: 2px;
#messageContainer #charCounterContainer #charCounter {
	font-size: 12px;
	font-weight: bold;
	color: #679BC2;
	margin: 0px -4px 3px -3px;

If you don't like the location of the character counter (I have it configured for the top left of the text area), you can modify the #charCounterContainer section in the messaging.css above.


This will require LunaSysMgr to be restarted. A rescan will not work. After you've made the modifications listed above, run the following command:

pkill LunaSysMgr


  • HattCzech