Commit 1b96a750065ed6727bc352ca2ef70d6f1e443901

  • avatar
  • dBsooner's Stuff <dbsooner @del…ge.vision5.com>
  • Fri Jan 29 06:21:36 CET 2010
5 new, 2 updated patches.
  
1diff --git a/usr/palm/applications/com.palm.app.findapps/app/controllers/details-assistant.js b/usr/palm/applications/com.palm.app.findapps/app/controllers/details-assistant.js
2index 4529aa6..6357220 100644
3--- a/usr/palm/applications/com.palm.app.findapps/app/controllers/details-assistant.js
4+++ b/usr/palm/applications/com.palm.app.findapps/app/controllers/details-assistant.js
5@@ -98,7 +98,7 @@ var DetailsAssistant = Class.create(
6
7 this._detailsPage = this.controller.get('detailsPage');
8
9- this.drawerModel = {open:false};
10+ this.drawerModel = {open:true};
11 this.controller.setupWidget('detailsDrawer', {modelProperty:'open', unstyled:true}, this.drawerModel);
12 this.drawer = this.controller.get('detailsDrawer');
13
  
1diff --git a/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css b/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
2index 545460c..5a82f18 100644
3--- a/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
4+++ b/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
5@@ -131,7 +131,7 @@ body.palm-default
6 max-height: 34px;
7 clear:both;
8 line-height:16px;
9- color:white;
10+ color:black;
11 text-align:center;
12 font-weight:bold;
13 font-size: 14px;
  
1Name: Named Pages in App Launcher
2Version: 1.3.5-2
3Author: l.m.orchard@pobox.com
4Description: This patch adds a name to each page in the launcher. Hold the Orange key or gesture area and tap the header to rename a page. Tapping on the name header brings up a submenu for navigating directly to any named page. You can also move an app to another page by using a selector in the app's info dialog, summoned via Orange-tap on an app in the launcher. This patch works better with the "app-launcher-enable-add-delete-pages" and "app-launcher-gesture-tap-for-info-and-delete" patches, and may conflict with the "app-launcher-wrap-pages" patch.
5
6Index: /usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
7===================================================================
8--- .orig/usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
9+++ /usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
10@@ -62,6 +62,9 @@ var LauncherAssistant = Class.create({
1diff --git a/usr/lib/luna/system/luna-applauncher/app/controllers/app-info-assistant.js b/usr/lib/luna/system/luna-applauncher/app/controllers/app-info-assistant.js
2index 6bd2b62..ec958a9 100644
3--- a/usr/lib/luna/system/luna-applauncher/app/controllers/app-info-assistant.js
4+++ b/usr/lib/luna/system/luna-applauncher/app/controllers/app-info-assistant.js
5@@ -1,8 +1,9 @@
6 /* Copyright 2009 Palm, Inc. All rights reserved. */
7
8 var AppInfoAssistant = Class.create({
9- initialize: function(appInfo, sceneController, closeCallback) {
10+ initialize: function(appInfo, parent, sceneController, closeCallback) {
11 this.sceneController = sceneController;
12+ this.parent = parent;
13 this.appInfo = appInfo;
14 this.isDynamic = this.isDynamicLaunchPoint(this.appInfo);
15 this.closeCallback = closeCallback;
16@@ -43,6 +44,29 @@ var AppInfoAssistant = Class.create({
17 if (!this.isDynamic) {
18 this.appSizeRequest = ApplicationService.getAppSize(this.appInfo.id, this.onGetAppSize.bind(this));
19 }
20+
21+ // Find the page for the app being inspected.
22+ var app_page = this.parent.pagesModel
23+ .findApplication(this.appInfo.launchPointId);
24+
25+ // Build the list selector for switching pages.
26+ this.sceneController.setupWidget(
27+ 'page_name',
28+ {
29+ label: $L('Page'),
30+ choices: this.parent.pageDivs.map(function (alias, idx) {
31+ return {
32+ value: idx,
33+ label: this.parent.getPageName(idx)
34+ };
35+ }, this)
36+ },
37+ this.page_name_model = {
38+ value: app_page.page, disabled: false
39+ }
40+ );
41+ this.sceneController.listen('page_name', Mojo.Event.propertyChange,
42+ this.onPageNameChanged.bindAsEventListener(this));
43 },
44
45 insertVersion: function() {
46@@ -149,6 +173,10 @@ var AppInfoAssistant = Class.create({
47 }
48 },
49
50+ onPageNameChanged: function (event) {
51+ this.parent.moveAppToPage(this.appInfo.launchPointId, event.value);
52+ },
53+
54 cleanup: function() {
55 if (this.appSizeRequest) {
56 this.appSizeRequest.cancel();
57diff --git a/usr/lib/luna/system/luna-applauncher/app/controllers/global-search-assistant.js b/usr/lib/luna/system/luna-applauncher/app/controllers/global-search-assistant.js
58index e4268cf..651b2a1 100644
59--- a/usr/lib/luna/system/luna-applauncher/app/controllers/global-search-assistant.js
60+++ b/usr/lib/luna/system/luna-applauncher/app/controllers/global-search-assistant.js
61@@ -246,6 +246,10 @@ GlobalSearchAssistant = Class.create({
62 },
63
64 onKeyDown: function(event) {
65+ if (!this.searchEnabled) {
66+ // HACK: The event.stop() below disables text entry in dialogs
67+ return;
68+ }
1169
70 this.searchField.mojo.focus();
71
72@@ -262,6 +266,10 @@ GlobalSearchAssistant = Class.create({
73 },
74
75 onKeyUp: function(event) {
76+ if (!this.searchEnabled) {
77+ // HACK: The event.stop() below disables text entry in dialogs
78+ return;
79+ }
80
81 // block key events from global search
82 if (!this.searchEnabled) {
83@@ -279,6 +287,10 @@ GlobalSearchAssistant = Class.create({
84 },
85
86 onKeyPress: function(event) {
87+ if (!this.searchEnabled) {
88+ // HACK: The event.stop() below disables text entry in dialogs
89+ return;
90+ }
91
92 // block key events from global search and from repeating until the first key has been processed
93 if (!this.searchEnabled ||
94diff --git a/usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js b/usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
95index bebbad2..b789a6a 100644
96--- a/usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
97+++ b/usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
98@@ -62,6 +62,14 @@ var LauncherAssistant = Class.create({
99
12100 this.dragStartHandler = this.onDragStart.bindAsEventListener(this);
13101 this.launchApp = this.launchApp.bind(this);
14102+
15103+ this.page_names_cookie = new Mojo.Model.Cookie('page_names');
16104+ this.page_names = this.page_names_cookie.get() || [];
105+
106+ // HACK: Doing a splice here rather than defining this item above so
107+ // that the patch works with 'Enable Add / Delete' patch.
108+ this.appMenuModel.items.splice(1, 0,
109+ { label: $L('Rename page'), command: 'renamepage' });
17110 },
18111
19112 setup: function() {
20@@ -77,6 +80,9 @@ var LauncherAssistant = Class.create({
113@@ -77,6 +85,9 @@ var LauncherAssistant = Class.create({
21114 }
22115 );
23116
120120 this.globalSearchAssistant = new GlobalSearchAssistant(this.controller, this);
121121
122122 // HACK: The launcher starts out launched and deactive.
123@@ -241,6 +247,12 @@ var LauncherAssistant = Class.create({
124 }
123@@ -121,6 +132,9 @@ var LauncherAssistant = Class.create({
124 case 'listapps':
125 ApplicationService.launch(this.deviceInfo.id, this.deviceInfo.params);
126 break;
127+ case 'renamepage':
128+ this.handleRenamePage(event);
129+ break;
130 case 'defaultapps':
131 ApplicationService.launch(this.deviceInfo.id, this.deviceInfo.defaultAppParams);
132 break;
133@@ -242,6 +256,12 @@ var LauncherAssistant = Class.create({
125134
126135 this.pageDivs = $$('.launcher_page');
127+
136
128137+ if (createPage) {
129138+ this.page_names.splice(newPageIndex, 0, []);
130139+ this.updatePageHeader();
131140+ this.savePageNames();
132141+ }
133
142+
134143 // extend the horizontal scrollers internal width
135144 pagesContainer.style.width = (this.pageDivs.length*this.kPageWidth)+'px';
136@@ -302,6 +314,11 @@ var LauncherAssistant = Class.create({
137145
146@@ -303,6 +323,11 @@ var LauncherAssistant = Class.create({
138147 // remove the pages indicator
139148 this.deletePageIndicator();
140+
149
141150+ // Splice out the name for this page.
142151+ this.page_names.splice(pageIndex, 1);
143152+ this.updatePageHeader();
144153+ this.savePageNames();
145
154+
146155 // snap to a valid location
147156 if (pageIndex >= this.pageDivs.length) {
148@@ -587,6 +604,7 @@ var LauncherAssistant = Class.create({
157 $('launcher_root').mojo.setSnapIndex(this.pageDivs.length-1, true);
158@@ -587,6 +612,7 @@ var LauncherAssistant = Class.create({
149159 this.globalSearchAssistant.enable(false);
150160
151161 var appInfoAssistant = new AppInfoAssistant(appInfo,
163163 this.controller,
164164 function() {
165165 delete this.appDialog;
166@@ -658,6 +676,9 @@ var LauncherAssistant = Class.create({
167
166@@ -659,6 +685,9 @@ var LauncherAssistant = Class.create({
168167 /* Updates the positions of all page indicators. */
169168 updatePageIndicators: function() {
170+
169
171170+ // Ensure that the view menu tabs reflect the active page. (LMO)
172171+ this.updatePageHeader();
173
172+
174173 if (this.indicators.length <= 0) {
175174 return;
176@@ -778,6 +799,134 @@ var LauncherAssistant = Class.create({
175 }
176@@ -778,6 +807,139 @@ var LauncherAssistant = Class.create({
177177 onLaunchCompleted: function(response) {
178178
179179 delete this.launchRequest;
180- }
181180+ },
182181+
183182+ /**
185185+ handlePageNameTap: function (event) {
186186+ if (event.up && event.up.altKey || event.up && event.up.metaKey) {
187187+ // Handle alt-tap or meta-tap on page header to rename page.
188+
189+ // Hide the quick launch panel and disable the global search so
190+ // that the dialog is fully visible and usable.
191+ SystemManagerService.showQuickLaunch(false);
192+ this.globalSearchAssistant.enable(false);
193+
194+ // Invoke the page rename dialog.
195+ this.renamePageDialog = this.controller.showDialog({
196+ template: 'launcher/dialogs/rename-page',
197+ assistant: new RenamePageAssistant(
198+ this, function () {
199+ delete this.renamePageDialog;
200+ SystemManagerService.showQuickLaunch(true);
201+ this.globalSearchAssistant.enable(true);
202+ }.bind(this)
203+ )
204+ });
205+
188+ this.handleRenamePage(event);
206189+ } else {
207190+ // Handle tap on page header to invoke page menu.
208191+
215215+ },
216216+
217217+ /**
218+ * Handle request to rename page
219+ */
220+ handleRenamePage: function (event) {
221+ // Hide the quick launch panel and disable the global search so
222+ // that the dialog is fully visible and usable.
223+ SystemManagerService.showQuickLaunch(false);
224+ this.globalSearchAssistant.enable(false);
225+
226+ // Invoke the page rename dialog.
227+ this.renamePageDialog = this.controller.showDialog({
228+ template: 'launcher/dialogs/rename-page',
229+ assistant: new RenamePageAssistant(
230+ this, function () {
231+ delete this.renamePageDialog;
232+ SystemManagerService.showQuickLaunch(true);
233+ this.globalSearchAssistant.enable(true);
234+ }.bind(this)
235+ )
236+ });
237+ },
238+
239+ /**
218240+ * Get the name for a numbered page.
219241+ *
220242+ * @param {integer} idx Page number
310310+ this.pagesModel.save();
311311+ // Switch to the page to show the change
312312+ this.gotoPage(page_idx);
313+ }
313 }
314314
315315 });
316Index: /usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
317===================================================================
318--- .orig/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
319+++ /usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
320@@ -59,7 +59,7 @@ body.palm-default
321 width: 100%;
322 z-index: 29;
323 height: 24px;
324- top: 1px;
325+ top: 45px; /* Insert some space for the page selector (LMO) */
326 background: url(../images/fade-arrow-up.png) center center no-repeat;
327 -webkit-palm-mouse-target: ignore;
328 }
329@@ -106,7 +106,7 @@ body.palm-default
330 }
331
332 .page_scroller_container {
333- margin-top: 10px;
334+ margin-top: 55px; /* Insert some space for the page selector (LMO) */
335 margin-bottom: -20px;
336 }
337
338Index: /usr/lib/luna/system/luna-applauncher/app/controllers/global-search-assistant.js
339===================================================================
340--- .orig/usr/lib/luna/system/luna-applauncher/app/controllers/global-search-assistant.js
341+++ /usr/lib/luna/system/luna-applauncher/app/controllers/global-search-assistant.js
342@@ -246,6 +246,10 @@ GlobalSearchAssistant = Class.create({
343 },
344
345 onKeyDown: function(event) {
346+ if (!this.searchEnabled) {
347+ // HACK: The event.stop() below disables text entry in dialogs
348+ return;
349+ }
350
351 this.searchField.mojo.focus();
352
353@@ -262,6 +266,10 @@ GlobalSearchAssistant = Class.create({
354 },
355
356 onKeyUp: function(event) {
357+ if (!this.searchEnabled) {
358+ // HACK: The event.stop() below disables text entry in dialogs
359+ return;
360+ }
361
362 // block key events from global search
363 if (!this.searchEnabled) {
364@@ -279,6 +287,10 @@ GlobalSearchAssistant = Class.create({
365 },
366
367 onKeyPress: function(event) {
368+ if (!this.searchEnabled) {
369+ // HACK: The event.stop() below disables text entry in dialogs
370+ return;
371+ }
372
373 // block key events from global search and from repeating until the first key has been processed
374 if (!this.searchEnabled ||
375Index: /usr/lib/luna/system/luna-applauncher/app/views/launcher/launcher-scene.html
376===================================================================
377--- .orig/usr/lib/luna/system/luna-applauncher/app/views/launcher/launcher-scene.html
378+++ /usr/lib/luna/system/luna-applauncher/app/views/launcher/launcher-scene.html
379@@ -18,6 +18,7 @@
380 </div>
381
382 <div id="launcher-main">
383+ <div id="page-category" class="palm-header center" x-mojo-touch-feedback="immediate">...</div>
384 <div id="launcher_root" x-mojo-element="Scroller">
385 <div id="pages_container"></div>
386 </div>
387Index: /usr/lib/luna/system/luna-applauncher/sources.json
388===================================================================
389--- .orig/usr/lib/luna/system/luna-applauncher/sources.json
390+++ /usr/lib/luna/system/luna-applauncher/sources.json
391@@ -27,6 +27,10 @@
392 {
393 "source": "app\/models\/launcher-pages.js"
394 },
395+
396+ {
397+ "source": "app\/controllers\/rename-page-assistant.js"
398+ },
399
400 {
401 "source": "app\/models\/ApplicationService.js"
402Index: /usr/lib/luna/system/luna-applauncher/app/controllers/app-info-assistant.js
403===================================================================
404--- .orig/usr/lib/luna/system/luna-applauncher/app/controllers/app-info-assistant.js
405+++ /usr/lib/luna/system/luna-applauncher/app/controllers/app-info-assistant.js
406@@ -1,8 +1,9 @@
407 /* Copyright 2009 Palm, Inc. All rights reserved. */
408
409 var AppInfoAssistant = Class.create({
410- initialize: function(appInfo, sceneController, closeCallback) {
411+ initialize: function(appInfo, parent, sceneController, closeCallback) {
412 this.sceneController = sceneController;
413+ this.parent = parent;
414 this.appInfo = appInfo;
415 this.isDynamic = this.isDynamicLaunchPoint(this.appInfo);
416 this.closeCallback = closeCallback;
417@@ -43,6 +44,29 @@ var AppInfoAssistant = Class.create({
418 if (!this.isDynamic) {
419 this.appSizeRequest = ApplicationService.getAppSize(this.appInfo.id, this.onGetAppSize.bind(this));
420 }
421+
422+ // Find the page for the app being inspected.
423+ var app_page = this.parent.pagesModel
424+ .findApplication(this.appInfo.launchPointId);
425+
426+ // Build the list selector for switching pages.
427+ this.sceneController.setupWidget(
428+ 'page_name',
429+ {
430+ label: $L('Page'),
431+ choices: this.parent.pageDivs.map(function (alias, idx) {
432+ return {
433+ value: idx,
434+ label: this.parent.getPageName(idx)
435+ };
436+ }, this)
437+ },
438+ this.page_name_model = {
439+ value: app_page.page, disabled: false
440+ }
441+ );
442+ this.sceneController.listen('page_name', Mojo.Event.propertyChange,
443+ this.onPageNameChanged.bindAsEventListener(this));
444 },
445
446 insertVersion: function() {
447@@ -148,6 +172,10 @@ var AppInfoAssistant = Class.create({
448 this.sceneController.get('app-size').update(sizeInKBytes + $L('K'));
449 }
450 },
451+
452+ onPageNameChanged: function (event) {
453+ this.parent.moveAppToPage(this.appInfo.launchPointId, event.value);
454+ },
455
456 cleanup: function() {
457 if (this.appSizeRequest) {
458Index: /usr/lib/luna/system/luna-applauncher/app/views/launcher/dialogs/app-info.html
459===================================================================
460--- .orig/usr/lib/luna/system/luna-applauncher/app/views/launcher/dialogs/app-info.html
461+++ /usr/lib/luna/system/luna-applauncher/app/views/launcher/dialogs/app-info.html
462@@ -8,6 +8,16 @@
463 </div>
464 <div class="palm-dialog-separator"></div>
465 <div class="palm-dialog-buttons">
466+ <div class="palm-group unlabeled">
467+ <div class="palm-list">
468+ <div class="palm-row single">
469+ <div class="palm-row-wrapper">
470+ <div x-mojo-element="ListSelector"
471+ id="page_name" name="page_name"></div>
472+ </div>
473+ </div>
474+ </div>
475+ </div>
476 <div id='delete-btn' x-mojo-element="Button"></div>
477 <div id='done-btn' x-mojo-element="Button"></div>
478 </div>
479Index: /usr/lib/luna/system/luna-applauncher/app/controllers/rename-page-assistant.js
480===================================================================
316diff --git a/usr/lib/luna/system/luna-applauncher/app/controllers/rename-page-assistant.js b/usr/lib/luna/system/luna-applauncher/app/controllers/rename-page-assistant.js
317new file mode 100644
318index 0000000..5777194
481319--- /dev/null
482+++ /usr/lib/luna/system/luna-applauncher/app/controllers/rename-page-assistant.js
320+++ b/usr/lib/luna/system/luna-applauncher/app/controllers/rename-page-assistant.js
483321@@ -0,0 +1,76 @@
484322+/**
485323+ * Assistant managing the page rename dialog.
395395+
396396+ EOF:null
397397+});
398Index: /usr/lib/luna/system/luna-applauncher/app/views/launcher/dialogs/rename-page.html
399===================================================================
398diff --git a/usr/lib/luna/system/luna-applauncher/app/views/launcher/dialogs/app-info.html b/usr/lib/luna/system/luna-applauncher/app/views/launcher/dialogs/app-info.html
399index bdf3824..bd0a90a 100644
400--- a/usr/lib/luna/system/luna-applauncher/app/views/launcher/dialogs/app-info.html
401+++ b/usr/lib/luna/system/luna-applauncher/app/views/launcher/dialogs/app-info.html
402@@ -8,6 +8,16 @@
403 </div>
404 <div class="palm-dialog-separator"></div>
405 <div class="palm-dialog-buttons">
406+ <div class="palm-group unlabeled">
407+ <div class="palm-list">
408+ <div class="palm-row single">
409+ <div class="palm-row-wrapper">
410+ <div x-mojo-element="ListSelector"
411+ id="page_name" name="page_name"></div>
412+ </div>
413+ </div>
414+ </div>
415+ </div>
416 <div id='delete-btn' x-mojo-element="Button"></div>
417 <div id='done-btn' x-mojo-element="Button"></div>
418 </div>
419diff --git a/usr/lib/luna/system/luna-applauncher/app/views/launcher/dialogs/rename-page.html b/usr/lib/luna/system/luna-applauncher/app/views/launcher/dialogs/rename-page.html
420new file mode 100644
421index 0000000..b26286a
400422--- /dev/null
401+++ /usr/lib/luna/system/luna-applauncher/app/views/launcher/dialogs/rename-page.html
423+++ b/usr/lib/luna/system/luna-applauncher/app/views/launcher/dialogs/rename-page.html
402424@@ -0,0 +1,24 @@
403425+<div id="palm-dialog-content" class="palm-dialog-content">
404426+ <div class="palm-dialog-title">
446446+ <div class="palm-button-wrapper" x-mojo-loc="">Cancel</div>
447447+ </div>
448448+</div>
449diff --git a/usr/lib/luna/system/luna-applauncher/app/views/launcher/launcher-scene.html b/usr/lib/luna/system/luna-applauncher/app/views/launcher/launcher-scene.html
450index d34a6a5..61c2788 100644
451--- a/usr/lib/luna/system/luna-applauncher/app/views/launcher/launcher-scene.html
452+++ b/usr/lib/luna/system/luna-applauncher/app/views/launcher/launcher-scene.html
453@@ -18,6 +18,7 @@
454 </div>
455
456 <div id="launcher-main">
457+ <div id="page-category" class="palm-header center" x-mojo-touch-feedback="immediate">...</div>
458 <div id="launcher_root" x-mojo-element="Scroller">
459 <div id="pages_container"></div>
460 </div>
461diff --git a/usr/lib/luna/system/luna-applauncher/sources.json b/usr/lib/luna/system/luna-applauncher/sources.json
462index bb94ae2..79c669d 100644
463--- a/usr/lib/luna/system/luna-applauncher/sources.json
464+++ b/usr/lib/luna/system/luna-applauncher/sources.json
465@@ -29,6 +29,10 @@
466 },
467
468 {
469+ "source": "app\/controllers\/rename-page-assistant.js"
470+ },
471+
472+ {
473 "source": "app\/models\/ApplicationService.js"
474 },
475
476diff --git a/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css b/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
477index 545460c..afd9b5e 100644
478--- a/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
479+++ b/usr/lib/luna/system/luna-applauncher/stylesheets/launcher.css
480@@ -6,6 +6,10 @@ body.palm-default
481 background-image:url(../images/scrim.png);
482 }
483
484+#page-category {
485+ opacity: 0.5;
486+}
487+
488 .root {
489 position:relative;
490 overflow:hidden;
491@@ -59,7 +63,7 @@ body.palm-default
492 width: 100%;
493 z-index: 29;
494 height: 24px;
495- top: 1px;
496+ top: 45px; /* Insert some space for the page selector (LMO) */
497 background: url(../images/fade-arrow-up.png) center center no-repeat;
498 -webkit-palm-mouse-target: ignore;
499 }
500@@ -106,7 +110,7 @@ body.palm-default
501 }
502
503 .page_scroller_container {
504- margin-top: 10px;
505+ margin-top: 55px; /* Insert some space for the page selector (LMO) */
506 margin-bottom: -20px;
507 }
508
  
1diff --git a/usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js b/usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js
2index 461cba0..6d6d227 100644
3--- a/usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js
4+++ b/usr/palm/applications/com.palm.app.email/app/controllers/compose-assistant.js
5@@ -799,8 +799,7 @@ ComposeAssistant.onLoad = function(controller, email) {
6 if (email.action == "forward") {
7 controller.get('forwarded_msg_body').update(originalText);
8 } else {
9- bodyText += originalText;
10- editor.setStyle({'min-height':'320px', 'font-size': '18px'});
11+ controller.get('forwarded_msg_body').update(originalText);
12 }
13 editor.update(bodyText);
14
15@@ -847,6 +846,6 @@ ComposeAssistant.replaceURIs = function(originalText, email) {
16
17 ComposeAssistant.kAppMenuHighPriority = $L('Set as High Priority');
18 ComposeAssistant.kAppMenuNormalPriority = $L('Set as Normal Priority');
19-ComposeAssistant.kEmptySignatureRegex = /<span id="signature"><div style="font-family: arial, sans-serif; font-size: 12px;color: #999999;">[<br>]*<\/div>[<br>]*<\/span>/
20+ComposeAssistant.kEmptySignatureRegex = /<span id="signature"><div style="font-family: Calibri, sans-serif; font-size: 15px;color: #999999;">[<br>]*<\/div>[<br>]*<\/span>/
21 ComposeAssistant.kForwardDraftDelimeter = "<span id='FORWARD_DRAFT_TEXT' class='display:none'></span>";
22
23diff --git a/usr/palm/applications/com.palm.app.email/app/models/Email.js b/usr/palm/applications/com.palm.app.email/app/models/Email.js
24index 68953d4..e791b1f 100644
25--- a/usr/palm/applications/com.palm.app.email/app/models/Email.js
26+++ b/usr/palm/applications/com.palm.app.email/app/models/Email.js
27@@ -159,7 +159,7 @@ var Email = Class.create({
28 if (r.displayName === r.address)
29 toStr = r.displayName;
30 else
31- toStr = "#{displayName} <#{address}>".interpolate(r);
32+ toStr = "#{displayName}".interpolate(r);
33 toAddressList.push(toStr);
34 }
35 } else if (r.role === EmailRecipient.roleCc) {
36@@ -168,7 +168,7 @@ var Email = Class.create({
37 if (r.displayName === r.address)
38 ccStr = r.displayName;
39 else
40- ccStr = "#{displayName} <#{address}>".interpolate(r);
41+ ccStr = "#{displayName}".interpolate(r);
42 ccAddressList.push(ccStr);
43 }
44 }
45@@ -180,20 +180,34 @@ var Email = Class.create({
46 this.text += $L("<b>From:</b> ") + "#{displayName}".interpolate(fromObj).escapeHTML() + "<br/>";
47 }
48 else {
49- this.text += $L("<b>From:</b> ") + "#{displayName} <#{address}>".interpolate(fromObj).escapeHTML() + "<br/>"
50+ this.text += $L("<b>From:</b> ") + "#{displayName}".interpolate(fromObj).escapeHTML() + "<br/>"
51 };
52- this.text += $L("<b>Date:</b> ") + Mojo.Format.formatDate(new Date(parseInt(original.timeStamp)), {date:'medium', time:'short'}) + "<br/>";
53- this.text += $L("<b>Subject:</b> #{summary}").interpolate(original) + "<br/>";
54+ this.text += $L("<b>Sent:</b> ") + Mojo.Format.formatDate(new Date(parseInt(original.timeStamp)), {date:'full', time:'short'}) + "<br/>";
55 if (toAddressList.length > 0) {
56 this.text += $L("<b>To:</b> ") + "#{list}".interpolate({list:toAddressList.join("; ")}).escapeHTML() + "<br/>";
57 }
58 if (ccAddressList.length > 0) {
59- this.text += $L("<b>CC:</b> ") + "#{list}".interpolate({list:ccAddressList.join("; ")}).escapeHTML() + "<br/>";
60+ this.text += $L("<b>Cc:</b> ") + "#{list}".interpolate({list:ccAddressList.join("; ")}).escapeHTML() + "<br/>";
61 }
62+ this.text += $L("<b>Subject:</b> #{summary}").interpolate(original) + "<br/>";
63 this.text += "<br/>";
64 } else {
65 this.text = Email.kReplyForwardSetupElems;
66- this.text += $L("#{displayName} wrote:").interpolate(fromObj) + "<br/><br/>";
67+ if (fromObj.displayName === fromObj.address) {
68+ this.text += $L("<b>From:</b> ") + "#{displayName}".interpolate(fromObj).escapeHTML() + "<br/>";
69+ }
70+ else {
71+ this.text += $L("<b>From:</b> ") + "#{displayName}".interpolate(fromObj).escapeHTML() + "<br/>"
72+ };
73+ this.text += $L("<b>Sent:</b> ") + Mojo.Format.formatDate(new Date(parseInt(original.timeStamp)), {date:'full', time:'short'}) + "<br/>";
74+ if (toAddressList.length > 0) {
75+ this.text += $L("<b>To:</b> ") + "#{list}".interpolate({list:toAddressList.join("; ")}).escapeHTML() + "<br/>";
76+ }
77+ if (ccAddressList.length > 0) {
78+ this.text += $L("<b>Cc:</b> ") + "#{list}".interpolate({list:ccAddressList.join("; ")}).escapeHTML() + "<br/>";
79+ }
80+ this.text += $L("<b>Subject:</b> #{summary}").interpolate(original) + "<br/>";
81+ this.text += "<br/>";
82 }
83 this.originalText = original.text;
84 } else {
85@@ -334,7 +348,7 @@ var Email = Class.create({
86 else if (this.action == "reply" || this.action == "replyAll") {
87 Message.setReplied(this.id, true);
88 // No SmartReply in version 1.0
89- //params.replyMessage = this.id;
90+ params.replyMessage = this.id;
91 }
92
93 // Quick strip: replace <br> and <p> with newline and then strip all html tags
94@@ -367,8 +381,8 @@ Email.getPriorityClass = function(priority) {
95 return priority;
96 }
97
98-Email.kSignaturePlaceholder = "<span style='font-family:Prelude, Verdana, san-serif;'><br><br></span><span id='signature'></span>";
99-Email.kReplyForwardSetupElems = "<br><br>" + Email.kSignaturePlaceholder + "<span style='color:navy; font-family:Prelude, Verdana, san-serif; '><hr align='left' style='width:75%'/>";
100+Email.kSignaturePlaceholder = "<span style='font-family:Prelude, Calibri, san-serif; font-size:15px; color: #1F497D;'><br><br></span><span id='signature'></span>";
101+Email.kReplyForwardSetupElems = "<span style='font-family:Prelude, Calibri, san-serif; font-size:15px'>" + Email.kSignaturePlaceholder + "<hr align='left' style='width:75%'/>";
102
103 Email.kSubjectPrefixRe = $L("Re: ");
104 Email.kSubjectPrefixFw = $L("Fw: ");
  
1diff --git a/usr/palm/applications/com.palm.app.phone/app/controllers/activecall-assistant.js b/usr/palm/applications/com.palm.app.phone/app/controllers/activecall-assistant.js
2index c0e08cf..26a69ae 100644
3--- a/usr/palm/applications/com.palm.app.phone/app/controllers/activecall-assistant.js
4+++ b/usr/palm/applications/com.palm.app.phone/app/controllers/activecall-assistant.js
5@@ -130,6 +130,9 @@ var ActivecallAssistant = Class.create({
6 }
7 this.updateCalls(initialCallState);
8
9+//BEGIN PowerButton Patch block 1 of 3
10+ this.powerButtonSubscriptionx =TelephonyCommands.powerButtonSubscribe(true, 'activecall', this.onPowerButtonEventDuringCall.bind(this));
11+//END PowerButton Patch block 1 of 3
12 //start the timer
13 this.timerInterval = this.controller.window.setInterval(this.updateDisplayTimer.bind(this), 1000);
14
15@@ -179,6 +182,28 @@ var ActivecallAssistant = Class.create({
16 event.stopPropagation();
17 }
18 },
19+//BEGIN PowerButton Patch block 2 of 3
20+ onPowerButtonEventDuringCall: function(results) {
21+ if (results&&results.powerKey&&results.powerKey=='released') {
22+ Mojo.Log.error("this.audioActiveProfile: ", this.audioActiveProfile);
23+ if (this.audioActiveProfile !== "phone_back_speaker") {
24+ //First, "tap" each Disconnect Button.
25+ for (i = 0; i < 3; i++) {
26+ if (this.controller.get("disc_button_" + i)) {
27+ //QDLogger.log( "**** disconnecting line:" + i + "****");
28+ Mojo.Event.send(this.controller.get("disc_button_" + i), Mojo.Event.tap);
29+ }
30+ }
31+ //In case the Disconnect Buttons don't work, or there are calls not disconnected, just call the function to disconnect all calls.
32+ //The reason we don't just do this one function is that the screen redraw is not pretty.
33+ //QDLogger.log( "********disconnecting all calls********");
34+ this.eventListener.disconnectAllCalls();
35+ //QDLogger.log( "********finished routine********");
36+ }
37+ }
38+ },
39+
40+//END PowerButton Patch block 2 of 3
41
42 setupDtmfPad: function(index) {
43 this.showDTMF = false;
44@@ -1345,6 +1370,9 @@ break;
45 this.appAssistant.telephonyEventListener.removeCallStateListener(this);
46 this.appAssistant.telephonyEventListener.removeAudioStateListener(this);
47
48+//BEGIN PowerButton Patch block 3 of 3
49+ this.powerButtonSubscriptionx.cancel(); //remove slider listener
50+//END PowerButton Patch block 3 of 3
51 this.appAssistant.activeCallFocused = false;
52
53 if (!this.unloaded) {
  
1diff --git a/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css b/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
2index 0917ee7..f3cac3f 100644
3--- a/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
4+++ b/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
5@@ -15,12 +15,19 @@ body.palm-default {
6
7 #statusbar {
8 height: 28px;
9+ background: url(/media/internal/scrims/statusbar-scrim.png) 0 0 fixed;
10 background-color: black;
11 border: none;
12 margin: 0px;
13 width: 100%;
14 padding: 0;
15 }
16+body.wallpaper, body.palm-default {
17+background: url(/media/internal/scrims/statusbar-scrim.png) 0 0 fixed;
18+background-color: #404040;
19+-webkit-background-size: 100% 100%;
20+color: white;
21+}
22
23 .status-bar {
24 color: #fff;