Myavatar In Messaging App

From WebOS Internals
Revision as of 10:31, 24 July 2009 by Imop45 (talk | contribs) (root to access)
Jump to: navigation, search

How To Get Your Avatar In The Chat

This will get the avatars (both yours and theirs) in the lower right hand corner. Also, I'd suggest the gradient in the chat balloons all fading to one side. Looks much better that way ;-)

You will need to have your Pre Accessed. Also, don't forget to back up everything you touch.

First step is to type:

cd /usr/palm/applications/com.palm.app.messaging/stylesheets

then:

sudo vi messaging.css

Starting at line 139 you will see this:

.chatRow img.avatar-location {
	margin-top: -18px;
}

.chatRow img.avatar-overlay {
	margin-top: -21px;
}

.chatRow .avatar-container {
	vertical-align: middle;
	display: inline-block;
}

Change the margins in location and overlay so that they look like this:

.chatRow img.avatar-location {                                                             
        margin-top: -39px;
}                                                                                                  
                       
.chatRow img.avatar-overlay {                                                                       
        margin-top: -42.5px;
}

Now comment out the container:

/*.chatRow .avatar-container {  
        vertical-align: middle;   
        display: inline-block;                                       
}*/

Next, scroll down to line 662. You'll see something like this:

.my-chat .chat-balloon-wrapper, 
.their-chat .chat-balloon-wrapper {
  padding: 1px 0;
  font-size: 18px;
  word-wrap: break-word !important;
}

Add

padding-right: 40px;
.my-chat .chat-balloon-wrapper,            
.their-chat .chat-balloon-wrapper {                                                                 
  padding: 1px 0;                                                    
  font-size: 18px;                                                                            
  word-wrap: break-word !important;                                             
padding-right: 40px;                                                                                   
}

Comment out line 668:

/*.their-chat .chat-balloon-wrapper {                           
        padding-right: 8px ;}*/                                                                          

On line 676 you will see this:

/* Disabling MY avatar because we are not doing this for 1.0  2008-11-05*/
.my-chat .avatar-location,
.my-chat .avatar-overlay,
.my-chat .avatar-container {
	display: none;
    width: 40px;
    height: 40px;
}


Comment out

/*.my-chat .avatar-overlay,*/
/*.my-chat .avatar-container*/
/*display: none;*/


Now save: SHIFT zz or ESC :qw

Type:

cd /usr/palm/applications/com.palm.app.messaging/app/controllers


sudo vi chatview-assistant.js


Scroll down to line 1213 and remove the /'s. Should look like this:

msg.avatar = this.myAvatar || 'images/my-avatar.png';


Save: SHIFT zz or ESC :qw

Now you need to upload an avatar and find the image location

In terminal type:

cd /usr/palm/applications/com.palm.app.messaging/images/
sudo wget (url)
sudo mv (filename of the avatar you just downloaded) my-avatar.png

Now type:

sudo luna-send -n 1 palm://com.palm.applicationManager/rescan {}