Updated advanced prefs patches
[webos-internals:skurriers-modifications.git] / advanced / advanced-system-prefs-msg-prefs.patch
1 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/app-assistant.js
2 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/app-assistant.js
3 @@ -52,6 +52,8 @@
4                 }
5  
6                 var stageController = this.controller.getStageController(MainStageName);
7 +
8 +               this.appController.notificationAssistant.removePlayNotificationSoundTasks();
9                 
10                 if (launchParams.clearBanner) {
11                         PalmSystem.clearBannerMessages();
12 @@ -99,10 +101,20 @@
13                  */     
14                 } else if (launchParams.target !== undefined) {
15                         this.handleTargetParam(launchParams.target, stageController);
16 +               } else if (launchParams.playNotificationSound) {
17 +                       // Delay playing to go around WebOS bug (sound not playing).
18 +
19 +                       setTimeout(this.playNotificationSound.bind(this, launchParams.serviceName), 1000);
20                 } else {
21                         this.launchMessaging(stageController);
22                 }               
23         },
24 +
25 +       playNotificationSound: function(serviceName) {
26 +               this.appController.notificationAssistant.playNotificationSound();
27 +                       
28 +               this.appController.notificationAssistant.schedulePlayNotificationSoundTasks(serviceName);
29 +       },
30         
31         launchChatWithId: function(stageController, chatThreadId) {
32                 if (stageController) {                  
33 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
34 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
35 @@ -270,6 +270,16 @@
36                 this.newMessageFieldLoseFocus = function(event) {
37                         if (this.messageTextElement !== undefined) {
38                                 this.messageTextElement.focus();
39 +                               
40 +                               var msg = this.Messaging.messagingPrefs.getMessageGreeting() + " " + 
41 +                                       this.Messaging.messagingPrefs.getMessageSignature();
42 +
43 +                               if((msg.length > 1) && (this.messageTextWidgetModel.value == msg))
44 +                               {
45 +                                       var curPos = this.Messaging.messagingPrefs.getMessageGreeting().length;
46 +                                       this.setTextFieldValue(msg);
47 +                                       this.controller.get("messageTextWidget").mojo.setCursorPosition(curPos, curPos);
48 +                               }
49                         }
50                 }.bind(this);
51                 
52 @@ -1370,6 +1380,8 @@
53                         return;
54                 }
55                 
56 +               this.messageTextElement.focus();
57 +
58                 if (tapTarget && tapTarget.id.startsWith(ChatviewAssistant.quickDialIdPrefix)) {
59                         try {
60                                 // The phone number is the substring after the quick dial prefix.
61 @@ -1445,6 +1457,30 @@
62                                 this.resetTextBox(false);
63                         }
64                 }
65 +               
66 +               var msg = this.Messaging.messagingPrefs.getMessageGreeting() + " " + 
67 +                       this.Messaging.messagingPrefs.getMessageSignature();
68 +
69 +           // Hide the attach button if there is an IM contact
70 +           if(selectedTransport.serviceName != "sms") {  
71 +                       if((msg.length > 1) && 
72 +                               (this.messageTextWidgetModel.value != undefined) &&
73 +                               (this.messageTextWidgetModel.value == msg))
74 +                       {
75 +                               this.setTextFieldValue("");
76 +                       }
77 +           } else {                  
78 +                       if((msg.length > 1) && 
79 +                               ((this.messageTextWidgetModel.value == undefined) || 
80 +                               (this.messageTextWidgetModel.value == "") ||
81 +                               (this.messageTextWidgetModel.value == msg)))
82 +                       {
83 +                               var curPos = this.Messaging.messagingPrefs.getMessageGreeting().length;
84 +                               this.setTextFieldValue(msg);
85 +                               this.controller.get("messageTextWidget").mojo.setCursorPosition(curPos, curPos);
86 +                       }
87 +               }
88 +
89                 this.setCharacterCounterMaxLength();
90         },
91  
92 @@ -2437,6 +2473,9 @@
93                 Mojo.Log.info("value " + value);
94                 
95                 if (value === 'forward-cmd') {
96 +                       if(this.Messaging.messagingPrefs.getPrependForward())
97 +                               text = "Fwd: " + text;
98 +               
99                         var composeParams = {
100                                 messageText: text,
101                                 focusWindow: true,
102 @@ -3104,8 +3143,26 @@
103         
104         _getMessageFromDraft: function() {
105                 MessagingDB.Messages.getMessageFromDraft(this.chatThreadId, function(result) {
106 -                       // Fill in text fields
107 -                       this.setTextFieldValue(result.messageText);
108 +                       if(this.Messaging.messagingPrefs.getUseAutomaticMsgDrafts()) {
109 +                               // Fill in text fields
110 +                               this.setTextFieldValue(result.messageText);
111 +                       }
112 +
113 +                       if(this.Messaging.messagingPrefs.getUseClipboardMsgDrafts())
114 +                               this.controller.stageController.setClipboard(result.messageText);
115 +
116 +                       if((result.serviceName == undefined) || (result.serviceName == "sms")) {
117 +                               var msg = this.Messaging.messagingPrefs.getMessageGreeting() + " " + 
118 +                                       this.Messaging.messagingPrefs.getMessageSignature();
119 +
120 +                               if((msg.length > 1) && ((this.messageTextElement.value == undefined) ||
121 +                                       (this.messageTextElement.value == "") || (this.messageTextElement.value == msg)))
122 +                               {
123 +                                       var curPos = this.Messaging.messagingPrefs.getMessageGreeting().length;
124 +                                       this.setTextFieldValue(msg);
125 +                                       this.controller.get("messageTextWidget").mojo.setCursorPosition(curPos, curPos);
126 +                               }
127 +                       }
128                 }.bind(this));
129         },
130  
131 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
132 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
133 @@ -132,10 +132,6 @@
134         },
135  
136         setup: function() {
137 -               if (!this.launchedWithParams){
138 -                       this.restoreFromDraft();
139 -               }
140 -
141                 this.controller.setupWidget(Mojo.Menu.appMenu, this.appMenuAttrs, this.appMenuModel);
142  
143                 this.searchList = {
144 @@ -230,6 +226,10 @@
145                 if (this.passedAttachment) {
146                         this.attachFile(this.passedAttachment, this.passedAttachmentIconPath, this.deleteAttachmentWhenDone, this.passedAttachmentType, this.passedTranscodeParams);
147                 }
148 +
149 +               if (!this.launchedWithParams){
150 +                       this.restoreFromDraft();
151 +               }
152         },
153  
154         pushReminder: function(recipient){
155 @@ -784,10 +784,30 @@
156                                 }
157                         }
158                 }
159 +
160 +               var msg = this.Messaging.messagingPrefs.getMessageGreeting() + " " + 
161 +                       this.Messaging.messagingPrefs.getMessageSignature();
162 +
163             // Hide the attach button if there is an IM contact
164 -           if(hasIM === true) {         
165 +           if(hasIM === true) {  
166 +                       if((msg.length > 1) && 
167 +                               (this.messageTextWidgetModel.value != undefined) &&
168 +                               (this.messageTextWidgetModel.value == msg))
169 +                       {
170 +                               this.setTextFieldValue("");
171 +                       }
172 +                  
173               this.hideAttachButton();
174             } else {                  
175 +                       if((msg.length > 1) && 
176 +                               ((this.messageTextWidgetModel.value == undefined) || 
177 +                               (this.messageTextWidgetModel.value == "")))
178 +                       {
179 +                               var curPos = this.Messaging.messagingPrefs.getMessageGreeting().length;
180 +                               this.setTextFieldValue(msg);
181 +                               this.controller.get("messageTextWidget").mojo.setCursorPosition(curPos, curPos);
182 +                       }
183 +
184               this.showAttachButton();
185             }
186                 this.setCharacterCounterMaxLength();
187 @@ -921,13 +941,29 @@
188                 if (this.launchedAsForward === undefined && 
189                         (this.messageText === undefined || this.messageText.length === 0) &&
190                         this.prePopulatedRecipients.length === 0) {
191 +                               var msg = this.Messaging.messagingPrefs.getMessageGreeting() + " " + 
192 +                                       this.Messaging.messagingPrefs.getMessageSignature();
193 +
194 +                               if((msg.length > 1) && 
195 +                                       ((this.messageTextWidgetModel.value == undefined) || 
196 +                                       (this.messageTextWidgetModel.value == "")))
197 +                               {
198 +                                       var curPos = this.Messaging.messagingPrefs.getMessageGreeting().length;
199 +                                       this.setTextFieldValue(msg);
200 +                                       this.controller.get("messageTextWidget").mojo.setCursorPosition(curPos, curPos);
201 +                               }
202                                 
203                                 MessagingDB.Messages.getMessageFromDraft("_compose",function(result) {
204 -                                       this.controller.get('searchList').mojo.updateRecipients(result.to);
205 -                                       this.setTextFieldValue(result.messageText);
206 -                                       if (result.attachment !== undefined) {
207 -                                               this.attachFile(result.attachment);
208 +                                       if(this.Messaging.messagingPrefs.getUseAutomaticMsgDrafts()) {
209 +                                               this.controller.get('searchList').mojo.updateRecipients(result.to);
210 +                                               this.setTextFieldValue(result.messageText);
211 +                                               if (result.attachment !== undefined) {
212 +                                                       this.attachFile(result.attachment);
213 +                                               }                                       
214                                         }                                       
215 +
216 +                                       if(this.Messaging.messagingPrefs.getUseClipboardMsgDrafts())
217 +                                               this.controller.stageController.setClipboard(result.messageText);
218                                 }.bind(this));
219                 }
220         },
221 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/dashboardMessage-assistant.js
222 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/dashboardMessage-assistant.js
223 @@ -2,7 +2,7 @@
224  /*jslint white: false, onevar: false, nomen:false, plusplus: false*/
225  /* Copyright 2009 Palm, Inc.  All rights reserved. */
226  
227 -function DashboardMessageAssistant(dashboardData) {
228 +function DashboardMessageAssistant(dashboardData, blinkNotify) {
229         this.dashboardData = dashboardData; // hold onto a reference to the dashboardData
230         if(this.dashboardData.newest && this.dashboardData[this.dashboardData.newest].list && this.dashboardData[this.dashboardData.newest].list.length>0){
231                 this.isInvite = (this.dashboardData[this.dashboardData.newest].list[0].imType === "invite"? true:false);
232 @@ -11,10 +11,11 @@
233         this.Messaging = this.appController.Messaging;
234         this.tapHandler = this.tapHandler.bindAsEventListener(this);
235         this.oldPresenceClass = "";
236 +       this.blinkNotify = blinkNotify;
237  }
238  
239  DashboardMessageAssistant.prototype.setup = function() {
240 -       this.update(true);
241 +       this.update(this.blinkNotify);
242         this.messageInfoElement = this.controller.get('message_info');
243         this.messageInfoElement.addEventListener(Mojo.Event.tap, this.tapHandler);
244  };
245 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js
246 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js
247 @@ -418,7 +418,9 @@
248                                 }.bind(this),
249                                 template: 'listview/historyList-divider'
250                         },
251 -                       swipeDelete: true,
252 +                       swipeDelete: {
253 +                               autoConfirm: !this.Messaging.messagingPrefs.getUseDeleteConfirmation()
254 +                       },
255                         uniquenessProperty: '_id',
256                         revisionProperty: '_rev',
257                         delay: 500
258 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/notification-assistant.js
259 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/notification-assistant.js
260 @@ -9,6 +9,7 @@
261         // a reference to this is passed to the dashboard assistant
262         this.messageDashboardData = {};
263         this.inviteDashboardData = {};
264 +       this.notificationsData = {};
265         this.class0AlertData = {
266                 list: []
267         };
268 @@ -230,20 +231,20 @@
269   */
270  
271  NotificationAssistant.prototype.considerForNotification = function(notificationData){
272 -       if (!this.Messaging.messagingPrefs.getNotificationsEnabled()) {
273 +       if (!this.Messaging.messagingPrefs.getNotificationsEnabled(notificationData.message.serviceName)) {
274                 Mojo.Log.info("Notification Assistant - Consider for Notification - Notifications are disabled");       
275                 return;
276         }
277         
278         // check if we should only play a sound (when you are already in a chat & a new message comes in)
279 -       if(notificationData.playSoundOnly && this.Messaging.messagingPrefs.getNotificationSound()) {
280 +       if(notificationData.playSoundOnly && this.Messaging.messagingPrefs.getNotificationSound(notificationData.message.serviceName)) {
281                 var notifParams = {};
282 -               this.setNotificationSound(notifParams);
283 +               this.setNotificationSound(notifParams, notificationData);
284                 this.controller.playSoundNotification(notifParams.soundClass, notifParams.soundFile);
285                 return; // don't display any visual notification
286         }       
287         //TODO: does sendFailure and connectionFailure need displayName?
288 -       if (Object.keys(notificationData).length > 0 && this.Messaging.messagingPrefs.getNotificationsEnabled()) {
289 +       if (Object.keys(notificationData).length > 0 && this.Messaging.messagingPrefs.getNotificationsEnabled(notificationData.message.serviceName)) {
290                 var notificationType = notificationData.notificationType;
291                 if (notificationType === this.Messaging.notificationTypes.newMessage) {
292                         this.preSendNewMessageNotificationAndUpdateDashboard(notificationData);
293 @@ -344,10 +345,40 @@
294                 
295                 future.then(this, function(future){
296                         if (future.result) {
297 +                               if(MessagingLib.Utils.isTextMessage(notificationData.message.serviceName)) {
298 +                                       notificationData.soundClass = future.result.getMsgAlert().getAlert();
299 +                                       notificationData.ringtonePath = future.result.getMsgRingtone().getLocation();
300 +                               }
301 +                               else {
302 +                                       notificationData.soundClass = future.result.getIMsgAlert().getAlert();
303 +                                       notificationData.ringtonePath = future.result.getIMsgRingtone().getLocation();
304 +                               }
305 +                                                       
306                                 notificationData.message.displayName = future.result.generateDisplayName(false);
307 +
308 +                               future.result = future.result;
309 +                               this.sendNewMessageNotificationAndUpdateDashboard(notificationData);
310 +                       }
311 +                       else if(MessagingLib.Utils.isTextMessage(notificationData.message.serviceName)) {
312 +                               if(this.contactPrefs)
313 +                                       delete this.contactPrefs;
314 +       
315 +                               this.contactPrefs = new ContactsLib.AppPrefs(function(future) {
316 +                                       var prefs = this.contactPrefs.get(ContactsLib.AppPrefs.Pref.unknownContacts);
317 +
318 +                                       if((prefs) && (prefs.msgAlert)) {
319 +                                               notificationData.soundClass = prefs.msgAlert;
320 +                                               notificationData.ringtonePath = prefs.msgRingtonePath;
321 +                                       }
322 +
323 +                                       future.result = future.result;
324 +                                       this.sendNewMessageNotificationAndUpdateDashboard(notificationData);
325 +                               }.bind(this, future));                  
326 +                       }
327 +                       else {
328 +                               future.result = future.result;
329 +                               this.sendNewMessageNotificationAndUpdateDashboard(notificationData);
330                         }
331 -                       future.result = future.result;
332 -                       this.sendNewMessageNotificationAndUpdateDashboard(notificationData);
333                 });
334         }
335         else {
336 @@ -411,7 +442,7 @@
337         var bannerParams = {
338                 messageText: notificationText
339         };
340 -       this.setNotificationSound(bannerParams);
341 +       this.setNotificationSound(bannerParams, notificationData);
342         var bannerLaunchParams =  {
343                 chatThreadId: chatThreadId,
344                 clearBanner: true               
345 @@ -480,11 +511,16 @@
346         var dashboard = this.controller.getStageController(dashboardStagename);
347         
348         if (dashboard) {
349 -               dashboard.delegateToSceneAssistant("update", true);
350 +               if(this.Messaging.messagingPrefs.getNotificationBlink(notificationData.message.serviceName))
351 +                       dashboard.delegateToSceneAssistant("update", true);
352 +               else
353 +                       dashboard.delegateToSceneAssistant("update", false);            
354         } else {
355 +               var blinkNotify = this.Messaging.messagingPrefs.getNotificationBlink(notificationData.message.serviceName);
356 +       
357                 // Create a dashboard
358                 var f = function(stageController){
359 -                       stageController.pushScene('dashboardMessage', dashboardData);
360 +                       stageController.pushScene('dashboardMessage', dashboardData, blinkNotify);
361                 }.bind(this);
362                 var params = {
363                         name: dashboardStagename,
364 @@ -509,6 +545,8 @@
365                         createDashboard(); // if the screen is off, create the dashboard right away
366                 }
367         }
368 +       
369 +       this.schedulePlayNotificationSoundTasks(notificationData.message.serviceName);
370  };
371  
372  // ISSUES: what are the error types?  What is the max number / types of dashboards that we could have?
373 @@ -542,7 +580,7 @@
374         var bannerParams = {
375                 messageText: notificationText.escapeHTML()
376         };
377 -       if (this.Messaging.messagingPrefs.getNotificationSound() !== "mute") {
378 +       if (this.Messaging.messagingPrefs.getNotificationSound(notificationData.message.serviceName) !== "mute") {
379                 bannerParams.soundClass = "alerts";     
380         }
381         var bannerLaunchParams =  {
382 @@ -747,6 +785,8 @@
383  };
384  
385  NotificationAssistant.prototype.clearNotificationsForChat = function(chatThreadId){    
386 +       this.removePlayNotificationSoundTasks();
387 +
388         var i;
389         var newestTimestamp = 0;
390         var newestChat;
391 @@ -841,6 +881,9 @@
392  };
393  
394  NotificationAssistant.prototype.resetNewMessages = function(){
395 +       this.removePlayNotificationSoundTasks();
396 +               
397 +       this.notificationsData = {};
398         this.messageDashboardData = {};
399  };
400  
401 @@ -849,8 +892,13 @@
402  };
403  
404  NotificationAssistant.prototype.clearMessageDashboard = function(){
405 -       var dashboard = this.controller.getStageController(DashboardMessageStageName);
406 +       this.removePlayNotificationSoundTasks();
407 +
408 +       this.notificationsData = {};
409         this.messageDashboardData = {};
410 +
411 +       var dashboard = this.controller.getStageController(DashboardMessageStageName);
412 +
413         if (dashboard) {
414                 dashboard.delegateToSceneAssistant("closeDashboard");
415         }
416 @@ -884,15 +932,26 @@
417         }
418  };
419  
420 -NotificationAssistant.prototype.setNotificationSound = function(bannerParams){
421 -       switch (this.Messaging.messagingPrefs.getNotificationSound()) {
422 +NotificationAssistant.prototype.setNotificationSound = function(bannerParams, notificationData){
423 +       var soundClass = this.Messaging.messagingPrefs.getNotificationSound(notificationData.message.serviceName);
424 +       var ringtonePath = this.Messaging.messagingPrefs.getRingtone(notificationData.message.serviceName).path;
425 +
426 +       if((notificationData.soundClass != undefined) && 
427 +               (notificationData.soundClass != "") &&
428 +               (notificationData.soundClass != "default"))
429 +       {
430 +               soundClass = notificationData.soundClass;
431 +               ringtonePath = notificationData.ringtonePath;           
432 +       }
433 +       
434 +       switch (soundClass) {
435                 case "alert": 
436                         bannerParams.soundClass = "notifications";
437                         bannerParams.soundFile = undefined;
438                         break;
439                 case "ringtone":
440                         bannerParams.soundClass = "notifications";
441 -                       bannerParams.soundFile = this.Messaging.messagingPrefs.getRingtone().path;
442 +                       bannerParams.soundFile = ringtonePath;
443                         break;
444                 case "vibrate":
445                         bannerParams.soundClass = "vibrate";
446 @@ -907,4 +966,77 @@
447         Mojo.Log.info("setNotificationSound result=%j", bannerParams);
448  };
449  
450 +NotificationAssistant.prototype.schedulePlayNotificationSoundTasks = function(serviceName) {
451 +       if((this.Messaging.messagingPrefs.getNotificationsEnabled(serviceName) == false) ||
452 +               (this.Messaging.messagingPrefs.getNotificationSound(serviceName) == "mute") ||
453 +               (this.Messaging.messagingPrefs.getRepeatInterval(serviceName) == 0))
454 +       {
455 +               if(this.notificationsData[serviceName])
456 +                       delete this.notificationsData[serviceName];
457 +               
458 +               return;
459 +       }
460 +
461 +       if(this.notificationsData[serviceName] == undefined)
462 +               this.notificationsData[serviceName] = 0;
463 +       
464 +       if(this.notificationsData[serviceName]++ >= this.Messaging.messagingPrefs.getRepeatLimit(serviceName)) {
465 +               delete this.notificationsData[serviceName];
466 +               
467 +               return;
468 +       }
469 +       
470 +       // Reset all notifications to synchronize the notification events.
471 +       
472 +       var scheduledTimeStrings = {};
473 +
474 +       var currentTime = new Date();
475 +       
476 +       for(var serviceName in this.notificationsData) {
477 +               if((this.Messaging.messagingPrefs.getNotificationsEnabled(serviceName) != false) &&
478 +                       (this.Messaging.messagingPrefs.getNotificationSound(serviceName) != "mute") &&
479 +                       (this.Messaging.messagingPrefs.getRepeatInterval(serviceName) != 0))
480 +               {
481 +                       var repeatInterval = this.Messaging.messagingPrefs.getRepeatInterval(serviceName);
482 +               
483 +                       var playSoundTime = new Date(currentTime.getTime() + (parseInt(repeatInterval) * 1000));
484 +
485 +                       var month = playSoundTime.getUTCMonth()+1;
486 +                       if(month < 10) month = "0" + month;
487 +                       var day = playSoundTime.getUTCDate();
488 +                       if(day < 10) day = "0" + day;
489 +                       var year = playSoundTime.getUTCFullYear();
490 +
491 +                       var hours = playSoundTime.getUTCHours();
492 +                       if(hours < 10) hours = "0" + hours;
493 +                       var minutes = playSoundTime.getUTCMinutes();
494 +                       if(minutes < 10) minutes = "0" + minutes;
495 +                       var seconds = playSoundTime.getUTCSeconds();
496 +                       if(seconds < 10) seconds = "0" + seconds;
497 +
498 +                       var scheduledTimeStr = month + "/" + day + "/" + year + " " + hours + ":" + minutes + ":" + seconds;
499 +               
500 +                       if(scheduledTimeStrings[scheduledTimeStr] == undefined) {
501 +                               scheduledTimeStrings[scheduledTimeStr] = true;
502 +               
503 +                               this.updateTimeoutRequest = new Mojo.Service.Request('palm://com.palm.power/timeout/', {
504 +                                       'method': "set", 'parameters': { 'key': 'messagingPlayNotificationSound-' + serviceName, 
505 +                                       'wakeup': true, 'at': scheduledTimeStr, 'uri': "palm://com.palm.applicationManager/open", 
506 +                                       'params': {'id': 'com.palm.app.messaging', 'params': {'serviceName': serviceName,
507 +                                               'playNotificationSound': this.notificationsData[serviceName]}}} }); 
508 +                       }       
509 +               }
510 +       }
511 +};
512 +       
513 +NotificationAssistant.prototype.removePlayNotificationSoundTasks = function() {
514 +       for(var serviceName in this.notificationsData) {
515 +               this.removeTimeoutRequest = new Mojo.Service.Request("palm://com.palm.power/timeout/", {
516 +                       'method': "clear", 'parameters': {"key": 'messagingPlayNotificationSound-' + serviceName} });
517 +       }
518 +};
519 +
520 +NotificationAssistant.prototype.playNotificationSound = function() {
521 +       this.controller.playSoundNotification("notifications");
522 +};
523  
524 --- .orig/usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
525 +++ /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
526 @@ -1187,6 +1187,23 @@
527  
528  /* Preferences */
529  
530 +.palm-account-icon.left {
531 +       float: left;
532 +}
533 +.palm-page-header .palm-account-icon {
534 +       position: absolute;
535 +       left: 0px;
536 +       top: 0px;
537 +       min-height: 52px;
538 +       width: 56px;
539 +}
540 +.default-account-list.palm-account-icon {
541 +       margin: 0px -5px 0px 10px;
542 +}
543 +.palm-account-icon {
544 +    background: url(../images/serviceicon-sms.png) center center no-repeat;
545 +}
546 +
547  .text-group .title {
548                 line-height: auto !important;
549                 padding: 0 !important;
550 --- .orig/usr/palm/applications/com.palm.app.messaging/app/models/messaging-prefs.js
551 +++ /usr/palm/applications/com.palm.app.messaging/app/models/messaging-prefs.js
552 @@ -87,7 +87,18 @@
553                 }
554         },
555         
556 -       getNotificationsEnabled: function() {
557 +       getNotificationsEnabled: function(serviceName) {
558 +               if((serviceName != undefined) && (serviceName != "sms")) {
559 +                       if (this._prefs === undefined || this._prefs.accountNotifications === undefined ||
560 +                               this._prefs.accountNotifications[serviceName] === undefined || 
561 +                               this._prefs.accountNotifications[serviceName].enableNotification === undefined) 
562 +                       {
563 +                               return this._getDefaultPrefs().enableNotification;
564 +                       } else {
565 +                               return this._prefs.accountNotifications[serviceName].enableNotification;
566 +                       }
567 +               }
568 +               
569                 if (this._prefs === undefined || this._prefs.enableNotification === undefined) {
570                         return this._getDefaultPrefs().enableNotification;
571                 } else {
572 @@ -95,11 +106,69 @@
573                 }
574         },
575         
576 -       setNotificationsEnabled: function(enabled) {
577 -               this._dbMerge({enableNotification:enabled});
578 +       setNotificationsEnabled: function(enabled, serviceName) {
579 +               if((serviceName != undefined) && (serviceName != "sms")) {
580 +                       if (this._prefs.accountNotifications === undefined)
581 +                               this._prefs.accountNotifications = {};
582 +
583 +                       if (this._prefs.accountNotifications[serviceName] === undefined)
584 +                               this._prefs.accountNotifications[serviceName] = {};
585 +                       
586 +                       this._prefs.accountNotifications[serviceName].enableNotification = enabled;
587 +
588 +                       this._dbMerge({accountNotifications:this._prefs.accountNotifications});
589 +               }
590 +               else
591 +                       this._dbMerge({enableNotification:enabled});
592 +       },
593 +       
594 +       getNotificationBlink: function(serviceName) {
595 +               if((serviceName != undefined) && (serviceName != "sms")) {
596 +                       if (this._prefs === undefined || this._prefs.accountNotifications === undefined ||
597 +                               this._prefs.accountNotifications[serviceName] === undefined || 
598 +                               this._prefs.accountNotifications[serviceName].blinkNotification === undefined) 
599 +                       {
600 +                               return this._getDefaultPrefs().blinkNotification;
601 +                       } else {
602 +                               return this._prefs.accountNotifications[serviceName].blinkNotification;
603 +                       }
604 +               }
605 +               
606 +               if (this._prefs === undefined || this._prefs.blinkNotification === undefined) {
607 +                       return this._getDefaultPrefs().blinkNotification;
608 +               } else {
609 +                       return this._prefs.blinkNotification;
610 +               }
611         },
612         
613 -       getNotificationSound: function() {
614 +       setNotificationBlink: function(blink, serviceName) {
615 +               if((serviceName != undefined) && (serviceName != "sms")) {
616 +                       if (this._prefs.accountNotifications === undefined)
617 +                               this._prefs.accountNotifications = {};
618 +
619 +                       if (this._prefs.accountNotifications[serviceName] === undefined)
620 +                               this._prefs.accountNotifications[serviceName] = {};
621 +                       
622 +                       this._prefs.accountNotifications[serviceName].blinkNotification = blink;
623 +
624 +                       this._dbMerge({accountNotifications:this._prefs.accountNotifications});
625 +               }
626 +               else
627 +                       this._dbMerge({blinkNotification:blink});
628 +       },
629 +
630 +       getNotificationSound: function(serviceName) {
631 +               if((serviceName != undefined) && (serviceName != "sms")) {
632 +                       if (this._prefs === undefined || this._prefs.accountNotifications === undefined ||
633 +                               this._prefs.accountNotifications[serviceName] === undefined || 
634 +                               this._prefs.accountNotifications[serviceName].notificationSound === undefined) 
635 +                       {
636 +                               return this._getDefaultPrefs().notificationSound;
637 +                       } else {
638 +                               return this._prefs.accountNotifications[serviceName].notificationSound;
639 +                       }
640 +               }
641 +               
642                 if (this._prefs === undefined || this._prefs.notificationSound === undefined) {
643                         return this._getDefaultPrefs().notificationSound;
644                 } else {
645 @@ -107,11 +176,34 @@
646                 }
647         },
648         
649 -       setNotificationSound: function(sound) {
650 -               this._dbMerge({notificationSound:sound});
651 +       setNotificationSound: function(sound, serviceName) {
652 +               if((serviceName != undefined) && (serviceName != "sms")) {
653 +                       if (this._prefs.accountNotifications === undefined)
654 +                               this._prefs.accountNotifications = {};
655 +
656 +                       if (this._prefs.accountNotifications[serviceName] === undefined)
657 +                               this._prefs.accountNotifications[serviceName] = {};
658 +                       
659 +                       this._prefs.accountNotifications[serviceName].notificationSound = sound;
660 +
661 +                       this._dbMerge({accountNotifications:this._prefs.accountNotifications});
662 +               }
663 +               else
664 +                       this._dbMerge({notificationSound:sound});
665         },
666         
667 -       getRingtone: function() {
668 +       getRingtone: function(serviceName) {
669 +               if((serviceName != undefined) && (serviceName != "sms")) {
670 +                       if (this._prefs === undefined || this._prefs.accountNotifications === undefined ||
671 +                               this._prefs.accountNotifications[serviceName] === undefined || 
672 +                               this._prefs.accountNotifications[serviceName].ringtone === undefined)  
673 +                       {
674 +                               return this._getDefaultPrefs().ringtone;
675 +                       } else {
676 +                               return this._prefs.accountNotifications[serviceName].ringtone;
677 +                       }
678 +               }
679 +               
680                 if (this._prefs === undefined || this._prefs.ringtone === undefined) {
681                         return this._getDefaultPrefs().ringtone;
682                 } else {
683 @@ -119,11 +211,163 @@
684                 }
685         },
686         
687 -       setRingtone: function(ringtone) {
688 +       setRingtone: function(ringtone, serviceName) {
689                 if (ringtone === undefined) {
690                         ringtone = {};
691                 }
692 -               this._dbMerge({ringtone:ringtone});
693 +
694 +               if((serviceName != undefined) && (serviceName != "sms")) {
695 +                       if (this._prefs.accountNotifications === undefined)
696 +                               this._prefs.accountNotifications = {};
697 +
698 +                       if (this._prefs.accountNotifications[serviceName] === undefined)
699 +                               this._prefs.accountNotifications[serviceName] = {};
700 +                       
701 +                       this._prefs.accountNotifications[serviceName].ringtone = ringtone;
702 +
703 +                       this._dbMerge({accountNotifications:this._prefs.accountNotifications});
704 +               }
705 +               else
706 +                       this._dbMerge({ringtone:ringtone});
707 +       },
708 +
709 +       getRepeatInterval: function(serviceName) {
710 +               if((serviceName != undefined) && (serviceName != "sms")) {
711 +                       if (this._prefs === undefined || this._prefs.accountNotifications === undefined ||
712 +                               this._prefs.accountNotifications[serviceName] === undefined || 
713 +                               this._prefs.accountNotifications[serviceName].repeatInterval === undefined)
714 +                       {
715 +                               return this._getDefaultPrefs().repeatInterval;
716 +                       } else {
717 +                               return this._prefs.accountNotifications[serviceName].repeatInterval;
718 +                       }
719 +               }
720 +               
721 +               if (this._prefs === undefined || this._prefs.repeatInterval === undefined) {
722 +                       return this._getDefaultPrefs().repeatInterval;
723 +               } else {
724 +                       return this._prefs.repeatInterval;
725 +               }
726 +       },
727 +       
728 +       setRepeatInterval: function(interval, serviceName) {
729 +               if((serviceName != undefined) && (serviceName != "sms")) {
730 +                       if (this._prefs.accountNotifications === undefined)
731 +                               this._prefs.accountNotifications = {};
732 +               
733 +                       if (this._prefs.accountNotifications[serviceName] === undefined)
734 +                               this._prefs.accountNotifications[serviceName] = {};
735 +                       
736 +                       this._prefs.accountNotifications[serviceName].repeatInterval = interval;
737 +
738 +                       this._dbMerge({accountNotifications:this._prefs.accountNotifications});
739 +               }
740 +               else
741 +                       this._dbMerge({repeatInterval:interval});
742 +       },
743 +       
744 +       getRepeatLimit: function(serviceName) {
745 +               if((serviceName != undefined) && (serviceName != "sms")) {
746 +                       if (this._prefs === undefined || this._prefs.accountNotifications === undefined ||
747 +                               this._prefs.accountNotifications[serviceName] === undefined || 
748 +                               this._prefs.accountNotifications[serviceName].repeatLimit === undefined)
749 +                       {
750 +                               return this._getDefaultPrefs().repeatLimit;
751 +                       } else {
752 +                               return this._prefs.accountNotifications[serviceName].repeatLimit;
753 +                       }
754 +               }
755 +               
756 +               if (this._prefs === undefined || this._prefs.repeatLimit === undefined) {
757 +                       return this._getDefaultPrefs().repeatLimit;
758 +               } else {
759 +                       return this._prefs.repeatLimit;
760 +               }
761 +       },
762 +       
763 +       setRepeatLimit: function(limit, serviceName) {
764 +               if((serviceName != undefined) && (serviceName != "sms")) {
765 +                       if(this._prefs.accountNotifications[serviceName] === undefined)
766 +                               this._prefs.accountNotifications[serviceName] = {};
767 +                       
768 +                       this._prefs.accountNotifications[serviceName].repeatLimit = limit;
769 +
770 +                       this._dbMerge({accountNotifications:this._prefs.accountNotifications});
771 +               }
772 +               else
773 +                       this._dbMerge({repeatLimit:limit});
774 +       },
775 +       
776 +       getPrependForward: function() {
777 +               if (this._prefs === undefined || this._prefs.prependForward === undefined) {
778 +                       return this._getDefaultPrefs().prependForward;
779 +               } else {
780 +                       return this._prefs.prependForward;
781 +               }
782 +       },
783 +       
784 +       setPrependForward: function(forward) {
785 +               this._dbMerge({prependForward:forward});
786 +       },
787 +
788 +       getMessageGreeting: function() {
789 +               if (this._prefs === undefined || this._prefs.messageGreeting === undefined) {
790 +                       return this._getDefaultPrefs().messageGreeting;
791 +               } else {
792 +                       return this._prefs.messageGreeting;
793 +               }
794 +       },
795 +       
796 +       setMessageGreeting: function(greeting) {
797 +               this._dbMerge({messageGreeting:greeting});
798 +       },
799 +
800 +       getMessageSignature: function() {
801 +               if (this._prefs === undefined || this._prefs.messageSignature === undefined) {
802 +                       return this._getDefaultPrefs().messageSignature;
803 +               } else {
804 +                       return this._prefs.messageSignature;
805 +               }
806 +       },
807 +       
808 +       setMessageSignature: function(signature) {
809 +               this._dbMerge({messageSignature:signature});
810 +       },
811 +
812 +       getUseAutomaticMsgDrafts: function() {
813 +               if (this._prefs === undefined || this._prefs.useAutomaticMsgDrafts === undefined) {
814 +                       return this._getDefaultPrefs().useAutomaticMsgDrafts;
815 +               } else {
816 +                       return this._prefs.useAutomaticMsgDrafts;
817 +               }
818 +       },
819 +
820 +       setUseAutomaticMsgDrafts: function(set) {
821 +               this._dbMerge({useAutomaticMsgDrafts:set});
822 +       },
823 +
824 +       getUseClipboardMsgDrafts: function() {
825 +               if (this._prefs === undefined || this._prefs.useClipboardMsgDrafts === undefined) {
826 +                       return this._getDefaultPrefs().useClipboardMsgDrafts;
827 +               } else {
828 +                       return this._prefs.useClipboardMsgDrafts;
829 +               }
830 +       },
831 +       
832 +       setUseClipboardMsgDrafts: function(set) {
833 +               this._dbMerge({useClipboardMsgDrafts:set});
834 +       },
835 +
836 +       getUseDeleteConfirmation: function() {
837 +               if (this._prefs === undefined || this._prefs.useDeleteConfirmation === undefined) {
838 +                       return this._getDefaultPrefs().useDeleteConfirmation;
839 +               } else {
840 +                       return this._prefs.useDeleteConfirmation;
841 +               }
842 +       },
843 +
844 +       setUseDeleteConfirmation: function(set) {
845 +               this._dbMerge({useDeleteConfirmation:set});
846         },
847         
848         getUseImmediateMmsRetrieval: function() {
849 @@ -188,12 +432,22 @@
850                 return {
851                                 "_kind": MessagingPrefsService.prefsDB,
852                                 "enableNotification": true,
853 -                               "notificationSound":"alert",
854 +                               "blinkNotification": true,
855 +                               "notificationSound": "alert",
856                                 "ringtone": {},
857 +                               "repeatInterval": 0,
858 +                               "repeatLimit": 3,
859 +                               "prependForward": false,
860 +                               "messageGreeting": "",
861 +                               "messageSignature": "",
862                                 "isHistoryViewSelected": true,
863                                 "showOnlineBuddiesOnly": true,
864                                 "useImmediateMmsRetrieval": true,
865 -                               "firstUseMode":true
866 +                               "firstUseMode": true,
867 +                               "useAutomaticMsgDrafts": true,
868 +                               "useClipboardMsgDrafts": false,
869 +                               "useDeleteConfirmation": true,
870 +                               "accountNotifications": {}
871                 };
872         },
873  
874 @@ -243,4 +497,4 @@
875         _getMessagingPrefsOnFailure: function(payload) {
876                 Mojo.Log.error("_getMessagingPrefsOnFailure "+Object.toJSON(payload));
877         }
878 -};
879 \ No newline at end of file
880 +};
881 --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/prefsAccountSummary-assistant.js
882 +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/prefsAccountSummary-assistant.js
883 @@ -8,13 +8,15 @@
884          this.Messaging = this.appController.Messaging;      
885          this.params = params || {};
886          this.requests = [];
887 +        this.listSettingChanged = false;
888                 
889                 this.handleAddAccountTap = this.handleAddAccountTap.bindAsEventListener(this);
890 -               this.notificationToggleChanged = this.notificationToggleChanged.bindAsEventListener(this);
891 +/*             this.notificationToggleChanged = this.notificationToggleChanged.bindAsEventListener(this);
892                 this.notificationSoundToggleChanged = this.notificationSoundToggleChanged.bindAsEventListener(this);
893                 this.chooseNotificationRingtone = this.chooseNotificationRingtone.bindAsEventListener(this);
894                 this.autoDownloadToggleChanged = this.autoDownloadToggleChanged.bindAsEventListener(this);
895                 this.deliveryReceiptsToggleChanged = this.deliveryReceiptsToggleChanged.bindAsEventListener(this);
896 +*/
897      },
898   
899      setup: function(){
900 @@ -33,24 +35,39 @@
901                 
902        this.controller.listen('addAccountButton',Mojo.Event.tap, this.handleAddAccountTap);   
903     
904 -      this.controller.listen('currentringtonerow',Mojo.Event.tap, this.chooseNotificationRingtone);
905 +//      this.controller.listen('currentringtonerow',Mojo.Event.tap, this.chooseNotificationRingtone);
906      },
907         
908         cleanup: function() {
909                 this.controller.stopListening('addAccountButton',Mojo.Event.tap, this.handleAddAccountTap);
910 -               if (this.saveSMSPrefs) {
911 +/*             if (this.saveSMSPrefs) {
912                         this.controller.stopListening('savePrefs', Mojo.Event.tap, this.saveSMSPrefs);
913                 }
914           this.controller.stopListening('deliveryReceiptsToggle',Mojo.Event.propertyChange,this.deliveryReceiptsToggleChanged);
915        this.controller.stopListening('notificationToggle',Mojo.Event.propertyChange,this.notificationToggleChanged);
916        this.controller.stopListening('notificationSoundSelector',Mojo.Event.propertyChange,this.notificationSoundToggleChanged);                
917        this.controller.stopListening('autoDownloadToggle',Mojo.Event.propertyChange,this.autoDownloadToggleChanged);
918 +*/
919         },
920  
921 -       handleAccountsListTap: function(account, template){
922 +       handleCommand: function(event){
923 +               if((event.type == Mojo.Event.back) && (this.listSettingChanged)) {
924 +             event.stopPropagation();
925 +          event.preventDefault();
926 +                       this.controller.stageController.swapScene('listview');
927 +               }
928 +       },
929 +       
930 +       handleAccountsListTap: function(account, template, target){
931                 var capabilityProvider = this.getMessagingCapabilityProvider(account);
932                 var accountSettingsUI;
933                 
934 +               if(target == "notifications") {
935 +             this.controller.stageController.pushScene('prefsSetupNotifications', this.Messaging.messagingPrefs, capabilityProvider.serviceName, account.icon.loc_32x32);
936 +               
937 +                       return;
938 +               }
939 +               
940                 if (capabilityProvider && capabilityProvider.settingsUI) {
941                         accountSettingsUI = capabilityProvider.settingsUI;
942                         
943 @@ -76,7 +93,7 @@
944                         
945                 }
946                 else if(capabilityProvider && capabilityProvider.serviceName === undefined && capabilityProvider.capabilitySubtype === "SMS"){
947 -                       //Do nothing when SMS is taped.
948 +                       this.controller.stageController.pushScene('prefsSetupSMSAccount', this.Messaging);
949                 }
950                 else {
951                         this.controller.stageController.pushScene("accountlogin", {
952 @@ -105,12 +122,52 @@
953       **************************************************/
954      
955      preferencesSetup: function() {
956 -      this.prefsAutoSignIn();
957 +//      this.prefsAutoSignIn();
958        //this.prefsSmsMmsSetup();
959 -      this.prefsNotification();
960 +//      this.prefsNotification();
961 +      this.prefsDraftsSetup();
962 +      this.prefsListSetup();
963 +    },
964 +    
965 +    prefsDraftsSetup: function() {
966 +       var messageDraftsAttributes = {
967 +                       trueValue: true,
968 +                       falseValue: false };
969 +       
970 +       this.modelMessageDraftsClipboard = {value: this.Messaging.messagingPrefs.getUseClipboardMsgDrafts()};
971 +
972 +               this.controller.setupWidget('prefs-clipboard-drafts-toggle', messageDraftsAttributes, this.modelMessageDraftsClipboard);
973 +      this.controller.listen('prefs-clipboard-drafts-toggle',Mojo.Event.propertyChange, this.prefsDraftsSave.bind(this));      
974 +
975 +       this.modelMessageDraftsAutomatic = {value: this.Messaging.messagingPrefs.getUseAutomaticMsgDrafts()};
976 +       
977 +       this.controller.setupWidget('prefs-automatic-drafts-toggle', messageDraftsAttributes, this.modelMessageDraftsAutomatic);
978 +      this.controller.listen('prefs-automatic-drafts-toggle',Mojo.Event.propertyChange, this.prefsDraftsSave.bind(this));      
979 +    },
980 +
981 +    prefsDraftsSave: function() {
982 +               this.Messaging.messagingPrefs.setUseClipboardMsgDrafts(this.modelMessageDraftsClipboard.value);
983 +               this.Messaging.messagingPrefs.setUseAutomaticMsgDrafts(this.modelMessageDraftsAutomatic.value);
984      },
985 +                   
986 +    prefsListSetup: function() {
987 +       var messageDeleteConfirmAttributes = {
988 +                       trueValue: true,
989 +                       falseValue: false };
990 +       
991 +       this.modelMessageDeleteConfirm = {value: this.Messaging.messagingPrefs.getUseDeleteConfirmation()};
992 +       
993 +       this.controller.setupWidget('prefs-delete-confirmation-toggle', messageDeleteConfirmAttributes, this.modelMessageDeleteConfirm);
994 +      this.controller.listen('prefs-delete-confirmation-toggle',Mojo.Event.propertyChange, this.prefsListSave.bind(this));      
995 +    },
996 +
997 +    prefsListSave: function() {
998 +               this.listSettingChanged = true;
999      
1000 -    prefsAutoSignIn: function() {
1001 +               this.Messaging.messagingPrefs.setUseDeleteConfirmation(this.modelMessageDeleteConfirm.value);
1002 +        },
1003 +
1004 +//    prefsAutoSignIn: function() {
1005        /*
1006        var autoSignin = {
1007          modelProperty : 'auto-signin-toggle',
1008 @@ -126,13 +183,14 @@
1009  //        this.controller.get('AutoSignon').observe('mojo-property-change', 
1010  //                     this.autoSignonChange.bind(this));            
1011         */       
1012 -    },
1013 -    
1014 + //   },
1015 +/*    
1016      prefsSmsMmsSetup: function() {
1017 +*/
1018        /************************
1019        * Setup widgets
1020        ************************/
1021 -      var smscAttributes = {
1022 +/*      var smscAttributes = {
1023          inputName: "smscAddressText",
1024          hintText: '',
1025          modelProperty: 'original',
1026 @@ -187,11 +245,11 @@
1027          value: false
1028        };
1029        this.controller.setupWidget('useSettings', mmsSmsUseSettingsAttributes, this.mmsSmsUseSettingsModel);        
1030 -        
1031 +*/        
1032        /*********************************************
1033        * Methods for rendering existing pref values
1034        *********************************************/        
1035 -      this.renderEditSMSCAddress = function(response) {
1036 + /*     this.renderEditSMSCAddress = function(response) {
1037          this.smscModel.original = response.smscAddr;
1038          this.controller.modelChanged(this.smscModel,this);
1039          this.emailGatewayModel.original = response.emailGateway;
1040 @@ -367,7 +425,7 @@
1041  
1042                 this.controller.get('currentringtone').update(file.name);
1043         }
1044 -       
1045 +*/     
1046  //    editAccount: function(targetRow){
1047  //      // iterate through hidden inputs
1048  //      var inputHash = {};
1049 --- .orig/usr/palm/applications/com.palm.app.messaging/app/views/prefsAccountSummary/prefsAccountSummary-scene.html
1050 +++ /usr/palm/applications/com.palm.app.messaging/app/views/prefsAccountSummary/prefsAccountSummary-scene.html
1051 @@ -5,7 +5,7 @@
1052        <div id="prefHeaderText" class="title" x-mojo-loc=''>Preferences &amp; Accounts</div>
1053      </div>
1054    </div>
1055 -
1056 +<!--
1057         <div class="palm-group">
1058                 <div class="palm-group-title" x-mojo-loc=''>
1059                         New message
1060 @@ -20,8 +20,8 @@
1061                                 </div> 
1062                         </div>                
1063                         <div id="notificationSoundContainer">   
1064 -                               <!-- <div class="palm-row-divider"></div> -->
1065 -                               <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1066 +-->                            <!-- <div class="palm-row-divider"></div> -->
1067 +<!--                           <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1068                                         <div class="palm-row-wrapper">
1069                                                 <div id="notificationSoundSelector" x-mojo-element="ListSelector"></div>
1070                                         </div>
1071 @@ -53,5 +53,43 @@
1072                 </div>
1073         </div>
1074         <div id="accounts_list" x-mojo-element="AccountsList"></div>
1075 +-->
1076 +
1077 +       <div class="palm-group">
1078 +               <div class="palm-group-title" x-mojo-loc=''>Message Drafts</div>
1079 +               <div class="palm-list">
1080 +                       <div class="palm-row first">
1081 +                               <div class="palm-row-wrapper">
1082 +                                       <div x-mojo-element="ToggleButton" id="prefs-clipboard-drafts-toggle"></div>
1083 +                                       <div class="title" x-mojo-loc=''>Copy to Clipboard</div>
1084 +                               </div>
1085 +                       </div>  
1086 +                       <div class="palm-row last">
1087 +                               <div class="palm-row-wrapper">
1088 +                                       <div x-mojo-element="ToggleButton" id="prefs-automatic-drafts-toggle"></div>
1089 +                                       <div class="title" x-mojo-loc=''>Copy to Message</div>
1090 +                               </div>
1091 +                       </div>  
1092 +               </div>
1093 +       </div>
1094 +       
1095 +       <div x-mojo-loc="" class="palm-info-text">The above settings controls how aborted messages are handled.</div>
1096 +
1097 +       <div class="palm-group">
1098 +               <div class="palm-group-title" x-mojo-loc=''>Message List</div>
1099 +               <div class="palm-list">
1100 +                       <div class="palm-row first">
1101 +                               <div class="palm-row-wrapper">
1102 +                                       <div x-mojo-element="ToggleButton" id="prefs-delete-confirmation-toggle"></div>
1103 +                                       <div class="title" x-mojo-loc=''>Delete Confirmation</div>
1104 +                               </div>
1105 +                       </div>  
1106 +               </div>
1107 +       </div>
1108 +
1109 +       <div id="accounts_list" x-mojo-element="AccountsList" class="show-notifications"></div>
1110 +       
1111 +       <div x-mojo-loc="" class="palm-info-text">IM accounts from same provider share notification preferences.</div>
1112 +       
1113         <div id="addAccountButton" class="palm-button" x-mojo-loc=''>Add IM Account</div>
1114  </div>
1115 \ No newline at end of file
1116 --- .orig/usr/palm/applications/com.palm.app.messaging/sources.json
1117 +++ /usr/palm/applications/com.palm.app.messaging/sources.json
1118 @@ -51,6 +51,12 @@
1119      "source": "app\/controllers\/prefsAccountSummary-assistant.js"\r
1120    },\r
1121    {\r
1122 +    "source": "app\/controllers\/prefsSetupSMSAccount-assistant.js"\r
1123 +  },   \r
1124 +  {\r
1125 +    "source": "app\/controllers\/prefsSetupNotifications-assistant.js"\r
1126 +  },   \r
1127 +  {\r
1128      "source": "app\/controllers\/compose-assistant.js"\r
1129    },\r
1130    {\r
1131 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/de/strings.json
1132 +++ /usr/palm/applications/com.palm.app.messaging/resources/de/strings.json
1133 @@ -168,5 +168,21 @@
1134         "You have received an invitation from #{name} (#{addr}) with the message, \"#{message}\"": "Sie haben eine Einladung von #{name} (#{addr}) mit folgender Nachricht erhalten: „#{addr}“",
1135         "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.",
1136         "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.",
1137 -       "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."
1138 +       "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.",
1139 +       "Off": "",
1140 +       "On": "",
1141 +       "Disabled": "",
1142 +       "Every 2 minutes": "",
1143 +       "Every 5 minutes": "",
1144 +       "Every 15 minutes": "",
1145 +       "Every 30 minutes": "",
1146 +       "Every 60 minutes": "",
1147 +       "Repeat": "",
1148 +       "Repeat infinitely": "",
1149 +       "Repeat 3 times": "",
1150 +       "Repeat 5 times": "",
1151 +       "Repeat 10 times": "",
1152 +       "Repeat 15 times": "",
1153 +       "Repeat 30 times": "",
1154 +       "Limitation": ""
1155  }
1156 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/de/views/prefsAccountSummary/prefsAccountSummary-scene.html
1157 +++ /usr/palm/applications/com.palm.app.messaging/resources/de/views/prefsAccountSummary/prefsAccountSummary-scene.html
1158 @@ -5,7 +5,7 @@
1159        <div id="prefHeaderText" class="title">Einstellungen und Konten</div>
1160      </div>
1161    </div>
1162 -
1163 +<!--
1164         <div class="palm-group">
1165                 <div class="palm-group-title">
1166                         Neue Nachricht
1167 @@ -20,8 +20,8 @@
1168                                 </div> 
1169                         </div>                
1170                         <div id="notificationSoundContainer">   
1171 -                               <!-- <div class="palm-row-divider"></div> -->
1172 -                               <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1173 +-->                            <!-- <div class="palm-row-divider"></div> -->
1174 +<!--                           <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1175                                         <div class="palm-row-wrapper">
1176                                                 <div id="notificationSoundSelector" x-mojo-element="ListSelector"></div>
1177                                         </div>
1178 @@ -53,5 +53,43 @@
1179                 </div>
1180         </div>
1181         <div id="accounts_list" x-mojo-element="AccountsList"></div>
1182 +-->
1183 +
1184 +       <div class="palm-group">
1185 +               <div class="palm-group-title" x-mojo-loc=''>Message Drafts</div>
1186 +               <div class="palm-list">
1187 +                       <div class="palm-row first">
1188 +                               <div class="palm-row-wrapper">
1189 +                                       <div x-mojo-element="ToggleButton" id="prefs-clipboard-drafts-toggle"></div>
1190 +                                       <div class="title" x-mojo-loc=''>Copy to Clipboard</div>
1191 +                               </div>
1192 +                       </div>  
1193 +                       <div class="palm-row last">
1194 +                               <div class="palm-row-wrapper">
1195 +                                       <div x-mojo-element="ToggleButton" id="prefs-automatic-drafts-toggle"></div>
1196 +                                       <div class="title" x-mojo-loc=''>Copy to Message</div>
1197 +                               </div>
1198 +                       </div>  
1199 +               </div>
1200 +       </div>
1201 +       
1202 +       <div x-mojo-loc="" class="palm-info-text">The above settings controls how aborted messages are handled.</div>
1203 +
1204 +       <div class="palm-group">
1205 +               <div class="palm-group-title" x-mojo-loc=''>Message List</div>
1206 +               <div class="palm-list">
1207 +                       <div class="palm-row first">
1208 +                               <div class="palm-row-wrapper">
1209 +                                       <div x-mojo-element="ToggleButton" id="prefs-delete-confirmation-toggle"></div>
1210 +                                       <div class="title" x-mojo-loc=''>Delete Confirmation</div>
1211 +                               </div>
1212 +                       </div>  
1213 +               </div>
1214 +       </div>
1215 +
1216 +       <div id="accounts_list" x-mojo-element="AccountsList" class="show-notifications"></div>
1217 +       
1218 +       <div x-mojo-loc="" class="palm-info-text">IM accounts from same provider share notification preferences.</div>
1219 +       
1220         <div id="addAccountButton" class="palm-button">IM-Konto hinzufügen</div>
1221  </div>
1222 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/es/strings.json
1223 +++ /usr/palm/applications/com.palm.app.messaging/resources/es/strings.json
1224 @@ -172,5 +172,21 @@
1225         "You have received an invitation from #{name} (#{addr}) with the message, \"#{message}\"": "Recibiste una invitación de #{name} (#{addr}) con este mensaje: \"#{message}\"",
1226         "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}.",
1227         "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}.",
1228 -       "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."
1229 +       "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.",
1230 +       "Off": "",
1231 +       "On": "",
1232 +       "Disabled": "",
1233 +       "Every 2 minutes": "",
1234 +       "Every 5 minutes": "",
1235 +       "Every 15 minutes": "",
1236 +       "Every 30 minutes": "",
1237 +       "Every 60 minutes": "",
1238 +       "Repeat": "",
1239 +       "Repeat infinitely": "",
1240 +       "Repeat 3 times": "",
1241 +       "Repeat 5 times": "",
1242 +       "Repeat 10 times": "",
1243 +       "Repeat 15 times": "",
1244 +       "Repeat 30 times": "",
1245 +       "Limitation": ""
1246  }
1247 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/es/views/prefsAccountSummary/prefsAccountSummary-scene.html
1248 +++ /usr/palm/applications/com.palm.app.messaging/resources/es/views/prefsAccountSummary/prefsAccountSummary-scene.html
1249 @@ -5,7 +5,7 @@
1250        <div id="prefHeaderText" class="title">Preferencias y cuentas</div>
1251      </div>
1252    </div>
1253 -
1254 +<!--
1255         <div class="palm-group">
1256                 <div class="palm-group-title">
1257                         Mensaje nuevo
1258 @@ -20,8 +20,8 @@
1259                                 </div> 
1260                         </div>                
1261                         <div id="notificationSoundContainer">   
1262 -                               <!-- <div class="palm-row-divider"></div> -->
1263 -                               <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1264 +-->                            <!-- <div class="palm-row-divider"></div> -->
1265 +<!--                           <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1266                                         <div class="palm-row-wrapper">
1267                                                 <div id="notificationSoundSelector" x-mojo-element="ListSelector"></div>
1268                                         </div>
1269 @@ -53,5 +53,43 @@
1270                 </div>
1271         </div>
1272         <div id="accounts_list" x-mojo-element="AccountsList"></div>
1273 +-->
1274 +
1275 +       <div class="palm-group">
1276 +               <div class="palm-group-title" x-mojo-loc=''>Message Drafts</div>
1277 +               <div class="palm-list">
1278 +                       <div class="palm-row first">
1279 +                               <div class="palm-row-wrapper">
1280 +                                       <div x-mojo-element="ToggleButton" id="prefs-clipboard-drafts-toggle"></div>
1281 +                                       <div class="title" x-mojo-loc=''>Copy to Clipboard</div>
1282 +                               </div>
1283 +                       </div>  
1284 +                       <div class="palm-row last">
1285 +                               <div class="palm-row-wrapper">
1286 +                                       <div x-mojo-element="ToggleButton" id="prefs-automatic-drafts-toggle"></div>
1287 +                                       <div class="title" x-mojo-loc=''>Copy to Message</div>
1288 +                               </div>
1289 +                       </div>  
1290 +               </div>
1291 +       </div>
1292 +       
1293 +       <div x-mojo-loc="" class="palm-info-text">The above settings controls how aborted messages are handled.</div>
1294 +
1295 +       <div class="palm-group">
1296 +               <div class="palm-group-title" x-mojo-loc=''>Message List</div>
1297 +               <div class="palm-list">
1298 +                       <div class="palm-row first">
1299 +                               <div class="palm-row-wrapper">
1300 +                                       <div x-mojo-element="ToggleButton" id="prefs-delete-confirmation-toggle"></div>
1301 +                                       <div class="title" x-mojo-loc=''>Delete Confirmation</div>
1302 +                               </div>
1303 +                       </div>  
1304 +               </div>
1305 +       </div>
1306 +
1307 +       <div id="accounts_list" x-mojo-element="AccountsList" class="show-notifications"></div>
1308 +       
1309 +       <div x-mojo-loc="" class="palm-info-text">IM accounts from same provider share notification preferences.</div>
1310 +       
1311         <div id="addAccountButton" class="palm-button">Añadir cuenta de IM</div>
1312  </div>
1313 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/fr/strings.json
1314 +++ /usr/palm/applications/com.palm.app.messaging/resources/fr/strings.json
1315 @@ -168,5 +168,21 @@
1316         "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} »",
1317         "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}.",
1318         "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}.",
1319 -       "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."
1320 +       "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.",
1321 +       "Off": "",
1322 +       "On": "",
1323 +       "Disabled": "",
1324 +       "Every 2 minutes": "",
1325 +       "Every 5 minutes": "",
1326 +       "Every 15 minutes": "",
1327 +       "Every 30 minutes": "",
1328 +       "Every 60 minutes": "",
1329 +       "Repeat": "",
1330 +       "Repeat infinitely": "",
1331 +       "Repeat 3 times": "",
1332 +       "Repeat 5 times": "",
1333 +       "Repeat 10 times": "",
1334 +       "Repeat 15 times": "",
1335 +       "Repeat 30 times": "",
1336 +       "Limitation": ""
1337  }
1338 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/fr/views/prefsAccountSummary/prefsAccountSummary-scene.html
1339 +++ /usr/palm/applications/com.palm.app.messaging/resources/fr/views/prefsAccountSummary/prefsAccountSummary-scene.html
1340 @@ -5,7 +5,7 @@
1341        <div id="prefHeaderText" class="title">Préférences et comptes</div>
1342      </div>
1343    </div>
1344 -
1345 +<!--
1346         <div class="palm-group">
1347                 <div class="palm-group-title">
1348                         Nouveau message
1349 @@ -20,8 +20,8 @@
1350                                 </div> 
1351                         </div>                
1352                         <div id="notificationSoundContainer">   
1353 -                               <!-- <div class="palm-row-divider"></div> -->
1354 -                               <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1355 +-->                            <!-- <div class="palm-row-divider"></div> -->
1356 +<!--                           <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1357                                         <div class="palm-row-wrapper">
1358                                                 <div id="notificationSoundSelector" x-mojo-element="ListSelector"></div>
1359                                         </div>
1360 @@ -53,5 +53,43 @@
1361                 </div>
1362         </div>
1363         <div id="accounts_list" x-mojo-element="AccountsList"></div>
1364 +-->
1365 +
1366 +       <div class="palm-group">
1367 +               <div class="palm-group-title" x-mojo-loc=''>Message Drafts</div>
1368 +               <div class="palm-list">
1369 +                       <div class="palm-row first">
1370 +                               <div class="palm-row-wrapper">
1371 +                                       <div x-mojo-element="ToggleButton" id="prefs-clipboard-drafts-toggle"></div>
1372 +                                       <div class="title" x-mojo-loc=''>Copy to Clipboard</div>
1373 +                               </div>
1374 +                       </div>  
1375 +                       <div class="palm-row last">
1376 +                               <div class="palm-row-wrapper">
1377 +                                       <div x-mojo-element="ToggleButton" id="prefs-automatic-drafts-toggle"></div>
1378 +                                       <div class="title" x-mojo-loc=''>Copy to Message</div>
1379 +                               </div>
1380 +                       </div>  
1381 +               </div>
1382 +       </div>
1383 +       
1384 +       <div x-mojo-loc="" class="palm-info-text">The above settings controls how aborted messages are handled.</div>
1385 +
1386 +       <div class="palm-group">
1387 +               <div class="palm-group-title" x-mojo-loc=''>Message List</div>
1388 +               <div class="palm-list">
1389 +                       <div class="palm-row first">
1390 +                               <div class="palm-row-wrapper">
1391 +                                       <div x-mojo-element="ToggleButton" id="prefs-delete-confirmation-toggle"></div>
1392 +                                       <div class="title" x-mojo-loc=''>Delete Confirmation</div>
1393 +                               </div>
1394 +                       </div>  
1395 +               </div>
1396 +       </div>
1397 +
1398 +       <div id="accounts_list" x-mojo-element="AccountsList" class="show-notifications"></div>
1399 +       
1400 +       <div x-mojo-loc="" class="palm-info-text">IM accounts from same provider share notification preferences.</div>
1401 +       
1402         <div id="addAccountButton" class="palm-button">Ajouter un compte IM</div>
1403  </div>
1404 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/it/strings.json
1405 +++ /usr/palm/applications/com.palm.app.messaging/resources/it/strings.json
1406 @@ -170,5 +170,21 @@
1407         "You have received an invitation from #{name} (#{addr}) with the message, \"#{message}\"": "Avete ricevuto un invito da #{name} (#{addr}) con il messaggio \"#{message}\"",
1408         "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.",
1409         "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.",
1410 -       "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."
1411 +       "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.",
1412 +       "Off": "",
1413 +       "On": "",
1414 +       "Disabled": "",
1415 +       "Every 2 minutes": "",
1416 +       "Every 5 minutes": "",
1417 +       "Every 15 minutes": "",
1418 +       "Every 30 minutes": "",
1419 +       "Every 60 minutes": "",
1420 +       "Repeat": "",
1421 +       "Repeat infinitely": "",
1422 +       "Repeat 3 times": "",
1423 +       "Repeat 5 times": "",
1424 +       "Repeat 10 times": "",
1425 +       "Repeat 15 times": "",
1426 +       "Repeat 30 times": "",
1427 +       "Limitation": ""
1428  }
1429 --- .orig/usr/palm/applications/com.palm.app.messaging/resources/it/views/prefsAccountSummary/prefsAccountSummary-scene.html
1430 +++ /usr/palm/applications/com.palm.app.messaging/resources/it/views/prefsAccountSummary/prefsAccountSummary-scene.html
1431 @@ -5,7 +5,7 @@
1432        <div id="prefHeaderText" class="title">Preferenze e account</div>
1433      </div>
1434    </div>
1435 -
1436 +<!--
1437         <div class="palm-group">
1438                 <div class="palm-group-title">
1439                         Nuovo messaggio
1440 @@ -20,8 +20,8 @@
1441                                 </div> 
1442                         </div>                
1443                         <div id="notificationSoundContainer">   
1444 -                               <!-- <div class="palm-row-divider"></div> -->
1445 -                               <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1446 +-->                            <!-- <div class="palm-row-divider"></div> -->
1447 +<!--                           <div id="soundselectrow" class="palm-row" x-mojo-tap-highlight="momentary">
1448                                         <div class="palm-row-wrapper">
1449                                                 <div id="notificationSoundSelector" x-mojo-element="ListSelector"></div>
1450                                         </div>
1451 @@ -53,5 +53,43 @@
1452                 </div>
1453         </div>
1454         <div id="accounts_list" x-mojo-element="AccountsList"></div>
1455 +-->
1456 +
1457 +       <div class="palm-group">
1458 +               <div class="palm-group-title" x-mojo-loc=''>Message Drafts</div>
1459 +               <div class="palm-list">
1460 +                       <div class="palm-row first">
1461 +                               <div class="palm-row-wrapper">
1462 +                                       <div x-mojo-element="ToggleButton" id="prefs-clipboard-drafts-toggle"></div>
1463 +                                       <div class="title" x-mojo-loc=''>Copy to Clipboard</div>
1464 +                               </div>
1465 +                       </div>  
1466 +                       <div class="palm-row last">
1467 +                               <div class="palm-row-wrapper">
1468 +                                       <div x-mojo-element="ToggleButton" id="prefs-automatic-drafts-toggle"></div>
1469 +                                       <div class="title" x-mojo-loc=''>Copy to Message</div>
1470 +                               </div>
1471 +                       </div>  
1472 +               </div>
1473 +       </div>
1474 +       
1475 +       <div x-mojo-loc="" class="palm-info-text">The above settings controls how aborted messages are handled.</div>
1476 +
1477 +       <div class="palm-group">
1478 +               <div class="palm-group-title" x-mojo-loc=''>Message List</div>
1479 +               <div class="palm-list">
1480 +                       <div class="palm-row first">
1481 +                               <div class="palm-row-wrapper">
1482 +                                       <div x-mojo-element="ToggleButton" id="prefs-delete-confirmation-toggle"></div>
1483 +                                       <div class="title" x-mojo-loc=''>Delete Confirmation</div>
1484 +                               </div>
1485 +                       </div>  
1486 +               </div>
1487 +       </div>
1488 +
1489 +       <div id="accounts_list" x-mojo-element="AccountsList" class="show-notifications"></div>
1490 +       
1491 +       <div x-mojo-loc="" class="palm-info-text">IM accounts from same provider share notification preferences.</div>
1492 +       
1493         <div id="addAccountButton" class="palm-button">Aggiungi account IM</div>
1494  </div>