Updates for my patches
[webos-internals:modifications.git] / advanced / advanced-system-prefs-msg-prefs.patch
1 --- .orig/usr/palm/applications/com.palm.app.messaging/app/models/MojoDbInterfaces.js
2 +++ /usr/palm/applications/com.palm.app.messaging/app/models/MojoDbInterfaces.js
3 @@ -958,29 +958,55 @@
4  //                     return isValid;
5  //             },
6                 
7 -               setCustomMessage: function(customMessage) {
8 +               setCustomMessage: function(customMessage, objectId) {
9                         Mojo.Log.info("Setting customMessage to %s", customMessage);
10 -                       var mergeObject = {
11 -                               props: {
12 -                                       customMessage: customMessage
13 -                               },
14 -                               query: {
15 -                                       from: MessagingDB.IMLoginState.id
16 -                               }
17 -                       };
18 +                       if(objectId) {
19 +                               var mergeObject = {
20 +                                       props: {
21 +                                               customMessage: customMessage
22 +                                       },
23 +                                       query: {
24 +                                               from: MessagingDB.IMLoginState.id,
25 +                                               where: [{ prop: "_id", op: "=", val: objectId }]
26 +                                       }
27 +                               };
28 +                       }
29 +                       else {
30 +                               var mergeObject = {
31 +                                       props: {
32 +                                               customMessage: customMessage
33 +                                       },
34 +                                       query: {
35 +                                               from: MessagingDB.IMLoginState.id
36 +                                       }
37 +                               };
38 +                       }
39                         return MojoDB.execute("merge", mergeObject);
40                 },
41  
42 -               setAvailability: function(availability) {
43 +               setAvailability: function(availability, objectId) {
44                         Mojo.Log.info("Setting availability to %s", availability);
45 -                       var mergeObject = {
46 -                               props: {
47 -                                       availability: availability
48 -                               },
49 -                               query: {
50 -                                       from: MessagingDB.IMLoginState.id
51 -                               }
52 -                       };
53 +                       if(objectId) {
54 +                               var mergeObject = {
55 +                                       props: {
56 +                                               availability: availability
57 +                                       },
58 +                                       query: {
59 +                                               from: MessagingDB.IMLoginState.id,
60 +                                               where: [{ prop: "_id", op: "=", val: objectId }]
61 +                                       }
62 +                               };
63 +                       }
64 +                       else {                  
65 +                               var mergeObject = {
66 +                                       props: {
67 +                                               availability: availability
68 +                                       },
69 +                                       query: {
70 +                                               from: MessagingDB.IMLoginState.id
71 +                                       }
72 +                               };
73 +                       }
74                         return MojoDB.execute("merge", mergeObject);
75                 },
76  
77 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/app-assistant.js
78 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/app-assistant.js
79 @@ -52,6 +52,8 @@
80                 }
81  
82                 var stageController = this.controller.getStageController(MainStageName);
83 +
84 +               this.appController.notificationAssistant.removePlayNotificationSoundTasks();
85                 
86                 if (launchParams.clearBanner) {
87                         PalmSystem.clearBannerMessages();
88 @@ -99,10 +101,20 @@
89                  */     
90                 } else if (launchParams.target !== undefined) {
91                         this.handleTargetParam(launchParams.target, stageController);
92 +               } else if (launchParams.playNotificationSound) {
93 +                       // Delay playing to go around WebOS bug (sound not playing).
94 +
95 +                       setTimeout(this.playNotificationSound.bind(this, launchParams.serviceName), 1000);
96                 } else {
97                         this.launchMessaging(stageController);
98                 }               
99         },
100 +
101 +       playNotificationSound: function(serviceName) {
102 +               this.appController.notificationAssistant.playNotificationSound(serviceName);
103 +                       
104 +               this.appController.notificationAssistant.schedulePlayNotificationSoundTasks(serviceName);
105 +       },
106         
107         launchChatWithId: function(stageController, chatThreadId) {
108                 if (stageController) {                  
109 --- .orig/usr/palm/applications/com.palm.app.messaging/app/views/listview/buddyList-row.html
110 +++ /usr/palm/applications/com.palm.app.messaging/app/views/listview/buddyList-row.html
111 @@ -7,7 +7,7 @@
112        <div class="unread-count-container">
113          <div class="unread-count-wrapper">#{unreadCount}</div>
114        </div>
115 -      <div class="truncating-text custom-message">#{-customMessage}</div>
116 +      <div class="custom-message">#{-customMessage}</div>
117      </div>
118    </div>
119  </div>
120 \ No newline at end of file
121 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
122 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
123 @@ -270,6 +270,16 @@
124                 this.newMessageFieldLoseFocus = function(event) {
125                         if (this.messageTextElement !== undefined) {
126                                 this.messageTextElement.focus();
127 +                               
128 +                               var msg = this.Messaging.messagingPrefs.getMessageGreeting() + " " + 
129 +                                       this.Messaging.messagingPrefs.getMessageSignature();
130 +
131 +                               if((msg.length > 1) && (this.messageTextWidgetModel.value == msg))
132 +                               {
133 +                                       var curPos = this.Messaging.messagingPrefs.getMessageGreeting().length;
134 +                                       this.setTextFieldValue(msg);
135 +                                       this.controller.get("messageTextWidget").mojo.setCursorPosition(curPos, curPos);
136 +                               }
137                         }
138                 }.bind(this);
139                 
140 @@ -394,7 +404,9 @@
141                                 labelCallback: this.chatListDividerFunction.bind(this),
142                                 template: 'chatview/separator'
143                         },
144 -                       swipeDelete: true,
145 +                       swipeDelete: {
146 +                               autoConfirm: !this.Messaging.messagingPrefs.getUseDeleteConfirmation()
147 +                       },
148                         uniquenessProperty: '_id',
149                         initialScrollingDirection: 'up',
150                         revisionProperty: '_rev',
151 @@ -762,7 +774,7 @@
152                 if (this.isScreenOn && chatThreadId === this.chatThreadId) {
153                         Mojo.Log.info("[CV] ****** chatview considerForNotification --- screen is on!");
154                         if (data.notificationType === this.Messaging.notificationTypes.newMessage) {
155 -                               data = {playSoundOnly:true};
156 +                               data.playSoundOnly = true;
157                         } else if (data.notificationType === this.Messaging.notificationTypes.sendFailure) {
158                                 data = {}; // wipe out the notification because we are in the chat
159                         }
160 @@ -1370,6 +1382,8 @@
161                         return;
162                 }
163                 
164 +               this.messageTextElement.focus();
165 +
166                 if (tapTarget && tapTarget.id.startsWith(ChatviewAssistant.quickDialIdPrefix)) {
167                         try {
168                                 // The phone number is the substring after the quick dial prefix.
169 @@ -1445,6 +1459,30 @@
170                                 this.resetTextBox(false);
171                         }
172                 }
173 +               
174 +               var msg = this.Messaging.messagingPrefs.getMessageGreeting() + " " + 
175 +                       this.Messaging.messagingPrefs.getMessageSignature();
176 +
177 +           // Hide the attach button if there is an IM contact
178 +           if(selectedTransport.serviceName != "sms") {  
179 +                       if((msg.length > 1) && 
180 +                               (this.messageTextWidgetModel.value != undefined) &&
181 +                               (this.messageTextWidgetModel.value == msg))
182 +                       {
183 +                               this.setTextFieldValue("");
184 +                       }
185 +           } else {                  
186 +                       if((msg.length > 1) && 
187 +                               ((this.messageTextWidgetModel.value == undefined) || 
188 +                               (this.messageTextWidgetModel.value == "") ||
189 +                               (this.messageTextWidgetModel.value == msg)))
190 +                       {
191 +                               var curPos = this.Messaging.messagingPrefs.getMessageGreeting().length;
192 +                               this.setTextFieldValue(msg);
193 +                               this.controller.get("messageTextWidget").mojo.setCursorPosition(curPos, curPos);
194 +                       }
195 +               }
196 +
197                 this.setCharacterCounterMaxLength();
198         },
199  
200 @@ -2437,6 +2475,9 @@
201                 Mojo.Log.info("value " + value);
202                 
203                 if (value === 'forward-cmd') {
204 +                       if(this.Messaging.messagingPrefs.getPrependForward())
205 +                               text = "Fwd: " + text;
206 +               
207                         var composeParams = {
208                                 messageText: text,
209                                 focusWindow: true,
210 @@ -3104,8 +3145,26 @@
211         
212         _getMessageFromDraft: function() {
213                 MessagingDB.Messages.getMessageFromDraft(this.chatThreadId, function(result) {
214 -                       // Fill in text fields
215 -                       this.setTextFieldValue(result.messageText);
216 +                       if(this.Messaging.messagingPrefs.getUseAutomaticMsgDrafts()) {
217 +                               // Fill in text fields
218 +                               this.setTextFieldValue(result.messageText);
219 +                       }
220 +
221 +                       if(this.Messaging.messagingPrefs.getUseClipboardMsgDrafts())
222 +                               this.controller.stageController.setClipboard(result.messageText);
223 +
224 +                       if((result.serviceName == undefined) || (result.serviceName == "sms")) {
225 +                               var msg = this.Messaging.messagingPrefs.getMessageGreeting() + " " + 
226 +                                       this.Messaging.messagingPrefs.getMessageSignature();
227 +
228 +                               if((msg.length > 1) && ((this.messageTextElement.value == undefined) ||
229 +                                       (this.messageTextElement.value == "") || (this.messageTextElement.value == msg)))
230 +                               {
231 +                                       var curPos = this.Messaging.messagingPrefs.getMessageGreeting().length;
232 +                                       this.setTextFieldValue(msg);
233 +                                       this.controller.get("messageTextWidget").mojo.setCursorPosition(curPos, curPos);
234 +                               }
235 +                       }
236                 }.bind(this));
237         },
238  
239 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
240 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
241 @@ -132,10 +132,6 @@
242         },
243  
244         setup: function() {
245 -               if (!this.launchedWithParams){
246 -                       this.restoreFromDraft();
247 -               }
248 -
249                 this.controller.setupWidget(Mojo.Menu.appMenu, this.appMenuAttrs, this.appMenuModel);
250  
251                 this.searchList = {
252 @@ -230,6 +226,10 @@
253                 if (this.passedAttachment) {
254                         this.attachFile(this.passedAttachment, this.passedAttachmentIconPath, this.deleteAttachmentWhenDone, this.passedAttachmentType, this.passedTranscodeParams);
255                 }
256 +
257 +               if (!this.launchedWithParams){
258 +                       this.restoreFromDraft();
259 +               }
260         },
261  
262         pushReminder: function(recipient){
263 @@ -784,10 +784,30 @@
264                                 }
265                         }
266                 }
267 +
268 +               var msg = this.Messaging.messagingPrefs.getMessageGreeting() + " " + 
269 +                       this.Messaging.messagingPrefs.getMessageSignature();
270 +
271             // Hide the attach button if there is an IM contact
272 -           if(hasIM === true) {         
273 +           if(hasIM === true) {  
274 +                       if((msg.length > 1) && 
275 +                               (this.messageTextWidgetModel.value != undefined) &&
276 +                               (this.messageTextWidgetModel.value == msg))
277 +                       {
278 +                               this.setTextFieldValue("");
279 +                       }
280 +                  
281               this.hideAttachButton();
282             } else {                  
283 +                       if((msg.length > 1) && 
284 +                               ((this.messageTextWidgetModel.value == undefined) || 
285 +                               (this.messageTextWidgetModel.value == "")))
286 +                       {
287 +                               var curPos = this.Messaging.messagingPrefs.getMessageGreeting().length;
288 +                               this.setTextFieldValue(msg);
289 +                               this.controller.get("messageTextWidget").mojo.setCursorPosition(curPos, curPos);
290 +                       }
291 +
292               this.showAttachButton();
293             }
294                 this.setCharacterCounterMaxLength();
295 @@ -921,13 +941,29 @@
296                 if (this.launchedAsForward === undefined && 
297                         (this.messageText === undefined || this.messageText.length === 0) &&
298                         this.prePopulatedRecipients.length === 0) {
299 +                               var msg = this.Messaging.messagingPrefs.getMessageGreeting() + " " + 
300 +                                       this.Messaging.messagingPrefs.getMessageSignature();
301 +
302 +                               if((msg.length > 1) && 
303 +                                       ((this.messageTextWidgetModel.value == undefined) || 
304 +                                       (this.messageTextWidgetModel.value == "")))
305 +                               {
306 +                                       var curPos = this.Messaging.messagingPrefs.getMessageGreeting().length;
307 +                                       this.setTextFieldValue(msg);
308 +                                       this.controller.get("messageTextWidget").mojo.setCursorPosition(curPos, curPos);
309 +                               }
310                                 
311                                 MessagingDB.Messages.getMessageFromDraft("_compose",function(result) {
312 -                                       this.controller.get('searchList').mojo.updateRecipients(result.to);
313 -                                       this.setTextFieldValue(result.messageText);
314 -                                       if (result.attachment !== undefined) {
315 -                                               this.attachFile(result.attachment);
316 +                                       if(this.Messaging.messagingPrefs.getUseAutomaticMsgDrafts()) {
317 +                                               this.controller.get('searchList').mojo.updateRecipients(result.to);
318 +                                               this.setTextFieldValue(result.messageText);
319 +                                               if (result.attachment !== undefined) {
320 +                                                       this.attachFile(result.attachment);
321 +                                               }                                       
322                                         }                                       
323 +
324 +                                       if(this.Messaging.messagingPrefs.getUseClipboardMsgDrafts())
325 +                                               this.controller.stageController.setClipboard(result.messageText);
326                                 }.bind(this));
327                 }
328         },
329 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/dashboardMessage-assistant.js
330 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/dashboardMessage-assistant.js
331 @@ -2,7 +2,7 @@
332  /*jslint white: false, onevar: false, nomen:false, plusplus: false*/
333  /* Copyright 2009 Palm, Inc.  All rights reserved. */
334  
335 -function DashboardMessageAssistant(dashboardData) {
336 +function DashboardMessageAssistant(dashboardData, blinkNotify) {
337         this.dashboardData = dashboardData; // hold onto a reference to the dashboardData
338         if(this.dashboardData.newest && this.dashboardData[this.dashboardData.newest].list && this.dashboardData[this.dashboardData.newest].list.length>0){
339                 this.isInvite = (this.dashboardData[this.dashboardData.newest].list[0].imType === "invite"? true:false);
340 @@ -11,10 +11,11 @@
341         this.Messaging = this.appController.Messaging;
342         this.tapHandler = this.tapHandler.bindAsEventListener(this);
343         this.oldPresenceClass = "";
344 +       this.blinkNotify = blinkNotify;
345  }
346  
347  DashboardMessageAssistant.prototype.setup = function() {
348 -       this.update(true);
349 +       this.update(this.blinkNotify);
350         this.messageInfoElement = this.controller.get('message_info');
351         this.messageInfoElement.addEventListener(Mojo.Event.tap, this.tapHandler);
352  };
353 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js
354 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js
355 @@ -32,6 +32,8 @@
356                 this.historyListReset = false;
357                 this.delayUpdateCount = 0;
358                 this.delayExecuteCount = 0;
359 +               this.accountsData = {};
360 +               this.availabilityData = {};
361         
362                 this.COMMAND_MENU = {
363                         loadComposeView: {command:'cmdLoadComposeView',target: this.loadComposeView.bind(this)},
364 @@ -67,7 +69,7 @@
365                         {label: $L('Available'), command:this.Messaging.Availability.getAvailabilityAsConstText(this.Messaging.Availability.AVAILABLE), secondaryIcon:'status-available'},
366                         {label: $L('Busy'),      command:this.Messaging.Availability.getAvailabilityAsConstText(this.Messaging.Availability.BUSY),      secondaryIcon:'status-away'},
367                         // libpurple doesn't support invisible status for gtalk so commenting this out for now.
368 -                       //{label: $L('Invisible'), command:this.Messaging.Availability.getAvailabilityAsConstText(this.Messaging.Availability.INVISIBLE),  secondaryIcon:'status-invisible'},
369 +                       {label: $L('Invisible'), command:this.Messaging.Availability.getAvailabilityAsConstText(this.Messaging.Availability.INVISIBLE),  secondaryIcon:'status-invisible'},
370                         {label: $L('Sign off'),  command:this.Messaging.Availability.getAvailabilityAsConstText(this.Messaging.Availability.OFFLINE),   secondaryIcon:'status-offline'}
371                 ];
372                 
373 @@ -91,6 +93,29 @@
374         
375                 //To update the addBuddy menu item
376                 this.handleIMAccountsChange = function(results) {
377 +                       this.accountsData = {};
378 +                                       
379 +                       if(results && results.length > 1) {
380 +                               for(var i = 0; i < results.length; i++) {                                               
381 +                                       if(results[i].alias) {
382 +                                               var cp = results[i].capabilityProviders;
383 +
384 +                                               for (j = 0; j < cp.length; j++) {
385 +                                                       if (cp[j].capability === 'MESSAGING') {
386 +                                                               if (cp[j].capabilitySubtype === 'IM') {
387 +                                                                       if(!this.accountsData[results[i].alias])
388 +                                                                               this.accountsData[results[i].alias] = [];
389 +       
390 +                                                                       this.accountsData[results[i].alias].push({
391 +                                                                               accountId: results[i]._id, 
392 +                                                                               username: results[i].username});
393 +                                                               }
394 +                                                       }
395 +                                               }
396 +                                       }
397 +                               }
398 +                       }
399 +
400                         //Assume we only have SMS and IM for Messaging, only have one SMS
401                         if (results && results.length > 1) {
402                                 this.toEnableAddBuddyMenuItem = true;
403 @@ -136,6 +161,8 @@
404                 }.bind(this);
405                 
406                 this.updateAvailability = function(results) {
407 +                       this.availabilityData = {};
408 +                                       
409                         //Mojo.Log.info("this.updateAvailability: %j",results);
410                         Mojo.Log.info("Number of IM transports: "+results.length);
411                         if( results && results.length > 0 ) {
412 @@ -156,6 +183,13 @@
413                                 var isPending = false;
414                                 for (var i = 0; i < results.length && !isPending; i++) {
415                                         var account = results[i];
416 +                                       
417 +                                       this.availabilityData[account.accountId] = {
418 +                                               objectId: account._id,
419 +                                               availability: account.availability,
420 +                                               customMessage: account.customMessage
421 +                                       };
422 +                                       
423                                         Mojo.Log.info("username=%s, availability=%d, state=%s", account.username, account.availability, account.state);
424                                         // If an account is not offline, then we can clear out any notifications
425                                         // that may have been queued from losing wifi connectivity when the screen turned off
426 @@ -216,7 +250,11 @@
427                 this.handleHistoryListDelete = this.handleHistoryListDelete.bindAsEventListener(this);
428                 this.handleBuddyListTap = this.handleBuddyListTap.bindAsEventListener(this);
429                 this.handleAvailabilityPickerTap = this.handleAvailabilityPickerTap.bindAsEventListener(this);
430 -               this.customMessageUpdate = this.customMessageUpdate.bind(this);
431 +               this.handleAvailabilityPickerHold = this.handleAvailabilityPickerHold.bindAsEventListener(this);
432 +               this.customMessageSelect = this.customMessageSelect.bindAsEventListener(this);
433 +               this.customMessageCancel = this.customMessageCancel.bindAsEventListener(this);
434 +               this.customMessageUpdateTap = this.customMessageUpdate.bindAsEventListener(this, true);
435 +               this.customMessageUpdateHold = this.customMessageUpdate.bindAsEventListener(this, false);
436                 this.handleScreenStateChange = this.handleScreenStateChange.bind(this);
437                 this.handleFocus = this.handleFocus.bind(this);
438                 this.handleLoseFocus = this.handleLoseFocus.bind(this);
439 @@ -418,7 +456,9 @@
440                                 }.bind(this),
441                                 template: 'listview/historyList-divider'
442                         },
443 -                       swipeDelete: true,
444 +                       swipeDelete: {
445 +                               autoConfirm: !this.Messaging.messagingPrefs.getUseDeleteConfirmation()
446 +                       },
447                         uniquenessProperty: '_id',
448                         revisionProperty: '_rev',
449                         delay: 500
450 @@ -650,6 +690,54 @@
451         },
452         
453         handleAvailabilityPickerTap: function(event) {
454 +               var accountsList = [];
455 +               var accountNames = {};
456 +
457 +               for(var alias in this.accountsData) {
458 +                       accountsList.push({label: alias});
459 +                       
460 +                       var listLength = accountsList.length;
461 +                       
462 +                       for(var i = 0; i < this.accountsData[alias].length; i++) {
463 +                               if(this.availabilityData[this.accountsData[alias][i].accountId]) {
464 +                                       var availability = this.availabilityData[this.accountsData[alias][i].accountId].availability;
465 +                       
466 +                                       if(availability == this.Messaging.Availability.AVAILABLE)
467 +                                               var icon = 'status-available';
468 +                                       else if(availability == this.Messaging.Availability.BUSY)
469 +                                               var icon = 'status-away';
470 +                                       else if(availability == this.Messaging.Availability.INVISIBLE)
471 +                                               var icon = 'status-invisible';
472 +                                       else
473 +                                               var icon = 'status-offline';
474 +                       
475 +                                       accountNames[this.accountsData[alias][i].accountId] = alias + " - " + this.accountsData[alias][i].username;
476 +                       
477 +                                       accountsList.push({
478 +                                               label: this.accountsData[alias][i].username, 
479 +                                               command: this.accountsData[alias][i].accountId, 
480 +                                               secondaryIcon: icon});
481 +                               }
482 +                       }
483 +                       
484 +                       if(listLength == accountsList.length)
485 +                               accountsList.splice(listLength - 1, 1);
486 +               }
487 +               
488 +               if(accountsList.length <= 2)
489 +                       this.handleAvailabilityPickerHold(event);
490 +               else {
491 +                       this.controller.popupSubmenu({
492 +                               onChoose: this.handleAccountSelection.bind(this, event.target, accountNames),
493 +                               placeNear: event.target,
494 +                               items: accountsList
495 +                       });
496 +               }
497 +       },
498 +
499 +       handleAvailabilityPickerHold: function(event) {
500 +               event.stop();
501 +               
502                 this.controller.popupSubmenu({
503                         onChoose: this.handleAvailabilitySelection.bind(this),
504                         toggleCmd: this.Messaging.Availability.getAvailabilityAsConstText(this.currentAvailability),
505 @@ -667,10 +755,12 @@
506                         this.customMessageTextWidgetModel.value = "";
507                         this.customMessageTextWidgetModel.disabled = true;
508                 } else {
509 +                       this.customMessageTextWidgetModel.value = "";
510                         this.customMessageTextWidgetModel.disabled = false;
511 -                       if (this.customMessage) {
512 +/*                     if (this.customMessage) {
513                                 this.customMessageTextWidgetModel.value = this.customMessage;
514                         }
515 +*/
516                 }
517                 
518                 if (update) {
519 @@ -701,10 +791,13 @@
520                 // the checkmark image to commit changes
521                 this.customMessageField = this.controller.get('customMessageTextWidget').querySelector('[name=customMessageTextElement]');
522                 //this.customMessage = this.customMessageField.value;
523 -               this.customMessageField.observe('blur', this.customMessageUpdate);
524 +               this.customMessageField.observe('focus', this.customMessageSelect);
525 +               this.customMessageField.observe('blur', this.customMessageCancel);
526                 this.customMessageField.observe('keyup', this.handleCustomMessageFieldKeyUp);
527 -               this.commitCustomMessageElement.observe(Mojo.Event.tap, this.customMessageUpdate);
528 +               this.commitCustomMessageElement.observe(Mojo.Event.tap, this.customMessageUpdateTap);
529 +               this.commitCustomMessageElement.observe(Mojo.Event.hold, this.customMessageUpdateHold);
530                 this.availabilityPickerElement.observe(Mojo.Event.tap, this.handleAvailabilityPickerTap);
531 +               this.availabilityPickerElement.observe(Mojo.Event.hold, this.handleAvailabilityPickerHold);
532  
533                 this.controller.document.addEventListener(Mojo.Event.stageActivate, this.handleFocus, false);
534                 this.controller.document.addEventListener(Mojo.Event.stageDeactivate, this.handleLoseFocus, false);
535 @@ -1752,10 +1845,13 @@
536                 this.historyIndexedList.stopObserving(Mojo.Event.listTap, this.handleHistoryListTap);
537                 this.historyIndexedList.stopObserving(Mojo.Event.listDelete, this.handleHistoryListDelete);
538                 this.buddyIndexedList.stopObserving(Mojo.Event.listTap, this.handleBuddyListTap);
539 -               this.customMessageField.stopObserving('blur', this.customMessageUpdate);
540 +               this.customMessageField.stopObserving('focus', this.customMessageSelect);
541 +               this.customMessageField.stopObserving('blur', this.customMessageCancel);
542                 this.customMessageField.stopObserving('keyup', this.handleCustomMessageFieldKeyUp);
543 -               this.commitCustomMessageElement.stopObserving(Mojo.Event.tap, this.customMessageUpdate);
544 +               this.commitCustomMessageElement.stopObserving(Mojo.Event.tap, this.customMessageUpdateTap);
545 +               this.commitCustomMessageElement.stopObserving(Mojo.Event.hold, this.customMessageUpdateHold);
546                 this.availabilityPickerElement.stopObserving(Mojo.Event.tap, this.handleAvailabilityPickerTap);
547 +               this.availabilityPickerElement.stopObserving(Mojo.Event.hold, this.handleAvailabilityPickerHold);
548                 this.Messaging.DisplayState.stopObserving(this.handleScreenStateChange);
549                 this.controller.document.removeEventListener(Mojo.Event.stageActivate, this.handleFocus, false);
550                 this.controller.document.removeEventListener(Mojo.Event.stageDeactivate, this.handleLoseFocus, false);
551 @@ -1763,6 +1859,50 @@
552                 this.Messaging.listviewSceneAssistant = null; // null out the reference to the listview so that it can get garbage collected
553         },
554  
555 +       handleAccountSelection: function(target, accountNames, accountId) {
556 +               if(accountId) {
557 +                       var availabilityList = [{label: accountNames[accountId]}];
558 +                       
559 +                       availabilityList = availabilityList.concat(this.availabilities);
560 +               
561 +                       var currentAvailability = this.Messaging.Availability.getAvailabilityAsConstText(this.Messaging.Availability.OFFLINE);
562 +
563 +                       if(this.availabilityData[accountId]) {
564 +                               var availability = this.availabilityData[accountId].availability;
565 +                               
566 +                               currentAvailability = this.Messaging.Availability.getAvailabilityAsConstText(availability);
567 +                       }
568 +       
569 +                       this.controller.popupSubmenu({
570 +                               onChoose: this.handleAccountAvailabilitySelection.bind(this, accountId),
571 +                               toggleCmd: currentAvailability,
572 +                               placeNear: target,
573 +                               items: availabilityList
574 +                       });
575 +               }
576 +       },
577 +       
578 +       handleAccountAvailabilitySelection: function(accountId, availabilityString) {
579 +               if((availabilityString) && (this.availabilityData[accountId])) {
580 +                       var availabilityInteger = this.Messaging.Availability.getAvailabilityAsInteger(availabilityString);
581 +
582 +                       MessagingDB.IMLoginState.setAvailability(availabilityInteger, this.availabilityData[accountId].objectId);
583 +
584 +                       if(availabilityInteger < 4) {
585 +                               for(var i = 0; i < this.appController.Messaging.IMAccounts.data.length; i++) {
586 +                                        var capability = this.appController.Messaging.IMAccounts.data[i].capabilityProviders;
587 +
588 +                                        for (var j = 0; j< capability.length; j++) {
589 +                                               if(capability[j].capability === "MESSAGING" && capability[j].wanOnly === true){
590 +                                                       this.checkWANConnection(capability[j]);
591 +                                                       break;
592 +                                               }
593 +                                       }
594 +                               }
595 +                       }
596 +               }
597 +       },
598 +       
599         handleAvailabilitySelection: function(availabilityString) {
600                 var availabilityInteger;
601                 
602 @@ -1879,15 +2019,133 @@
603                         this.appController.notificationAssistant.clearMessageDashboard();
604                 }
605         },
606 -       
607 -       customMessageUpdate: function(e) {
608 +
609 +       customMessageUpdate: function(e, select, accountId) {
610 +               e.stop();
611 +               
612 +               if(select) {
613 +                       var count = 0;
614 +                       var accountsList = [];
615 +
616 +                       for(var alias in this.accountsData) {
617 +                               accountsList.push({label: alias});
618 +
619 +                               var listLength = accountsList.length;
620 +
621 +                               for(var i = 0; i < this.accountsData[alias].length; i++) {
622 +                                       if(this.availabilityData[this.accountsData[alias][i].accountId]) {
623 +                                               count++;
624 +                                       
625 +                                               var availability = this.availabilityData[this.accountsData[alias][i].accountId].availability;
626 +                                       
627 +                                               if((availability != this.Messaging.Availability.OFFLINE) && 
628 +                                                       (availability != this.Messaging.Availability.PENDING))
629 +                                               {
630 +                                                       accountsList.push({
631 +                                                               label: this.accountsData[alias][i].username, 
632 +                                                               command: this.accountsData[alias][i].accountId});
633 +                                               }
634 +                                       }
635 +                               }
636 +                               
637 +                               if(listLength == accountsList.length)
638 +                                       accountsList.splice(listLength - 1, 1);
639 +                       }
640 +               
641 +                       if(count > 1) {
642 +                               this.controller.popupSubmenu({
643 +                                       onChoose: this.customMessageUpdate.bind(this, e, false),
644 +                                       placeNear: e.target,
645 +                                       items: accountsList
646 +                               });
647 +
648 +                               return;
649 +                       }
650 +               }
651 +
652 +               var objectId = null;
653 +
654 +               if((accountId) && (this.availabilityData[accountId]))
655 +                       objectId = this.availabilityData[accountId].objectId;
656 +
657                 var newMessage = this.customMessageField.value;
658                 // Set the new custom message if it has changed or if it has been cleared
659 -               if ((newMessage.length > 0 && newMessage !== this.customMessage) ||
660 -               (newMessage.length === 0 && this.customMessage.length > 0)) {
661 +//             if ((newMessage.length > 0 && newMessage !== this.customMessage) ||
662 +//             (newMessage.length === 0 && this.customMessage.length > 0)) {
663                         this.customMessage = newMessage;
664 -                       MessagingDB.IMLoginState.setCustomMessage(this.customMessage);
665 +                       MessagingDB.IMLoginState.setCustomMessage(this.customMessage, objectId);
666                         this.updateCustomMessageCommitIcon();
667 +//             }
668 +
669 +               this.controller.get('customMessageTextWidget').mojo.blur();
670 +       },
671 +       
672 +       customMessageSelect: function(event) {
673 +               var messagesList = [];
674 +               this.customMessage = null;                      
675 +
676 +               this.customMessageTextWidgetModel.value = "";
677 +               this.controller.modelChanged(this.customMessageTextWidgetModel);
678 +
679 +               messagesList.push({label: $L("New custom message..."), command: "empty"});
680 +
681 +               for(var alias in this.accountsData) {
682 +                       for(var i = 0; i < this.accountsData[alias].length; i++) {
683 +                               if(this.availabilityData[this.accountsData[alias][i].accountId]) {
684 +                                       if((this.availabilityData[this.accountsData[alias][i].accountId].customMessage) &&
685 +                                               (this.availabilityData[this.accountsData[alias][i].accountId].customMessage.length > 0))
686 +                                       {
687 +                                               messagesList.push({label: alias + " - " + this.accountsData[alias][i].username});
688 +
689 +                                               messagesList.push({
690 +                                                       label: this.availabilityData[this.accountsData[alias][i].accountId].customMessage, 
691 +                                                       command: this.accountsData[alias][i].accountId});
692 +                                       }
693 +                               }
694 +                       }
695 +               }
696 +       
697 +               if(messagesList.length > 2) {
698 +                       this.controller.popupSubmenu({
699 +                               onChoose: this.customMessageFill.bind(this),
700 +                               placeNear: event.target,
701 +                               items: messagesList
702 +                       });
703 +               }
704 +               else
705 +                       this.controller.get('commitCustomMessage').show();
706 +       },
707 +       
708 +       customMessageCancel: function(event) {
709 +               this.customMessage = '';
710 +       
711 +               this.customMessageTextWidgetModel.value = '';
712 +               this.controller.modelChanged(this.customMessageTextWidgetModel);
713 +
714 +               this.updateCustomMessageCommitIcon();
715 +       },
716 +       
717 +       customMessageFill: function(accountId) {
718 +               if(accountId) {
719 +                       if(accountId == "empty") {
720 +                               this.controller.get('commitCustomMessage').show();
721 +                       }
722 +                       else {
723 +                               if((this.availabilityData[accountId]) && 
724 +                                       (this.availabilityData[accountId].customMessage) &&
725 +                                       (this.availabilityData[accountId].customMessage.length > 0))
726 +                               {
727 +                                       var msg = this.availabilityData[accountId].customMessage;
728 +               
729 +                                       this.customMessageTextWidgetModel.value = msg;
730 +                                       this.controller.modelChanged(this.customMessageTextWidgetModel);
731 +
732 +                                       this.updateCustomMessageCommitIcon();
733 +                               }
734 +                       }
735 +               }
736 +               else {
737 +                       this.customMessageCancel();
738                 }
739         },
740         
741 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/notification-assistant.js
742 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/notification-assistant.js
743 @@ -9,6 +9,7 @@
744         // a reference to this is passed to the dashboard assistant
745         this.messageDashboardData = {};
746         this.inviteDashboardData = {};
747 +       this.notificationsData = {};
748         this.class0AlertData = {
749                 list: []
750         };
751 @@ -230,20 +231,75 @@
752   */
753  
754  NotificationAssistant.prototype.considerForNotification = function(notificationData){
755 -       if (!this.Messaging.messagingPrefs.getNotificationsEnabled()) {
756 +       if(!notificationData.message)
757 +               return;
758 +
759 +       if (!this.Messaging.messagingPrefs.getNotificationsEnabled(notificationData.message.serviceName)) {
760                 Mojo.Log.info("Notification Assistant - Consider for Notification - Notifications are disabled");       
761                 return;
762         }
763         
764         // check if we should only play a sound (when you are already in a chat & a new message comes in)
765 -       if(notificationData.playSoundOnly && this.Messaging.messagingPrefs.getNotificationSound()) {
766 +       if(notificationData.playSoundOnly && this.Messaging.messagingPrefs.getNotificationSound(notificationData.message.serviceName)) {
767                 var notifParams = {};
768 -               this.setNotificationSound(notifParams);
769 -               this.controller.playSoundNotification(notifParams.soundClass, notifParams.soundFile);
770 +
771 +               var future;
772 +               if (MessagingLib.Utils.isTextMessage(notificationData.message.serviceName)) {
773 +                       if(notificationData.message.from.addr.indexOf("@") == -1)
774 +                               future = ContactsLib.Person.findByPhone(notificationData.message.from.addr);
775 +                       else
776 +                               future = ContactsLib.Person.findByEmail(notificationData.message.from.addr);
777 +               }
778 +               else {
779 +                       future = ContactsLib.Person.findByIM(notificationData.message.from.addr, notificationData.message.serviceName);
780 +               }
781 +               
782 +               future.then(this, function(future){
783 +                       if (future.result) {
784 +                               if(MessagingLib.Utils.isTextMessage(notificationData.message.serviceName)) {
785 +                                       notificationData.soundClass = future.result.getMsgAlert().getAlert();
786 +                                       notificationData.ringtonePath = future.result.getMsgRingtone().getLocation();
787 +                               }
788 +                               else {
789 +                                       notificationData.soundClass = future.result.getIMsgAlert().getAlert();
790 +                                       notificationData.ringtonePath = future.result.getIMsgRingtone().getLocation();
791 +                               }
792 +                                                       
793 +                               this.setNotificationSound(notifParams, notificationData);
794 +                               this.controller.playSoundNotification(notifParams.soundClass, notifParams.soundFile);
795 +
796 +                               future.result = future.result;
797 +                       }
798 +                       else if(MessagingLib.Utils.isTextMessage(notificationData.message.serviceName)) {
799 +                               if(this.contactPrefs)
800 +                                       delete this.contactPrefs;
801 +       
802 +                               this.contactPrefs = new ContactsLib.AppPrefs(function(future) {
803 +                                       var prefs = this.contactPrefs.get(ContactsLib.AppPrefs.Pref.unknownContacts);
804 +
805 +                                       if((prefs) && (prefs.msgAlert)) {
806 +                                               notificationData.soundClass = prefs.msgAlert;
807 +                                               notificationData.ringtonePath = prefs.msgRingtonePath;
808 +                                       }
809 +                                       
810 +                                       this.setNotificationSound(notifParams, notificationData);
811 +                                       this.controller.playSoundNotification(notifParams.soundClass, notifParams.soundFile);
812 +                                                                               
813 +                                       future.result = future.result;
814 +                               }.bind(this, future));                  
815 +                       }
816 +                       else {
817 +                               this.setNotificationSound(notifParams, notificationData);
818 +                               this.controller.playSoundNotification(notifParams.soundClass, notifParams.soundFile);
819 +
820 +                               future.result = future.result;
821 +                       }
822 +               });
823 +               
824                 return; // don't display any visual notification
825         }       
826         //TODO: does sendFailure and connectionFailure need displayName?
827 -       if (Object.keys(notificationData).length > 0 && this.Messaging.messagingPrefs.getNotificationsEnabled()) {
828 +       if (Object.keys(notificationData).length > 0 && this.Messaging.messagingPrefs.getNotificationsEnabled(notificationData.message.serviceName)) {
829                 var notificationType = notificationData.notificationType;
830                 if (notificationType === this.Messaging.notificationTypes.newMessage) {
831                         this.preSendNewMessageNotificationAndUpdateDashboard(notificationData);
832 @@ -336,7 +392,10 @@
833         if (notificationData.message.displayName === undefined) {
834                 var future;
835                 if (MessagingLib.Utils.isTextMessage(notificationData.message.serviceName)) {
836 -                       future = ContactsLib.Person.findByPhone(notificationData.message.from.addr);
837 +                       if(notificationData.message.from.addr.indexOf("@") == -1)
838 +                               future = ContactsLib.Person.findByPhone(notificationData.message.from.addr);
839 +                       else
840 +                               future = ContactsLib.Person.findByEmail(notificationData.message.from.addr);
841                 }
842                 else {
843                         future = ContactsLib.Person.findByIM(notificationData.message.from.addr, notificationData.message.serviceName);
844 @@ -344,17 +403,51 @@
845                 
846                 future.then(this, function(future){
847                         if (future.result) {
848 +                               if(MessagingLib.Utils.isTextMessage(notificationData.message.serviceName)) {
849 +                                       notificationData.soundClass = future.result.getMsgAlert().getAlert();
850 +                                       notificationData.ringtonePath = future.result.getMsgRingtone().getLocation();
851 +                               }
852 +                               else {
853 +                                       notificationData.soundClass = future.result.getIMsgAlert().getAlert();
854 +                                       notificationData.ringtonePath = future.result.getIMsgRingtone().getLocation();
855 +                               }
856 +                                                       
857                                 notificationData.message.displayName = future.result.generateDisplayName(false);
858 +
859 +                               future.result = future.result;
860 +                               this.sendNewMessageNotificationAndUpdateDashboard(notificationData);
861 +                       }
862 +                       else if(MessagingLib.Utils.isTextMessage(notificationData.message.serviceName)) {
863 +                               if(this.contactPrefs)
864 +                                       delete this.contactPrefs;
865 +       
866 +                               this.contactPrefs = new ContactsLib.AppPrefs(function(future) {
867 +                                       var prefs = this.contactPrefs.get(ContactsLib.AppPrefs.Pref.unknownContacts);
868 +
869 +                                       if((prefs) && (prefs.msgAlert)) {
870 +                                               notificationData.soundClass = prefs.msgAlert;
871 +                                               notificationData.ringtonePath = prefs.msgRingtonePath;
872 +
873 +                                               this.sendNewMessageNotificationAndUpdateDashboard(notificationData, true);
874 +                                       }
875 +                                       else
876 +                                               this.sendNewMessageNotificationAndUpdateDashboard(notificationData);
877 +                                       
878 +                                       future.result = future.result;
879 +
880 +                               }.bind(this, future));                  
881 +                       }
882 +                       else {
883 +                               future.result = future.result;
884 +                               this.sendNewMessageNotificationAndUpdateDashboard(notificationData);
885                         }
886 -                       future.result = future.result;
887 -                       this.sendNewMessageNotificationAndUpdateDashboard(notificationData);
888                 });
889         }
890         else {
891                 this.sendNewMessageNotificationAndUpdateDashboard(notificationData);
892         }
893  };
894 -NotificationAssistant.prototype.sendNewMessageNotificationAndUpdateDashboard = function(notificationData){
895 +NotificationAssistant.prototype.sendNewMessageNotificationAndUpdateDashboard = function(notificationData, unknownContact){
896         var messageData = notificationData.message;
897         var chatThreadId;
898         if(messageData.conversations !== undefined && messageData.conversations.length > 0) {
899 @@ -411,7 +504,7 @@
900         var bannerParams = {
901                 messageText: notificationText
902         };
903 -       this.setNotificationSound(bannerParams);
904 +       this.setNotificationSound(bannerParams, notificationData);
905         var bannerLaunchParams =  {
906                 chatThreadId: chatThreadId,
907                 clearBanner: true               
908 @@ -480,11 +573,16 @@
909         var dashboard = this.controller.getStageController(dashboardStagename);
910         
911         if (dashboard) {
912 -               dashboard.delegateToSceneAssistant("update", true);
913 +               if(this.Messaging.messagingPrefs.getNotificationBlink(notificationData.message.serviceName))
914 +                       dashboard.delegateToSceneAssistant("update", true);
915 +               else
916 +                       dashboard.delegateToSceneAssistant("update", false);            
917         } else {
918 +               var blinkNotify = this.Messaging.messagingPrefs.getNotificationBlink(notificationData.message.serviceName);
919 +       
920                 // Create a dashboard
921                 var f = function(stageController){
922 -                       stageController.pushScene('dashboardMessage', dashboardData);
923 +                       stageController.pushScene('dashboardMessage', dashboardData, blinkNotify);
924                 }.bind(this);
925                 var params = {
926                         name: dashboardStagename,
927 @@ -509,6 +607,9 @@
928                         createDashboard(); // if the screen is off, create the dashboard right away
929                 }
930         }
931 +       
932 +       if(!unknownContact)
933 +               this.schedulePlayNotificationSoundTasks(notificationData.message.serviceName);
934  };
935  
936  // ISSUES: what are the error types?  What is the max number / types of dashboards that we could have?
937 @@ -542,7 +643,7 @@
938         var bannerParams = {
939                 messageText: notificationText.escapeHTML()
940         };
941 -       if (this.Messaging.messagingPrefs.getNotificationSound() !== "mute") {
942 +       if (this.Messaging.messagingPrefs.getNotificationSound(notificationData.message.serviceName) !== "mute") {
943                 bannerParams.soundClass = "alerts";     
944         }
945         var bannerLaunchParams =  {
946 @@ -747,6 +848,8 @@
947  };
948  
949  NotificationAssistant.prototype.clearNotificationsForChat = function(chatThreadId){    
950 +       this.removePlayNotificationSoundTasks();
951 +
952         var i;
953         var newestTimestamp = 0;
954         var newestChat;
955 @@ -841,6 +944,8 @@
956  };
957  
958  NotificationAssistant.prototype.resetNewMessages = function(){
959 +       this.removePlayNotificationSoundTasks();
960 +               
961         this.messageDashboardData = {};
962  };
963  
964 @@ -849,8 +954,12 @@
965  };
966  
967  NotificationAssistant.prototype.clearMessageDashboard = function(){
968 -       var dashboard = this.controller.getStageController(DashboardMessageStageName);
969 +       this.removePlayNotificationSoundTasks();
970 +
971         this.messageDashboardData = {};
972 +
973 +       var dashboard = this.controller.getStageController(DashboardMessageStageName);
974 +
975         if (dashboard) {
976                 dashboard.delegateToSceneAssistant("closeDashboard");
977         }
978 @@ -884,15 +993,26 @@
979         }
980  };
981  
982 -NotificationAssistant.prototype.setNotificationSound = function(bannerParams){
983 -       switch (this.Messaging.messagingPrefs.getNotificationSound()) {
984 +NotificationAssistant.prototype.setNotificationSound = function(bannerParams, notificationData){
985 +       var soundClass = this.Messaging.messagingPrefs.getNotificationSound(notificationData.message.serviceName);
986 +       var ringtonePath = this.Messaging.messagingPrefs.getRingtone(notificationData.message.serviceName).path;
987 +
988 +       if((notificationData.soundClass != undefined) && 
989 +               (notificationData.soundClass != "") &&
990 +               (notificationData.soundClass != "default"))
991 +       {
992 +               soundClass = notificationData.soundClass;
993 +               ringtonePath = notificationData.ringtonePath;           
994 +       }
995 +       
996 +       switch (soundClass) {
997                 case "alert": 
998                         bannerParams.soundClass = "notifications";
999                         bannerParams.soundFile = undefined;
1000                         break;
1001                 case "ringtone":
1002                         bannerParams.soundClass = "notifications";
1003 -                       bannerParams.soundFile = this.Messaging.messagingPrefs.getRingtone().path;
1004 +                       bannerParams.soundFile = ringtonePath;
1005                         break;
1006                 case "vibrate":
1007                         bannerParams.soundClass = "vibrate";
1008 @@ -907,4 +1027,74 @@
1009         Mojo.Log.info("setNotificationSound result=%j", bannerParams);
1010  };
1011  
1012 +NotificationAssistant.prototype.schedulePlayNotificationSoundTasks = function(serviceName) {
1013 +       var repeatDelay = 0;
1014 +       var currentTime = new Date();
1015 +
1016 +       if(this.notificationsData[serviceName] == undefined)
1017 +               this.notificationsData[serviceName] = 0;
1018 +       
1019 +       for(var serviceName in this.notificationsData) {
1020 +               if(this.Messaging.messagingPrefs.getNotificationsEnabled(serviceName) == false) {
1021 +                       delete this.notificationsData[serviceName];
1022 +               }
1023 +               else if((this.Messaging.messagingPrefs.getNotificationSound(serviceName) != "mute") &&
1024 +                       (this.Messaging.messagingPrefs.getRepeatInterval(serviceName) != 0))
1025 +               {
1026 +                       if(this.notificationsData[serviceName]++ >= this.Messaging.messagingPrefs.getRepeatLimit(serviceName)) {
1027 +                               delete this.notificationsData[serviceName];
1028 +                       }
1029 +                       else {
1030 +                               var repeatInterval = this.Messaging.messagingPrefs.getRepeatInterval(serviceName);
1031 +               
1032 +                               var playSoundTime = new Date(currentTime.getTime() + (parseInt(repeatInterval) * 1000) + (repeatDelay++ * 10));
1033 +
1034 +                               var month = playSoundTime.getUTCMonth()+1;
1035 +                               if(month < 10) month = "0" + month;
1036 +                               var day = playSoundTime.getUTCDate();
1037 +                               if(day < 10) day = "0" + day;
1038 +                               var year = playSoundTime.getUTCFullYear();
1039 +
1040 +                               var hours = playSoundTime.getUTCHours();
1041 +                               if(hours < 10) hours = "0" + hours;
1042 +                               var minutes = playSoundTime.getUTCMinutes();
1043 +                               if(minutes < 10) minutes = "0" + minutes;
1044 +                               var seconds = playSoundTime.getUTCSeconds();
1045 +                               if(seconds < 10) seconds = "0" + seconds;
1046 +
1047 +                               var scheduledTimeStr = month + "/" + day + "/" + year + " " + hours + ":" + minutes + ":" + seconds;
1048 +               
1049 +                               this.updateTimeoutRequest = new Mojo.Service.Request('palm://com.palm.power/timeout/', {
1050 +                                       'method': "set", 'parameters': { 'key': 'messagingPlayNotificationSound-' + serviceName, 
1051 +                                       'wakeup': true, 'at': scheduledTimeStr, 'uri': "palm://com.palm.applicationManager/open", 
1052 +                                       'params': {'id': 'com.palm.app.messaging', 'params': {'serviceName': serviceName,
1053 +                                               'playNotificationSound': this.notificationsData[serviceName]}}} }); 
1054 +                       }
1055 +               }
1056 +       }
1057 +};
1058 +       
1059 +NotificationAssistant.prototype.removePlayNotificationSoundTasks = function() {
1060 +       for(var serviceName in this.notificationsData) {
1061 +               if(this.notificationsData[serviceName] > 0) {
1062 +                       this.removeTimeoutRequest = new Mojo.Service.Request("palm://com.palm.power/timeout/", {
1063 +                               'method': "clear", 'parameters': {"key": 'messagingPlayNotificationSound-' + serviceName} });
1064 +               }
1065 +       }
1066 +       
1067 +       this.notificationsData = {};
1068 +};
1069 +
1070 +NotificationAssistant.prototype.playNotificationSound = function(serviceName) {
1071 +       var notifyType = this.Messaging.messagingPrefs.getNotificationSound(serviceName);
1072 +
1073 +       var ringtonePath = this.Messaging.messagingPrefs.getRingtone(serviceName).path;
1074 +               
1075 +       if(notifyType == "ringtone")
1076 +               this.controller.playSoundNotification("notifications", ringtonePath);
1077 +       else if(notifyType == "alert")
1078 +               this.controller.playSoundNotification("notifications");
1079 +       else if(notifyType == "vibrate")
1080 +               this.controller.playSoundNotification("vibrate");       
1081 +};
1082  
1083 --- .orig/usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
1084 +++ /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
1085 @@ -150,6 +150,10 @@
1086                 margin: 1px -4px 0px -4px;
1087  }
1088  
1089 +.buddy-list .palm-row {
1090 +               height: auto;
1091 +}
1092 +
1093  /* background: url(../images/simple-splitter.png) bottom left repeat-x;*/
1094  
1095  #groups-list .showGroup {
1096 @@ -1187,6 +1191,23 @@
1097  
1098  /* Preferences */
1099  
1100 +.palm-account-icon.left {
1101 +       float: left;
1102 +}
1103 +.palm-page-header .palm-account-icon {
1104 +       position: absolute;
1105 +       left: 0px;
1106 +       top: 0px;
1107 +       min-height: 52px;
1108 +       width: 56px;
1109 +}
1110 +.default-account-list.palm-account-icon {
1111 +       margin: 0px -5px 0px 10px;
1112 +}
1113 +.palm-account-icon {
1114 +    background: url(../images/serviceicon-sms.png) center center no-repeat;
1115 +}
1116 +
1117  .text-group .title {
1118                 line-height: auto !important;
1119                 padding: 0 !important;
1120 --- .orig/usr/palm/applications/com.palm.app.messaging/app/models/messaging-prefs.js
1121 +++ /usr/palm/applications/com.palm.app.messaging/app/models/messaging-prefs.js
1122 @@ -13,7 +13,7 @@
1123  
1124                 var future = MojoDB.find({
1125                         from: MessagingPrefsService.prefsDB
1126 -               });
1127 +               }, true);
1128  
1129                 future.then(this, function(future) {
1130                         if (future.result.results && future.result.results.length === 0) {
1131 @@ -87,7 +87,18 @@
1132                 }
1133         },
1134         
1135 -       getNotificationsEnabled: function() {
1136 +       getNotificationsEnabled: function(serviceName) {
1137 +               if((serviceName != undefined) && (serviceName != "sms")) {
1138 +                       if (this._prefs === undefined || this._prefs.accountNotifications === undefined ||
1139 +                               this._prefs.accountNotifications[serviceName] === undefined || 
1140 +                               this._prefs.accountNotifications[serviceName].enableNotification === undefined) 
1141 +                       {
1142 +                               return this._getDefaultPrefs().enableNotification;
1143 +                       } else {
1144 +                               return this._prefs.accountNotifications[serviceName].enableNotification;
1145 +                       }
1146 +               }
1147 +               
1148                 if (this._prefs === undefined || this._prefs.enableNotification === undefined) {
1149                         return this._getDefaultPrefs().enableNotification;
1150                 } else {
1151 @@ -95,11 +106,69 @@
1152                 }
1153         },
1154         
1155 -       setNotificationsEnabled: function(enabled) {
1156 -               this._dbMerge({enableNotification:enabled});
1157 +       setNotificationsEnabled: function(enabled, serviceName) {
1158 +               if((serviceName != undefined) && (serviceName != "sms")) {
1159 +                       if (this._prefs.accountNotifications === undefined)
1160 +                               this._prefs.accountNotifications = {};
1161 +
1162 +                       if (this._prefs.accountNotifications[serviceName] === undefined)
1163 +                               this._prefs.accountNotifications[serviceName] = {};
1164 +                       
1165 +                       this._prefs.accountNotifications[serviceName].enableNotification = enabled;
1166 +
1167 +                       this._dbMerge({accountNotifications:this._prefs.accountNotifications});
1168 +               }
1169 +               else
1170 +                       this._dbMerge({enableNotification:enabled});
1171 +       },
1172 +       
1173 +       getNotificationBlink: function(serviceName) {
1174 +               if((serviceName != undefined) && (serviceName != "sms")) {
1175 +                       if (this._prefs === undefined || this._prefs.accountNotifications === undefined ||
1176 +                               this._prefs.accountNotifications[serviceName] === undefined || 
1177 +                               this._prefs.accountNotifications[serviceName].blinkNotification === undefined) 
1178 +                       {
1179 +                               return this._getDefaultPrefs().blinkNotification;
1180 +                       } else {
1181 +                               return this._prefs.accountNotifications[serviceName].blinkNotification;
1182 +                       }
1183 +               }
1184 +               
1185 +               if (this._prefs === undefined || this._prefs.blinkNotification === undefined) {
1186 +                       return this._getDefaultPrefs().blinkNotification;
1187 +               } else {
1188 +                       return this._prefs.blinkNotification;
1189 +               }
1190         },
1191         
1192 -       getNotificationSound: function() {
1193 +       setNotificationBlink: function(blink, serviceName) {
1194 +               if((serviceName != undefined) && (serviceName != "sms")) {
1195 +                       if (this._prefs.accountNotifications === undefined)
1196 +                               this._prefs.accountNotifications = {};
1197 +
1198 +                       if (this._prefs.accountNotifications[serviceName] === undefined)
1199 +                               this._prefs.accountNotifications[serviceName] = {};
1200 +                       
1201 +                       this._prefs.accountNotifications[serviceName].blinkNotification = blink;
1202 +
1203 +                       this._dbMerge({accountNotifications:this._prefs.accountNotifications});
1204 +               }
1205 +               else
1206 +                       this._dbMerge({blinkNotification:blink});
1207 +       },
1208 +
1209 +       getNotificationSound: function(serviceName) {
1210 +               if((serviceName != undefined) && (serviceName != "sms")) {
1211 +                       if (this._prefs === undefined || this._prefs.accountNotifications === undefined ||
1212 +                               this._prefs.accountNotifications[serviceName] === undefined || 
1213 +                               this._prefs.accountNotifications[serviceName].notificationSound === undefined) 
1214 +                       {
1215 +                               return this._getDefaultPrefs().notificationSound;
1216 +                       } else {
1217 +                               return this._prefs.accountNotifications[serviceName].notificationSound;
1218 +                       }
1219 +               }
1220 +               
1221                 if (this._prefs === undefined || this._prefs.notificationSound === undefined) {
1222                         return this._getDefaultPrefs().notificationSound;
1223                 } else {
1224 @@ -107,11 +176,34 @@
1225                 }
1226         },
1227         
1228 -       setNotificationSound: function(sound) {
1229 -               this._dbMerge({notificationSound:sound});
1230 +       setNotificationSound: function(sound, serviceName) {
1231 +               if((serviceName != undefined) && (serviceName != "sms")) {
1232 +                       if (this._prefs.accountNotifications === undefined)
1233 +                               this._prefs.accountNotifications = {};
1234 +
1235 +                       if (this._prefs.accountNotifications[serviceName] === undefined)
1236 +                               this._prefs.accountNotifications[serviceName] = {};
1237 +                       
1238 +                       this._prefs.accountNotifications[serviceName].notificationSound = sound;
1239 +
1240 +                       this._dbMerge({accountNotifications:this._prefs.accountNotifications});
1241 +               }
1242 +               else
1243 +                       this._dbMerge({notificationSound:sound});
1244         },
1245         
1246 -       getRingtone: function() {
1247 +       getRingtone: function(serviceName) {
1248 +               if((serviceName != undefined) && (serviceName != "sms")) {
1249 +                       if (this._prefs === undefined || this._prefs.accountNotifications === undefined ||
1250 +                               this._prefs.accountNotifications[serviceName] === undefined || 
1251 +                               this._prefs.accountNotifications[serviceName].ringtone === undefined)  
1252 +                       {
1253 +                               return this._getDefaultPrefs().ringtone;
1254 +                       } else {
1255 +                               return this._prefs.accountNotifications[serviceName].ringtone;
1256 +                       }
1257 +               }
1258 +               
1259                 if (this._prefs === undefined || this._prefs.ringtone === undefined) {
1260                         return this._getDefaultPrefs().ringtone;
1261                 } else {
1262 @@ -119,11 +211,163 @@
1263                 }
1264         },
1265         
1266 -       setRingtone: function(ringtone) {
1267 +       setRingtone: function(ringtone, serviceName) {
1268                 if (ringtone === undefined) {
1269                         ringtone = {};
1270                 }
1271 -               this._dbMerge({ringtone:ringtone});
1272 +
1273 +               if((serviceName != undefined) && (serviceName != "sms")) {
1274 +                       if (this._prefs.accountNotifications === undefined)
1275 +                               this._prefs.accountNotifications = {};
1276 +
1277 +                       if (this._prefs.accountNotifications[serviceName] === undefined)
1278 +                               this._prefs.accountNotifications[serviceName] = {};
1279 +                       
1280 +                       this._prefs.accountNotifications[serviceName].ringtone = ringtone;
1281 +
1282 +                       this._dbMerge({accountNotifications:this._prefs.accountNotifications});
1283 +               }
1284 +               else
1285 +                       this._dbMerge({ringtone:ringtone});
1286 +       },
1287 +
1288 +       getRepeatInterval: function(serviceName) {
1289 +               if((serviceName != undefined) && (serviceName != "sms")) {
1290 +                       if (this._prefs === undefined || this._prefs.accountNotifications === undefined ||
1291 +                               this._prefs.accountNotifications[serviceName] === undefined || 
1292 +                               this._prefs.accountNotifications[serviceName].repeatInterval === undefined)
1293 +                       {
1294 +                               return this._getDefaultPrefs().repeatInterval;
1295 +                       } else {
1296 +                               return this._prefs.accountNotifications[serviceName].repeatInterval;
1297 +                       }
1298 +               }
1299 +               
1300 +               if (this._prefs === undefined || this._prefs.repeatInterval === undefined) {
1301 +                       return this._getDefaultPrefs().repeatInterval;
1302 +               } else {
1303 +                       return this._prefs.repeatInterval;
1304 +               }
1305 +       },
1306 +       
1307 +       setRepeatInterval: function(interval, serviceName) {
1308 +               if((serviceName != undefined) && (serviceName != "sms")) {
1309 +                       if (this._prefs.accountNotifications === undefined)
1310 +                               this._prefs.accountNotifications = {};
1311 +               
1312 +                       if (this._prefs.accountNotifications[serviceName] === undefined)
1313 +                               this._prefs.accountNotifications[serviceName] = {};
1314 +                       
1315 +                       this._prefs.accountNotifications[serviceName].repeatInterval = interval;
1316 +
1317 +                       this._dbMerge({accountNotifications:this._prefs.accountNotifications});
1318 +               }
1319 +               else
1320 +                       this._dbMerge({repeatInterval:interval});
1321 +       },
1322 +       
1323 +       getRepeatLimit: function(serviceName) {
1324 +               if((serviceName != undefined) && (serviceName != "sms")) {
1325 +                       if (this._prefs === undefined || this._prefs.accountNotifications === undefined ||
1326 +                               this._prefs.accountNotifications[serviceName] === undefined || 
1327 +                               this._prefs.accountNotifications[serviceName].repeatLimit === undefined)
1328 +                       {
1329 +                               return this._getDefaultPrefs().repeatLimit;
1330 +                       } else {
1331 +                               return this._prefs.accountNotifications[serviceName].repeatLimit;
1332 +                       }
1333 +               }
1334 +               
1335 +               if (this._prefs === undefined || this._prefs.repeatLimit === undefined) {
1336 +                       return this._getDefaultPrefs().repeatLimit;
1337 +               } else {
1338 +                       return this._prefs.repeatLimit;
1339 +               }
1340 +       },
1341 +       
1342 +       setRepeatLimit: function(limit, serviceName) {
1343 +               if((serviceName != undefined) && (serviceName != "sms")) {
1344 +                       if(this._prefs.accountNotifications[serviceName] === undefined)
1345 +                               this._prefs.accountNotifications[serviceName] = {};
1346 +                       
1347 +                       this._prefs.accountNotifications[serviceName].repeatLimit = limit;
1348 +
1349 +                       this._dbMerge({accountNotifications:this._prefs.accountNotifications});
1350 +               }
1351 +               else
1352 +                       this._dbMerge({repeatLimit:limit});
1353 +       },
1354 +       
1355 +       getPrependForward: function() {
1356 +               if (this._prefs === undefined || this._prefs.prependForward === undefined) {
1357 +                       return this._getDefaultPrefs().prependForward;
1358 +               } else {
1359 +                       return this._prefs.prependForward;
1360 +               }
1361 +       },
1362 +       
1363 +       setPrependForward: function(forward) {
1364 +               this._dbMerge({prependForward:forward});
1365 +       },
1366 +
1367 +       getMessageGreeting: function() {
1368 +               if (this._prefs === undefined || this._prefs.messageGreeting === undefined) {
1369 +                       return this._getDefaultPrefs().messageGreeting;
1370 +               } else {
1371 +                       return this._prefs.messageGreeting;
1372 +               }
1373 +       },
1374 +       
1375 +       setMessageGreeting: function(greeting) {
1376 +               this._dbMerge({messageGreeting:greeting});
1377 +       },
1378 +
1379 +       getMessageSignature: function() {
1380 +               if (this._prefs === undefined || this._prefs.messageSignature === undefined) {
1381 +                       return this._getDefaultPrefs().messageSignature;
1382 +               } else {
1383 +                       return this._prefs.messageSignature;
1384 +               }
1385 +       },
1386 +       
1387 +       setMessageSignature: function(signature) {
1388 +               this._dbMerge({messageSignature:signature});
1389 +       },
1390 +
1391 +       getUseAutomaticMsgDrafts: function() {
1392 +               if (this._prefs === undefined || this._prefs.useAutomaticMsgDrafts === undefined) {
1393 +                       return this._getDefaultPrefs().useAutomaticMsgDrafts;
1394 +               } else {
1395 +                       return this._prefs.useAutomaticMsgDrafts;
1396 +               }
1397 +       },
1398 +
1399 +       setUseAutomaticMsgDrafts: function(set) {
1400 +               this._dbMerge({useAutomaticMsgDrafts:set});
1401 +       },
1402 +
1403 +       getUseClipboardMsgDrafts: function() {
1404 +               if (this._prefs === undefined || this._prefs.useClipboardMsgDrafts === undefined) {
1405 +                       return this._getDefaultPrefs().useClipboardMsgDrafts;
1406 +               } else {
1407 +                       return this._prefs.useClipboardMsgDrafts;
1408 +               }
1409 +       },
1410 +       
1411 +       setUseClipboardMsgDrafts: function(set) {
1412 +               this._dbMerge({useClipboardMsgDrafts:set});
1413 +       },
1414 +
1415 +       getUseDeleteConfirmation: function() {
1416 +               if (this._prefs === undefined || this._prefs.useDeleteConfirmation === undefined) {
1417 +                       return this._getDefaultPrefs().useDeleteConfirmation;
1418 +               } else {
1419 +                       return this._prefs.useDeleteConfirmation;
1420 +               }
1421 +       },
1422 +
1423 +       setUseDeleteConfirmation: function(set) {
1424 +               this._dbMerge({useDeleteConfirmation:set});
1425         },
1426         
1427         getUseImmediateMmsRetrieval: function() {
1428 @@ -188,12 +432,22 @@
1429                 return {
1430                                 "_kind": MessagingPrefsService.prefsDB,
1431                                 "enableNotification": true,
1432 -                               "notificationSound":"alert",
1433 +                               "blinkNotification": true,
1434 +                               "notificationSound": "alert",
1435                                 "ringtone": {},
1436 +                               "repeatInterval": 0,
1437 +                               "repeatLimit": 3,
1438 +                               "prependForward": false,
1439 +                               "messageGreeting": "",
1440 +                               "messageSignature": "",
1441                                 "isHistoryViewSelected": true,
1442                                 "showOnlineBuddiesOnly": true,
1443                                 "useImmediateMmsRetrieval": true,
1444 -                               "firstUseMode":true
1445 +                               "firstUseMode": true,
1446 +                               "useAutomaticMsgDrafts": true,
1447 +                               "useClipboardMsgDrafts": false,
1448 +                               "useDeleteConfirmation": true,
1449 +                               "accountNotifications": {}
1450                 };
1451         },
1452  
1453 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/prefsAccountSummary-assistant.js
1454 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/prefsAccountSummary-assistant.js
1455 @@ -8,13 +8,15 @@
1456          this.Messaging = this.appController.Messaging;      
1457          this.params = params || {};
1458          this.requests = [];
1459 +        this.listSettingChanged = false;
1460                 
1461                 this.handleAddAccountTap = this.handleAddAccountTap.bindAsEventListener(this);
1462 -               this.notificationToggleChanged = this.notificationToggleChanged.bindAsEventListener(this);
1463 +/*             this.notificationToggleChanged = this.notificationToggleChanged.bindAsEventListener(this);
1464                 this.notificationSoundToggleChanged = this.notificationSoundToggleChanged.bindAsEventListener(this);
1465                 this.chooseNotificationRingtone = this.chooseNotificationRingtone.bindAsEventListener(this);
1466                 this.autoDownloadToggleChanged = this.autoDownloadToggleChanged.bindAsEventListener(this);
1467                 this.deliveryReceiptsToggleChanged = this.deliveryReceiptsToggleChanged.bindAsEventListener(this);
1468 +*/
1469      },
1470   
1471      setup: function(){
1472 @@ -33,24 +35,39 @@
1473                 
1474        this.controller.listen('addAccountButton',Mojo.Event.tap, this.handleAddAccountTap);   
1475     
1476 -      this.controller.listen('currentringtonerow',Mojo.Event.tap, this.chooseNotificationRingtone);
1477 +//      this.controller.listen('currentringtonerow',Mojo.Event.tap, this.chooseNotificationRingtone);
1478      },
1479         
1480         cleanup: function() {
1481                 this.controller.stopListening('addAccountButton',Mojo.Event.tap, this.handleAddAccountTap);
1482 -               if (this.saveSMSPrefs) {
1483 +/*             if (this.saveSMSPrefs) {
1484                         this.controller.stopListening('savePrefs', Mojo.Event.tap, this.saveSMSPrefs);
1485                 }
1486           this.controller.stopListening('deliveryReceiptsToggle',Mojo.Event.propertyChange,this.deliveryReceiptsToggleChanged);
1487        this.controller.stopListening('notificationToggle',Mojo.Event.propertyChange,this.notificationToggleChanged);
1488        this.controller.stopListening('notificationSoundSelector',Mojo.Event.propertyChange,this.notificationSoundToggleChanged);                
1489        this.controller.stopListening('autoDownloadToggle',Mojo.Event.propertyChange,this.autoDownloadToggleChanged);
1490 +*/
1491         },
1492  
1493 -       handleAccountsListTap: function(account, template){
1494 +       handleCommand: function(event){
1495 +               if((event.type == Mojo.Event.back) && (this.listSettingChanged)) {
1496 +             event.stopPropagation();
1497 +          event.preventDefault();
1498 +                       this.controller.stageController.swapScene('listview');
1499 +               }
1500 +       },
1501 +       
1502 +       handleAccountsListTap: function(account, template, target){
1503                 var capabilityProvider = this.getMessagingCapabilityProvider(account);
1504                 var accountSettingsUI;
1505                 
1506 +               if(target == "notifications") {
1507 +             this.controller.stageController.pushScene('prefsSetupNotifications', this.Messaging.messagingPrefs, capabilityProvider.serviceName, account.icon.loc_32x32);
1508 +               
1509 +                       return;
1510 +               }
1511 +               
1512                 if (capabilityProvider && capabilityProvider.settingsUI) {
1513                         accountSettingsUI = capabilityProvider.settingsUI;
1514                         
1515 @@ -76,7 +93,7 @@
1516                         
1517                 }
1518                 else if(capabilityProvider && capabilityProvider.serviceName === undefined && capabilityProvider.capabilitySubtype === "SMS"){
1519 -                       //Do nothing when SMS is taped.
1520 +                       this.controller.stageController.pushScene('prefsSetupSMSAccount', this.Messaging);
1521                 }
1522                 else {
1523                         this.controller.stageController.pushScene("accountlogin", {
1524 @@ -105,12 +122,52 @@
1525       **************************************************/
1526      
1527      preferencesSetup: function() {
1528 -      this.prefsAutoSignIn();
1529 +//      this.prefsAutoSignIn();
1530        //this.prefsSmsMmsSetup();
1531 -      this.prefsNotification();
1532 +//      this.prefsNotification();
1533 +      this.prefsDraftsSetup();
1534 +      this.prefsListSetup();
1535 +    },
1536 +    
1537 +    prefsDraftsSetup: function() {
1538 +       var messageDraftsAttributes = {
1539 +                       trueValue: true,
1540 +                       falseValue: false };
1541 +       
1542 +       this.modelMessageDraftsClipboard = {value: this.Messaging.messagingPrefs.getUseClipboardMsgDrafts()};
1543 +
1544 +               this.controller.setupWidget('prefs-clipboard-drafts-toggle', messageDraftsAttributes, this.modelMessageDraftsClipboard);
1545 +      this.controller.listen('prefs-clipboard-drafts-toggle',Mojo.Event.propertyChange, this.prefsDraftsSave.bind(this));      
1546 +
1547 +       this.modelMessageDraftsAutomatic = {value: this.Messaging.messagingPrefs.getUseAutomaticMsgDrafts()};
1548 +       
1549 +       this.controller.setupWidget('prefs-automatic-drafts-toggle', messageDraftsAttributes, this.modelMessageDraftsAutomatic);
1550 +      this.controller.listen('prefs-automatic-drafts-toggle',Mojo.Event.propertyChange, this.prefsDraftsSave.bind(this));      
1551 +    },
1552 +
1553 +    prefsDraftsSave: function() {
1554 +               this.Messaging.messagingPrefs.setUseClipboardMsgDrafts(this.modelMessageDraftsClipboard.value);
1555 +               this.Messaging.messagingPrefs.setUseAutomaticMsgDrafts(this.modelMessageDraftsAutomatic.value);
1556      },
1557 +                   
1558 +    prefsListSetup: function() {
1559 +       var messageDeleteConfirmAttributes = {
1560 +                       trueValue: true,
1561 +                       falseValue: false };
1562 +       
1563 +       this.modelMessageDeleteConfirm = {value: this.Messaging.messagingPrefs.getUseDeleteConfirmation()};
1564 +       
1565 +       this.controller.setupWidget('prefs-delete-confirmation-toggle', messageDeleteConfirmAttributes, this.modelMessageDeleteConfirm);
1566 +      this.controller.listen('prefs-delete-confirmation-toggle',Mojo.Event.propertyChange, this.prefsListSave.bind(this));      
1567 +    },
1568 +
1569 +    prefsListSave: function() {
1570 +               this.listSettingChanged = true;
1571      
1572 -    prefsAutoSignIn: function() {
1573 +               this.Messaging.messagingPrefs.setUseDeleteConfirmation(this.modelMessageDeleteConfirm.value);
1574 +        },
1575 +
1576 +//    prefsAutoSignIn: function() {
1577        /*
1578        var autoSignin = {
1579          modelProperty : 'auto-signin-toggle',
1580 @@ -126,13 +183,14 @@
1581  //        this.controller.get('AutoSignon').observe('mojo-property-change', 
1582  //                     this.autoSignonChange.bind(this));            
1583         */       
1584 -    },
1585 -    
1586 + //   },
1587 +/*    
1588      prefsSmsMmsSetup: function() {
1589 +*/
1590        /************************
1591        * Setup widgets
1592        ************************/
1593 -      var smscAttributes = {
1594 +/*      var smscAttributes = {
1595          inputName: "smscAddressText",
1596          hintText: '',
1597          modelProperty: 'original',
1598 @@ -187,11 +245,11 @@
1599          value: false
1600        };
1601        this.controller.setupWidget('useSettings', mmsSmsUseSettingsAttributes, this.mmsSmsUseSettingsModel);        
1602 -        
1603 +*/        
1604        /*********************************************
1605        * Methods for rendering existing pref values
1606        *********************************************/        
1607 -      this.renderEditSMSCAddress = function(response) {
1608 + /*     this.renderEditSMSCAddress = function(response) {
1609          this.smscModel.original = response.smscAddr;
1610          this.controller.modelChanged(this.smscModel,this);
1611          this.emailGatewayModel.original = response.emailGateway;
1612 @@ -367,7 +425,7 @@
1613  
1614                 this.controller.get('currentringtone').update(file.name);
1615         }
1616 -       
1617 +*/     
1618  //    editAccount: function(targetRow){
1619  //      // iterate through hidden inputs
1620  //      var inputHash = {};
1621 --- .orig/usr/palm/applications/com.palm.app.messaging/app/views/prefsAccountSummary/prefsAccountSummary-scene.html
1622 +++ /usr/palm/applications/com.palm.app.messaging/app/views/prefsAccountSummary/prefsAccountSummary-scene.html
1623 @@ -5,7 +5,7 @@
1624        <div id="prefHeaderText" class="title" x-mojo-loc=''>Preferences &amp; Accounts</div>
1625      </div>
1626    </div>
1627 -
1628 +<!--
1629         <div class="palm-group">
1630                 <div class="palm-group-title" x-mojo-loc=''>
1631                         New message
1632 @@ -20,8 +20,8 @@
1633                                 </div> 
1634                         </div>                
1635                         <div id="notificationSoundContainer">   
1636 -                               <!-- <div class="palm-row-divider"></div> -->
1637 -                               <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1638 +-->                            <!-- <div class="palm-row-divider"></div> -->
1639 +<!--                           <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1640                                         <div class="palm-row-wrapper">
1641                                                 <div id="notificationSoundSelector" x-mojo-element="ListSelector"></div>
1642                                         </div>
1643 @@ -53,5 +53,43 @@
1644                 </div>
1645         </div>
1646         <div id="accounts_list" x-mojo-element="AccountsList"></div>
1647 +-->
1648 +
1649 +       <div class="palm-group">
1650 +               <div class="palm-group-title" x-mojo-loc=''>Message Drafts</div>
1651 +               <div class="palm-list">
1652 +                       <div class="palm-row first">
1653 +                               <div class="palm-row-wrapper">
1654 +                                       <div x-mojo-element="ToggleButton" id="prefs-clipboard-drafts-toggle"></div>
1655 +                                       <div class="title" x-mojo-loc=''>Copy to Clipboard</div>
1656 +                               </div>
1657 +                       </div>  
1658 +                       <div class="palm-row last">
1659 +                               <div class="palm-row-wrapper">
1660 +                                       <div x-mojo-element="ToggleButton" id="prefs-automatic-drafts-toggle"></div>
1661 +                                       <div class="title" x-mojo-loc=''>Copy to Message</div>
1662 +                               </div>
1663 +                       </div>  
1664 +               </div>
1665 +       </div>
1666 +       
1667 +       <div x-mojo-loc="" class="palm-info-text">The above settings controls how aborted messages are handled.</div>
1668 +
1669 +       <div class="palm-group">
1670 +               <div class="palm-group-title" x-mojo-loc=''>Message List</div>
1671 +               <div class="palm-list">
1672 +                       <div class="palm-row first">
1673 +                               <div class="palm-row-wrapper">
1674 +                                       <div x-mojo-element="ToggleButton" id="prefs-delete-confirmation-toggle"></div>
1675 +                                       <div class="title" x-mojo-loc=''>Delete Confirmation</div>
1676 +                               </div>
1677 +                       </div>  
1678 +               </div>
1679 +       </div>
1680 +
1681 +       <div id="accounts_list" x-mojo-element="AccountsList" class="show-notifications"></div>
1682 +       
1683 +       <div x-mojo-loc="" class="palm-info-text">IM accounts from same provider share notification preferences.</div>
1684 +       
1685         <div id="addAccountButton" class="palm-button" x-mojo-loc=''>Add IM Account</div>
1686  </div>
1687 \ No newline at end of file
1688 --- .orig/usr/palm/applications/com.palm.app.messaging/sources.json
1689 +++ /usr/palm/applications/com.palm.app.messaging/sources.json
1690 @@ -51,6 +51,12 @@
1691      "source": "app\/controllers\/prefsAccountSummary-assistant.js"\r
1692    },\r
1693    {\r
1694 +    "source": "app\/controllers\/prefsSetupSMSAccount-assistant.js"\r
1695 +  },   \r
1696 +  {\r
1697 +    "source": "app\/controllers\/prefsSetupNotifications-assistant.js"\r
1698 +  },   \r
1699 +  {\r
1700      "source": "app\/controllers\/compose-assistant.js"\r
1701    },\r
1702    {\r
1703 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/de/views/prefsAccountSummary/prefsAccountSummary-scene.html
1704 +++ /usr/palm/applications/com.palm.app.messaging/resources/de/views/prefsAccountSummary/prefsAccountSummary-scene.html
1705 @@ -5,7 +5,7 @@
1706        <div id="prefHeaderText" class="title">Einstellungen und Konten</div>
1707      </div>
1708    </div>
1709 -
1710 +<!--
1711         <div class="palm-group">
1712                 <div class="palm-group-title">
1713                         Neue Nachricht
1714 @@ -20,8 +20,8 @@
1715                                 </div> 
1716                         </div>                
1717                         <div id="notificationSoundContainer">   
1718 -                               <!-- <div class="palm-row-divider"></div> -->
1719 -                               <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1720 +-->                            <!-- <div class="palm-row-divider"></div> -->
1721 +<!--                           <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1722                                         <div class="palm-row-wrapper">
1723                                                 <div id="notificationSoundSelector" x-mojo-element="ListSelector"></div>
1724                                         </div>
1725 @@ -53,5 +53,43 @@
1726                 </div>
1727         </div>
1728         <div id="accounts_list" x-mojo-element="AccountsList"></div>
1729 +-->
1730 +
1731 +       <div class="palm-group">
1732 +               <div class="palm-group-title" x-mojo-loc=''>Entwürfe</div>
1733 +               <div class="palm-list">
1734 +                       <div class="palm-row first">
1735 +                               <div class="palm-row-wrapper">
1736 +                                       <div x-mojo-element="ToggleButton" id="prefs-clipboard-drafts-toggle"></div>
1737 +                                       <div class="title" x-mojo-loc=''>In Zwischenablage kopieren</div>
1738 +                               </div>
1739 +                       </div>  
1740 +                       <div class="palm-row last">
1741 +                               <div class="palm-row-wrapper">
1742 +                                       <div x-mojo-element="ToggleButton" id="prefs-automatic-drafts-toggle"></div>
1743 +                                       <div class="title" x-mojo-loc=''>In Nachricht kopieren</div>
1744 +                               </div>
1745 +                       </div>  
1746 +               </div>
1747 +       </div>
1748 +       
1749 +       <div x-mojo-loc="" class="palm-info-text">Die oben genannten Einstelungen kontrollieren, wie abgebrochene Nachrichten behandelt werden.</div>
1750 +
1751 +       <div class="palm-group">
1752 +               <div class="palm-group-title" x-mojo-loc=''>Unterhaltungsliste</div>
1753 +               <div class="palm-list">
1754 +                       <div class="palm-row first">
1755 +                               <div class="palm-row-wrapper">
1756 +                                       <div x-mojo-element="ToggleButton" id="prefs-delete-confirmation-toggle"></div>
1757 +                                       <div class="title" x-mojo-loc=''>Löschbestätigung</div>
1758 +                               </div>
1759 +                       </div>  
1760 +               </div>
1761 +       </div>
1762 +
1763 +       <div id="accounts_list" x-mojo-element="AccountsList" class="show-notifications"></div>
1764 +       
1765 +       <div x-mojo-loc="" class="palm-info-text">IM-Konten von demselben Versorger teilen sich die gleichen Benachrichtigungseinstellungen.</div>
1766 +       
1767         <div id="addAccountButton" class="palm-button">IM-Konto hinzufügen</div>
1768  </div>
1769 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/de/strings.json
1770 +++ /usr/palm/applications/com.palm.app.messaging/resources/de/strings.json
1771 @@ -168,5 +168,25 @@
1772         "You have received an invitation from #{name} (#{addr}) with the message, \"#{message}\"": "Sie haben eine Einladung von #{name} (#{addr}) mit folgender Nachricht erhalten: „#{addr}“",
1773         "You must be connected to your wireless service provider's data network to use #{loc_name}.": "Sie können #{loc_name} erst dann verwenden, wenn Sie mit dem Datennetz Ihres Mobilfunkanbieters verbunden sind.",
1774         "You must be connected to your wireless service provider's data network to use #{loc_shortName}.": "Sie können #{loc_shortName} erst dann verwenden, wenn Sie mit dem Datennetz Ihres Mobilfunkanbieters verbunden sind.",
1775 -       "You must be connected to your wireless service provider's data network to use this service.": "Sie können diesen Dienst erst dann verwenden, wenn Sie mit dem Datennetz Ihres Mobilfunkanbieters verbunden sind."
1776 +       "You must be connected to your wireless service provider's data network to use this service.": "Sie können diesen Dienst erst dann verwenden, wenn Sie mit dem Datennetz Ihres Mobilfunkanbieters verbunden sind.",
1777 +       "Off": "Aus",
1778 +       "On": "Ein",
1779 +       "Disabled": "Ausgeschaltet",
1780 +       "Every 2 minutes": "Alle 2 Minuten",
1781 +       "Every 5 minutes": "Alle 5 Minuten",
1782 +       "Every 15 minutes": "Alle 15 Minuten",
1783 +       "Every 30 minutes": "Alle 30 Minuten",
1784 +       "Every 60 minutes": "Alle 60 Minuten",
1785 +       "Repeat": "Wiederholen",
1786 +       "Repeat infinitely": "unendlich",
1787 +       "Repeat 3 times": "3 Mal",
1788 +       "Repeat 5 times": "5 Mal",
1789 +       "Repeat 10 times": "10 Mal",
1790 +       "Repeat 15 times": "15 Mal",
1791 +       "Repeat 30 times": "30 Mal",
1792 +       "Limitation": "Begrenzung",
1793 +       "New custom message...": "Benutzerdefinierte Nachricht...",
1794 +       "Message greeting text..." : "Begrüßungstext...",
1795 +       "Message signature text..." : "Unterschrifttext...",
1796 +       "Unknown Contacts Notification": "Benachricht. für Unbekannte"
1797  }
1798 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/es/views/prefsAccountSummary/prefsAccountSummary-scene.html
1799 +++ /usr/palm/applications/com.palm.app.messaging/resources/es/views/prefsAccountSummary/prefsAccountSummary-scene.html
1800 @@ -5,7 +5,7 @@
1801        <div id="prefHeaderText" class="title">Preferencias y cuentas</div>
1802      </div>
1803    </div>
1804 -
1805 +<!--
1806         <div class="palm-group">
1807                 <div class="palm-group-title">
1808                         Mensaje nuevo
1809 @@ -20,8 +20,8 @@
1810                                 </div> 
1811                         </div>                
1812                         <div id="notificationSoundContainer">   
1813 -                               <!-- <div class="palm-row-divider"></div> -->
1814 -                               <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1815 +-->                            <!-- <div class="palm-row-divider"></div> -->
1816 +<!--                           <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1817                                         <div class="palm-row-wrapper">
1818                                                 <div id="notificationSoundSelector" x-mojo-element="ListSelector"></div>
1819                                         </div>
1820 @@ -53,5 +53,43 @@
1821                 </div>
1822         </div>
1823         <div id="accounts_list" x-mojo-element="AccountsList"></div>
1824 +-->
1825 +
1826 +       <div class="palm-group">
1827 +               <div class="palm-group-title" x-mojo-loc=''>Borradores del mensaje</div>
1828 +               <div class="palm-list">
1829 +                       <div class="palm-row first">
1830 +                               <div class="palm-row-wrapper">
1831 +                                       <div x-mojo-element="ToggleButton" id="prefs-clipboard-drafts-toggle"></div>
1832 +                                       <div class="title" x-mojo-loc=''>Copiar al portapap.</div>
1833 +                               </div>
1834 +                       </div>  
1835 +                       <div class="palm-row last">
1836 +                               <div class="palm-row-wrapper">
1837 +                                       <div x-mojo-element="ToggleButton" id="prefs-automatic-drafts-toggle"></div>
1838 +                                       <div class="title" x-mojo-loc=''>Copiar al mensaje</div>
1839 +                               </div>
1840 +                       </div>  
1841 +               </div>
1842 +       </div>
1843 +       
1844 +       <div x-mojo-loc="" class="palm-info-text">Los ajustes superiores controlan como se procesan los mensajes abortados.</div>
1845 +
1846 +       <div class="palm-group">
1847 +               <div class="palm-group-title" x-mojo-loc=''>Lista de mensajes</div>
1848 +               <div class="palm-list">
1849 +                       <div class="palm-row first">
1850 +                               <div class="palm-row-wrapper">
1851 +                                       <div x-mojo-element="ToggleButton" id="prefs-delete-confirmation-toggle"></div>
1852 +                                       <div class="title" x-mojo-loc=''>Confirmar borrado</div>
1853 +                               </div>
1854 +                       </div>  
1855 +               </div>
1856 +       </div>
1857 +
1858 +       <div id="accounts_list" x-mojo-element="AccountsList" class="show-notifications"></div>
1859 +       
1860 +       <div x-mojo-loc="" class="palm-info-text">Las cuentas IM de un mismo proveedor comparten las preferencias sobre avisos.</div>
1861 +       
1862         <div id="addAccountButton" class="palm-button">Añadir cuenta de IM</div>
1863  </div>
1864 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/es/strings.json
1865 +++ /usr/palm/applications/com.palm.app.messaging/resources/es/strings.json
1866 @@ -172,5 +172,25 @@
1867         "You have received an invitation from #{name} (#{addr}) with the message, \"#{message}\"": "Recibiste una invitación de #{name} (#{addr}) con este mensaje: \"#{message}\"",
1868         "You must be connected to your wireless service provider's data network to use #{loc_name}.": "Tienes que estar conectado a la red de datos de tu proveedor de servicio inalámbrico para usar #{loc_name}.",
1869         "You must be connected to your wireless service provider's data network to use #{loc_shortName}.": "Tienes que estar conectado a la red de datos de tu proveedor de servicio inalámbrico para usar #{loc_shortName}.",
1870 -       "You must be connected to your wireless service provider's data network to use this service.": "Tienes que estar conectado a la red de datos de tu proveedor de servicio inalámbrico para usar este servicio."
1871 +       "You must be connected to your wireless service provider's data network to use this service.": "Tienes que estar conectado a la red de datos de tu proveedor de servicio inalámbrico para usar este servicio.",
1872 +       "Off": "No",
1873 +       "On": "Sí",
1874 +       "Disabled": "Desactivado",
1875 +       "Every 2 minutes": "Cada 2 minutos",
1876 +       "Every 5 minutes": "Cada 5 minutos",
1877 +       "Every 15 minutes": "Cada 15 minutos",
1878 +       "Every 30 minutes": "Cada 30 minutos",
1879 +       "Every 60 minutes": "Cada 60 minutos",
1880 +       "Repeat": "Repetir",
1881 +       "Repeat infinitely": "Repetir indefinidamente",
1882 +       "Repeat 3 times": "Repetir 3 veces",
1883 +       "Repeat 5 times": "Repetir 5 veces",
1884 +       "Repeat 10 times": "Repetir 10 veces",
1885 +       "Repeat 15 times": "Repetir 15 veces",
1886 +       "Repeat 30 times": "Repetir 30 veces",
1887 +       "Limitation": "Límite",
1888 +       "New custom message...": "Nuevo mensaje person...",
1889 +       "Message greeting text..." : "Texto mensaje felicitación...",
1890 +       "Message signature text..." : "Texto firma mensaje...",
1891 +       "Unknown Contacts Notification": "Aviso contactos desconocidos"
1892  }
1893 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/fr/views/prefsAccountSummary/prefsAccountSummary-scene.html
1894 +++ /usr/palm/applications/com.palm.app.messaging/resources/fr/views/prefsAccountSummary/prefsAccountSummary-scene.html
1895 @@ -5,7 +5,7 @@
1896        <div id="prefHeaderText" class="title">Préférences et comptes</div>
1897      </div>
1898    </div>
1899 -
1900 +<!--
1901         <div class="palm-group">
1902                 <div class="palm-group-title">
1903                         Nouveau message
1904 @@ -20,8 +20,8 @@
1905                                 </div> 
1906                         </div>                
1907                         <div id="notificationSoundContainer">   
1908 -                               <!-- <div class="palm-row-divider"></div> -->
1909 -                               <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1910 +-->                            <!-- <div class="palm-row-divider"></div> -->
1911 +<!--                           <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1912                                         <div class="palm-row-wrapper">
1913                                                 <div id="notificationSoundSelector" x-mojo-element="ListSelector"></div>
1914                                         </div>
1915 @@ -53,5 +53,43 @@
1916                 </div>
1917         </div>
1918         <div id="accounts_list" x-mojo-element="AccountsList"></div>
1919 +-->
1920 +
1921 +       <div class="palm-group">
1922 +               <div class="palm-group-title" x-mojo-loc=''>Brouillons</div>
1923 +               <div class="palm-list">
1924 +                       <div class="palm-row first">
1925 +                               <div class="palm-row-wrapper">
1926 +                                       <div x-mojo-element="ToggleButton" id="prefs-clipboard-drafts-toggle"></div>
1927 +                                       <div class="title" x-mojo-loc=''>Copie dans presse-papier</div>
1928 +                               </div>
1929 +                       </div>  
1930 +                       <div class="palm-row last">
1931 +                               <div class="palm-row-wrapper">
1932 +                                       <div x-mojo-element="ToggleButton" id="prefs-automatic-drafts-toggle"></div>
1933 +                                       <div class="title" x-mojo-loc=''>Copie dans message</div>
1934 +                               </div>
1935 +                       </div>  
1936 +               </div>
1937 +       </div>
1938 +       
1939 +       <div x-mojo-loc="" class="palm-info-text">Les réglages ci-dessus définissent comment sont traités les messages interrompus</div>
1940 +
1941 +       <div class="palm-group">
1942 +               <div class="palm-group-title" x-mojo-loc=''>Liste des messages</div>
1943 +               <div class="palm-list">
1944 +                       <div class="palm-row first">
1945 +                               <div class="palm-row-wrapper">
1946 +                                       <div x-mojo-element="ToggleButton" id="prefs-delete-confirmation-toggle"></div>
1947 +                                       <div class="title" x-mojo-loc=''>Confirmer effacement</div>
1948 +                               </div>
1949 +                       </div>  
1950 +               </div>
1951 +       </div>
1952 +
1953 +       <div id="accounts_list" x-mojo-element="AccountsList" class="show-notifications"></div>
1954 +       
1955 +       <div x-mojo-loc="" class="palm-info-text">Les comptes de messagerie instantanée d’un même fournisseur partagent les mêmes préférences de notification.</div>
1956 +       
1957         <div id="addAccountButton" class="palm-button">Ajouter un compte IM</div>
1958  </div>
1959 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/fr/strings.json
1960 +++ /usr/palm/applications/com.palm.app.messaging/resources/fr/strings.json
1961 @@ -168,5 +168,25 @@
1962         "You have received an invitation from #{name} (#{addr}) with the message, \"#{message}\"": "Vous avez reçu une invitation de #{name} (#{addr}) avec le message « #{message} »",
1963         "You must be connected to your wireless service provider's data network to use #{loc_name}.": "Vous devez être connecté au réseau de votre fournisseur de service mobile pour utiliser #{loc_name}.",
1964         "You must be connected to your wireless service provider's data network to use #{loc_shortName}.": "Vous devez être connecté au réseau de votre fournisseur de service mobile pour utiliser #{loc_shortName}.",
1965 -       "You must be connected to your wireless service provider's data network to use this service.": "Vous devez être connecté au réseau de votre fournisseur de service mobile pour utiliser ce service."
1966 +       "You must be connected to your wireless service provider's data network to use this service.": "Vous devez être connecté au réseau de votre fournisseur de service mobile pour utiliser ce service.",
1967 +       "Off": "Non",
1968 +       "On": "Oui",
1969 +       "Disabled": "Désactivée",
1970 +       "Every 2 minutes": "Toutes les 2 min.",
1971 +       "Every 5 minutes": "Toutes les 5 min.",
1972 +       "Every 15 minutes": "Toutes les 15 min.",
1973 +       "Every 30 minutes": "Toutes les 30 min.",
1974 +       "Every 60 minutes": "Toutes les 60 min.",
1975 +       "Repeat": "Répéter",
1976 +       "Repeat infinitely": "Indéfiniment",
1977 +       "Repeat 3 times": "3 fois",
1978 +       "Repeat 5 times": "5 fois",
1979 +       "Repeat 10 times": "10 fois",
1980 +       "Repeat 15 times": "15 fois",
1981 +       "Repeat 30 times": "30 fois",
1982 +       "Limitation": "Limite",
1983 +       "New custom message...": "Nouveau message perso...",
1984 +       "Message greeting text..." : "Texte de salutation...",
1985 +       "Message signature text..." : "Texte de signature...",
1986 +       "Unknown Contacts Notification": "Gestion des contacts inconnus"                
1987  }
1988 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/fr/ca/views/prefsAccountSummary/prefsAccountSummary-scene.html
1989 +++ /usr/palm/applications/com.palm.app.messaging/resources/fr/ca/views/prefsAccountSummary/prefsAccountSummary-scene.html
1990 @@ -5,7 +5,7 @@
1991        <div id="prefHeaderText" class="title">Préférences et comptes</div>
1992      </div>
1993    </div>
1994 -
1995 +<!--
1996         <div class="palm-group">
1997                 <div class="palm-group-title">
1998                         Nouveau message
1999 @@ -21,8 +21,8 @@
2000                         </div>                
2001                         <div id="notificationSoundContainer">   
2002                                 <!-- <div class="palm-row-divider"></div> -->
2003 -                               <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
2004 -                                       <div class="palm-row-wrapper">
2005 +-->                            <!-- <div class="palm-row-divider"></div> -->
2006 +<!--                           <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
2007                                                 <div id="notificationSoundSelector" x-mojo-element="ListSelector"></div>
2008                                         </div>
2009                                 </div>
2010 @@ -53,5 +53,43 @@
2011                 </div>
2012         </div>
2013         <div id="accounts_list" x-mojo-element="AccountsList"></div>
2014 +-->
2015 +
2016 +       <div class="palm-group">
2017 +               <div class="palm-group-title" x-mojo-loc=''>Brouillons</div>
2018 +               <div class="palm-list">
2019 +                       <div class="palm-row first">
2020 +                               <div class="palm-row-wrapper">
2021 +                                       <div x-mojo-element="ToggleButton" id="prefs-clipboard-drafts-toggle"></div>
2022 +                                       <div class="title" x-mojo-loc=''>Copie dans presse-papier</div>
2023 +                               </div>
2024 +                       </div>  
2025 +                       <div class="palm-row last">
2026 +                               <div class="palm-row-wrapper">
2027 +                                       <div x-mojo-element="ToggleButton" id="prefs-automatic-drafts-toggle"></div>
2028 +                                       <div class="title" x-mojo-loc=''>Copie dans message</div>
2029 +                               </div>
2030 +                       </div>  
2031 +               </div>
2032 +       </div>
2033 +       
2034 +       <div x-mojo-loc="" class="palm-info-text">Les réglages ci-dessus définissent comment sont traités les messages interrompus</div>
2035 +
2036 +       <div class="palm-group">
2037 +               <div class="palm-group-title" x-mojo-loc=''>Liste des messages</div>
2038 +               <div class="palm-list">
2039 +                       <div class="palm-row first">
2040 +                               <div class="palm-row-wrapper">
2041 +                                       <div x-mojo-element="ToggleButton" id="prefs-delete-confirmation-toggle"></div>
2042 +                                       <div class="title" x-mojo-loc=''>Confirmer effacement</div>
2043 +                               </div>
2044 +                       </div>  
2045 +               </div>
2046 +       </div>
2047 +
2048 +       <div id="accounts_list" x-mojo-element="AccountsList" class="show-notifications"></div>
2049 +       
2050 +       <div x-mojo-loc="" class="palm-info-text">Les comptes de messagerie instantanée d’un même fournisseur partagent les mêmes préférences de notification.</div>
2051 +       
2052         <div id="addAccountButton" class="palm-button">Ajouter un compte IM</div>
2053  </div>
2054 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/it/views/prefsAccountSummary/prefsAccountSummary-scene.html
2055 +++ /usr/palm/applications/com.palm.app.messaging/resources/it/views/prefsAccountSummary/prefsAccountSummary-scene.html
2056 @@ -5,7 +5,7 @@
2057        <div id="prefHeaderText" class="title">Preferenze e account</div>
2058      </div>
2059    </div>
2060 -
2061 +<!--
2062         <div class="palm-group">
2063                 <div class="palm-group-title">
2064                         Nuovo messaggio
2065 @@ -20,8 +20,8 @@
2066                                 </div> 
2067                         </div>                
2068                         <div id="notificationSoundContainer">   
2069 -                               <!-- <div class="palm-row-divider"></div> -->
2070 -                               <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
2071 +-->                            <!-- <div class="palm-row-divider"></div> -->
2072 +<!--                           <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
2073                                         <div class="palm-row-wrapper">
2074                                                 <div id="notificationSoundSelector" x-mojo-element="ListSelector"></div>
2075                                         </div>
2076 @@ -53,5 +53,43 @@
2077                 </div>
2078         </div>
2079         <div id="accounts_list" x-mojo-element="AccountsList"></div>
2080 +-->
2081 +
2082 +       <div class="palm-group">
2083 +               <div class="palm-group-title" x-mojo-loc=''>Message Drafts</div>
2084 +               <div class="palm-list">
2085 +                       <div class="palm-row first">
2086 +                               <div class="palm-row-wrapper">
2087 +                                       <div x-mojo-element="ToggleButton" id="prefs-clipboard-drafts-toggle"></div>
2088 +                                       <div class="title" x-mojo-loc=''>Copy to Clipboard</div>
2089 +                               </div>
2090 +                       </div>  
2091 +                       <div class="palm-row last">
2092 +                               <div class="palm-row-wrapper">
2093 +                                       <div x-mojo-element="ToggleButton" id="prefs-automatic-drafts-toggle"></div>
2094 +                                       <div class="title" x-mojo-loc=''>Copy to Message</div>
2095 +                               </div>
2096 +                       </div>  
2097 +               </div>
2098 +       </div>
2099 +       
2100 +       <div x-mojo-loc="" class="palm-info-text">The above settings controls how aborted messages are handled.</div>
2101 +
2102 +       <div class="palm-group">
2103 +               <div class="palm-group-title" x-mojo-loc=''>Message List</div>
2104 +               <div class="palm-list">
2105 +                       <div class="palm-row first">
2106 +                               <div class="palm-row-wrapper">
2107 +                                       <div x-mojo-element="ToggleButton" id="prefs-delete-confirmation-toggle"></div>
2108 +                                       <div class="title" x-mojo-loc=''>Delete Confirmation</div>
2109 +                               </div>
2110 +                       </div>  
2111 +               </div>
2112 +       </div>
2113 +
2114 +       <div id="accounts_list" x-mojo-element="AccountsList" class="show-notifications"></div>
2115 +       
2116 +       <div x-mojo-loc="" class="palm-info-text">IM accounts from same provider share notification preferences.</div>
2117 +       
2118         <div id="addAccountButton" class="palm-button">Aggiungi account IM</div>
2119  </div>
2120 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/it/strings.json
2121 +++ /usr/palm/applications/com.palm.app.messaging/resources/it/strings.json
2122 @@ -170,5 +170,25 @@
2123         "You have received an invitation from #{name} (#{addr}) with the message, \"#{message}\"": "Avete ricevuto un invito da #{name} (#{addr}) con il messaggio \"#{message}\"",
2124         "You must be connected to your wireless service provider's data network to use #{loc_name}.": "Per usare #{loc_name} è necessario essere collegati alla rete dati del proprio provider di servizi wireless.",
2125         "You must be connected to your wireless service provider's data network to use #{loc_shortName}.": "Per usare #{loc_shortName} è necessario essere collegati alla rete dati del proprio provider di servizi wireless.",
2126 -       "You must be connected to your wireless service provider's data network to use this service.": "Per usare questo servizio è necessario essere collegati alla rete dati del proprio provider di servizi wireless."
2127 +       "You must be connected to your wireless service provider's data network to use this service.": "Per usare questo servizio è necessario essere collegati alla rete dati del proprio provider di servizi wireless.",
2128 +       "Off": "",
2129 +       "On": "",
2130 +       "Disabled": "",
2131 +       "Every 2 minutes": "",
2132 +       "Every 5 minutes": "",
2133 +       "Every 15 minutes": "",
2134 +       "Every 30 minutes": "",
2135 +       "Every 60 minutes": "",
2136 +       "Repeat": "",
2137 +       "Repeat infinitely": "",
2138 +       "Repeat 3 times": "",
2139 +       "Repeat 5 times": "",
2140 +       "Repeat 10 times": "",
2141 +       "Repeat 15 times": "",
2142 +       "Repeat 30 times": "",
2143 +       "Limitation": "",
2144 +       "New custom message...": "",
2145 +       "Message greeting text..." : "",
2146 +       "Message signature text..." : "",
2147 +       "Unknown Contacts Notification": ""
2148  }