Updates for my patches
[webos-internals:modifications.git] / advanced / advanced-system-menus-framework-vzw.patch
1 --- .orig/etc/palm/persistentWindows.conf
2 +++ /etc/palm/persistentWindows.conf
3 @@ -1,6 +1,8 @@
4  {
5                 "com.palm.systemui": [
6 -                       "DeviceMenu"
7 +                       "DeviceMenu",
8 +                       "TodayMenu",
9 +                       "StatusMenu"
10                 ],
11  
12                 "com.palm.app.phone": [
13 --- .orig/usr/palm/frameworks/mojo/submissions/367/stylesheets/global-menus.css
14 +++ /usr/palm/frameworks/mojo/submissions/367/stylesheets/global-menus.css
15 @@ -626,9 +626,11 @@
16    padding-top: 28px;
17  }
18  
19 -/* Application and Device Menus */
20 +/* Status, Today, Device and Application Menus */
21  
22  #palm-app-menu.palm-popup-container,
23 +#palm-status-menu.palm-popup-container,
24 +#palm-today-menu.palm-popup-container,
25  #palm-device-menu.palm-popup-container {
26    font-family: "Prelude" !important;
27    text-align: left !important;
28 @@ -648,6 +650,8 @@
29  }
30  
31  #palm-app-menu.palm-popup-container.palm-touch-rows-7,
32 +#palm-status-menu.palm-popup-container.palm-touch-rows-7,
33 +#palm-today-menu.palm-popup-container.palm-touch-rows-7,
34  #palm-device-menu.palm-popup-container.palm-touch-rows-7 {
35    -webkit-border-image: url(../images/system-menu-background-solid.png) 30 28 35 28 repeat repeat;
36  }
37 @@ -655,24 +659,48 @@
38  #palm-app-menu.palm-popup-container {
39    top: -2px;
40    left: -6px;
41 -  min-width: 278px;
42 +  min-width: 306px;
43 +  max-width: 306px;
44 +  max-height: 413px;
45 +}
46 +
47 +#palm-status-menu.palm-popup-container {
48 +  top: -2px;
49 +  left: -6px;
50 +  min-width: 306px;
51 +  max-width: 306px;
52 +  max-height: 413px;
53 +}
54 +
55 +#palm-today-menu.palm-popup-container {
56 +  top: -2px;
57 +  left: 8px;
58 +  min-width: 306px;
59 +  max-width: 306px;
60    max-height: 413px;
61  }
62  
63  #palm-device-menu.palm-popup-container {
64    top: -2px;
65    right: -6px;
66 -  min-width: 278px;
67 +  min-width: 306px;
68 +  max-width: 306px;
69    max-height: 413px;
70  }
71  
72  #palm-app-menu > .palm-popup-wrapper,
73 +#palm-status-menu > .palm-popup-wrapper,
74 +#palm-today-menu > .palm-popup-wrapper,
75  #palm-device-menu > .palm-popup-wrapper {
76    margin: -58px -21px -48px -52px;
77  }
78  
79  #palm-app-menu .palm-popup-fade-top,
80  #palm-app-menu .palm-popup-fade-bottom,
81 +#palm-status-menu .palm-popup-fade-top,
82 +#palm-status-menu .palm-popup-fade-bottom,
83 +#palm-today-menu .palm-popup-fade-top,
84 +#palm-today-menu .palm-popup-fade-bottom,
85  #palm-device-menu .palm-popup-fade-top,
86  #palm-device-menu .palm-popup-fade-bottom {
87    margin-right: 9px;
88 @@ -687,6 +715,25 @@
89    left: -32px;
90    bottom: -24px;
91  }
92 +
93 +#palm-status-menu .palm-popup-fade-top {
94 +  left: -32px;
95 +  top: -27px;
96 +}
97 +#palm-status-menu .palm-popup-fade-bottom {
98 +  left: -32px;
99 +  bottom: -24px;
100 +}
101 +
102 +#palm-today-menu .palm-popup-fade-top {
103 +  left: -32px;
104 +  top: -27px;
105 +}
106 +#palm-today-menu .palm-popup-fade-bottom {
107 +  left: -32px;
108 +  bottom: -24px;
109 +}
110 +
111  #palm-device-menu .palm-popup-fade-top {
112    left: -33px;
113    top: -27px;
114 @@ -698,50 +745,72 @@
115  
116  
117  #palm-app-menu .palm-popup-fade-top > .fade-background,
118 +#palm-status-menu .palm-popup-fade-top > .fade-background,
119 +#palm-today-menu .palm-popup-fade-top > .fade-background,
120  #palm-device-menu .palm-popup-fade-top > .fade-background {
121    -webkit-border-image: url(../images/system-menu-fade-top.png) 0 24 0 24 repeat repeat;
122  }
123  #palm-app-menu .palm-popup-fade-top > .fade-arrow,
124 +#palm-status-menu .palm-popup-fade-top > .fade-arrow,
125 +#palm-today-menu .palm-popup-fade-top > .fade-arrow,
126  #palm-device-menu .palm-popup-fade-top > .fade-arrow {
127    background: url(../images/palm-popup-fade-arrow-up-dark.png) center center no-repeat;
128  }
129  #palm-app-menu .palm-popup-fade-bottom > .fade-background,
130 +#palm-status-menu .palm-popup-fade-bottom > .fade-background,
131 +#palm-today-menu .palm-popup-fade-bottom > .fade-background,
132  #palm-device-menu .palm-popup-fade-bottom > .fade-background {
133    -webkit-border-image: url(../images/system-menu-fade-bottom.png) 0 24 0 24 repeat repeat;
134  }
135  #palm-app-menu .palm-popup-fade-bottom > .fade-arrow,
136 +#palm-status-menu .palm-popup-fade-bottom > .fade-arrow,
137 +#palm-today-menu .palm-popup-fade-bottom > .fade-arrow,
138  #palm-device-menu .palm-popup-fade-bottom > .fade-arrow {
139    background: url(../images/palm-popup-fade-arrow-down-dark.png) center center no-repeat;
140  }
141  
142  #palm-app-menu.palm-touch-rows-7 .palm-popup-fade-top > .fade-background,
143 +#palm-status-menu.palm-touch-rows-7 .palm-popup-fade-top > .fade-background,
144 +#palm-today-menu.palm-touch-rows-7 .palm-popup-fade-top > .fade-background,
145  #palm-device-menu.palm-touch-rows-7 .palm-popup-fade-top > .fade-background {
146    -webkit-border-image: url(../images/system-menu-fade-top-solid.png) 0 24 0 24 repeat repeat;
147  }
148  #palm-app-menu.palm-touch-rows-7 .palm-popup-fade-bottom > .fade-background,
149 +#palm-status-menu.palm-touch-rows-7 .palm-popup-fade-bottom > .fade-background,
150 +#palm-today-menu.palm-touch-rows-7 .palm-popup-fade-bottom > .fade-background,
151  #palm-device-menu.palm-touch-rows-7 .palm-popup-fade-bottom > .fade-background {
152    -webkit-border-image: url(../images/system-menu-fade-bottom-solid.png) 0 24 0 24 repeat repeat;
153  }
154  
155  #palm-app-menu .palm-popup-content,
156 +#palm-status-menu .palm-popup-content,
157 +#palm-today-menu .palm-popup-content,
158  #palm-device-menu .palm-popup-content {
159    margin: 31px 0 26px 31px;
160  }
161  
162  #palm-app-menu .palm-row,
163 +#palm-status-menu .palm-row,
164 +#palm-today-menu .palm-row,
165  #palm-device-menu .palm-row {
166    background: url(../images/list-separator-dark-taper.png) bottom left no-repeat;
167  }
168  
169  #palm-app-menu .palm-row.single,
170 +#palm-status-menu .palm-row.single,
171 +#palm-today-menu .palm-row.single,
172  #palm-device-menu .palm-row.single,
173  #palm-app-menu .palm-row.last,
174 +#palm-status-menu .palm-row.last,
175 +#palm-today-menu .palm-row.last,
176  #palm-device-menu .palm-row.last {
177    background: none;
178    -webkit-border-image: none;
179  }
180  
181  #palm-app-menu .label,
182 +#palm-status-menu .label,
183 +#palm-today-menu .label,
184  #palm-device-menu .label {
185    color: #AAA;
186    text-shadow: #333 0 -1px 0;
187 @@ -760,14 +829,20 @@
188  }
189  
190  #palm-app-menu .palm-row.selected,
191 +#palm-status-menu .palm-row.selected,
192 +#palm-today-menu .palm-row.selected,
193  #palm-device-menu .palm-row.selected,
194  #palm-app-menu .palm-row.selected.submenu-group,
195 +#palm-status-menu .palm-row.selected.submenu-group,
196 +#palm-today-menu .palm-row.selected.submenu-group,
197  #palm-device-menu .palm-row.selected.submenu-group {
198    background: none;
199    -webkit-border-image: url(../images/system-menu-selection-gradient-default.png) 24 20 24 20 repeat repeat;
200  }
201  
202  #palm-app-menu .palm-popup-content > .palm-list > .menu-start.selected,
203 +#palm-status-menu .palm-popup-content > .palm-list > .menu-start.selected,
204 +#palm-today-menu .palm-popup-content > .palm-list > .menu-start.selected,
205  #palm-device-menu .palm-popup-content > .palm-list > .menu-start.selected,
206  #palm-app-menu .palm-row.first.selected.submenu-group {
207    background: none;
208 @@ -775,18 +850,24 @@
209  }
210  
211  #palm-app-menu .palm-popup-content > .palm-list > .menu-end.selected,
212 +#palm-status-menu .palm-popup-content > .palm-list > .menu-end.selected,
213 +#palm-today-menu .palm-popup-content > .palm-list > .menu-end.selected,
214  #palm-device-menu .palm-popup-content > .palm-list > .menu-end.selected {
215    background: none;
216    -webkit-border-image: url(../images/system-menu-selection-gradient-last.png) 24 20 24 20 repeat repeat;
217  }
218  
219  #palm-app-menu .palm-row.submenu-group,
220 +#palm-status-menu .palm-row.submenu-group,
221 +#palm-today-menu .palm-row.submenu-group,
222  #palm-device-menu .palm-row.submenu-group {
223    -webkit-border-image: none;
224    background: url(../images/system-menu-section-divider.png) bottom left no-repeat;
225  }
226  
227  #palm-app-menu .palm-drawer-container,
228 +#palm-status-menu .palm-drawer-container,
229 +#palm-today-menu .palm-drawer-container,
230  #palm-device-menu .palm-drawer-container {
231    position: relative;
232    top: 0px;
233 @@ -797,6 +878,8 @@
234  }
235  
236  #palm-app-menu .palm-drawer-contents,
237 +#palm-status-menu .palm-drawer-contents,
238 +#palm-today-menu .palm-drawer-contents,
239  #palm-device-menu .palm-drawer-contents {
240    margin: 0;
241    position: relative;
242 @@ -804,16 +887,22 @@
243  }
244  
245  #palm-app-menu .palm-drawer-contents .palm-row .title,
246 +#palm-status-menu .palm-drawer-contents .palm-row .title,
247 +#palm-today-menu .palm-drawer-contents .palm-row .title,
248  #palm-device-menu .palm-drawer-contents .palm-row .title {
249    margin-left: 14px;
250  }
251  
252  #palm-app-menu .palm-row .title.dim,
253 +#palm-status-menu .palm-row .title.dim,
254 +#palm-today-menu .palm-row .title.dim,
255  #palm-device-menu .palm-row .title.dim {
256    color: #BBB;
257  }
258  
259  #palm-app-menu .palm-drawer-contents .palm-row .label,
260 +#palm-status-menu .palm-drawer-contents .palm-row .label,
261 +#palm-today-menu .palm-drawer-contents .palm-row .label,
262  #palm-device-menu .palm-drawer-contents .palm-row .label {
263    margin-right: 24px;
264  }
265 --- .orig/usr/palm/frameworks/mojo2/submissions/98/stylesheets/global-menus.css
266 +++ /usr/palm/frameworks/mojo2/submissions/98/stylesheets/global-menus.css
267 @@ -626,9 +626,11 @@
268    padding-top: 28px;
269  }
270  
271 -/* Application and Device Menus */
272 +/* Status, Today, Device and Application Menus */
273  
274  #palm-app-menu.palm-popup-container,
275 +#palm-status-menu.palm-popup-container,
276 +#palm-today-menu.palm-popup-container,
277  #palm-device-menu.palm-popup-container {
278    font-family: "Prelude" !important;
279    text-align: left !important;
280 @@ -648,6 +650,8 @@
281  }
282  
283  #palm-app-menu.palm-popup-container.palm-touch-rows-7,
284 +#palm-status-menu.palm-popup-container.palm-touch-rows-7,
285 +#palm-today-menu.palm-popup-container.palm-touch-rows-7,
286  #palm-device-menu.palm-popup-container.palm-touch-rows-7 {
287    -webkit-border-image: url(../images/system-menu-background-solid.png) 30 28 35 28 repeat repeat;
288  }
289 @@ -655,24 +659,48 @@
290  #palm-app-menu.palm-popup-container {
291    top: -2px;
292    left: -6px;
293 -  min-width: 278px;
294 +  min-width: 306px;
295 +  max-width: 306px;
296 +  max-height: 413px;
297 +}
298 +
299 +#palm-status-menu.palm-popup-container {
300 +  top: -2px;
301 +  left: -6px;
302 +  min-width: 306px;
303 +  max-width: 306px;
304 +  max-height: 413px;
305 +}
306 +
307 +#palm-today-menu.palm-popup-container {
308 +  top: -2px;
309 +  left: 8px;
310 +  min-width: 306px;
311 +  max-width: 306px;
312    max-height: 413px;
313  }
314  
315  #palm-device-menu.palm-popup-container {
316    top: -2px;
317    right: -6px;
318 -  min-width: 278px;
319 +  min-width: 306px;
320 +  max-width: 306px;
321    max-height: 413px;
322  }
323  
324  #palm-app-menu > .palm-popup-wrapper,
325 +#palm-status-menu > .palm-popup-wrapper,
326 +#palm-today-menu > .palm-popup-wrapper,
327  #palm-device-menu > .palm-popup-wrapper {
328    margin: -58px -21px -48px -52px;
329  }
330  
331  #palm-app-menu .palm-popup-fade-top,
332  #palm-app-menu .palm-popup-fade-bottom,
333 +#palm-status-menu .palm-popup-fade-top,
334 +#palm-status-menu .palm-popup-fade-bottom,
335 +#palm-today-menu .palm-popup-fade-top,
336 +#palm-today-menu .palm-popup-fade-bottom,
337  #palm-device-menu .palm-popup-fade-top,
338  #palm-device-menu .palm-popup-fade-bottom {
339    margin-right: 9px;
340 @@ -687,6 +715,22 @@
341    left: -32px;
342    bottom: -24px;
343  }
344 +#palm-status-menu .palm-popup-fade-top {
345 +  left: -32px;
346 +  top: -27px;
347 +}
348 +#palm-status-menu .palm-popup-fade-bottom {
349 +  left: -32px;
350 +  bottom: -24px;
351 +}
352 +#palm-today-menu .palm-popup-fade-top {
353 +  left: -32px;
354 +  top: -27px;
355 +}
356 +#palm-today-menu .palm-popup-fade-bottom {
357 +  left: -32px;
358 +  bottom: -24px;
359 +}
360  #palm-device-menu .palm-popup-fade-top {
361    left: -33px;
362    top: -27px;
363 @@ -698,50 +742,72 @@
364  
365  
366  #palm-app-menu .palm-popup-fade-top > .fade-background,
367 +#palm-status-menu .palm-popup-fade-top > .fade-background,
368 +#palm-today-menu .palm-popup-fade-top > .fade-background,
369  #palm-device-menu .palm-popup-fade-top > .fade-background {
370    -webkit-border-image: url(../images/system-menu-fade-top.png) 0 24 0 24 repeat repeat;
371  }
372  #palm-app-menu .palm-popup-fade-top > .fade-arrow,
373 +#palm-status-menu .palm-popup-fade-top > .fade-arrow,
374 +#palm-today-menu .palm-popup-fade-top > .fade-arrow,
375  #palm-device-menu .palm-popup-fade-top > .fade-arrow {
376    background: url(../images/palm-popup-fade-arrow-up-dark.png) center center no-repeat;
377  }
378  #palm-app-menu .palm-popup-fade-bottom > .fade-background,
379 +#palm-status-menu .palm-popup-fade-bottom > .fade-background,
380 +#palm-today-menu .palm-popup-fade-bottom > .fade-background,
381  #palm-device-menu .palm-popup-fade-bottom > .fade-background {
382    -webkit-border-image: url(../images/system-menu-fade-bottom.png) 0 24 0 24 repeat repeat;
383  }
384  #palm-app-menu .palm-popup-fade-bottom > .fade-arrow,
385 +#palm-status-menu .palm-popup-fade-bottom > .fade-arrow,
386 +#palm-today-menu .palm-popup-fade-bottom > .fade-arrow,
387  #palm-device-menu .palm-popup-fade-bottom > .fade-arrow {
388    background: url(../images/palm-popup-fade-arrow-down-dark.png) center center no-repeat;
389  }
390  
391  #palm-app-menu.palm-touch-rows-7 .palm-popup-fade-top > .fade-background,
392 +#palm-status-menu.palm-touch-rows-7 .palm-popup-fade-top > .fade-background,
393 +#palm-today-menu.palm-touch-rows-7 .palm-popup-fade-top > .fade-background,
394  #palm-device-menu.palm-touch-rows-7 .palm-popup-fade-top > .fade-background {
395    -webkit-border-image: url(../images/system-menu-fade-top-solid.png) 0 24 0 24 repeat repeat;
396  }
397  #palm-app-menu.palm-touch-rows-7 .palm-popup-fade-bottom > .fade-background,
398 +#palm-status-menu.palm-touch-rows-7 .palm-popup-fade-bottom > .fade-background,
399 +#palm-today-menu.palm-touch-rows-7 .palm-popup-fade-bottom > .fade-background,
400  #palm-device-menu.palm-touch-rows-7 .palm-popup-fade-bottom > .fade-background {
401    -webkit-border-image: url(../images/system-menu-fade-bottom-solid.png) 0 24 0 24 repeat repeat;
402  }
403  
404  #palm-app-menu .palm-popup-content,
405 +#palm-status-menu .palm-popup-content,
406 +#palm-today-menu .palm-popup-content,
407  #palm-device-menu .palm-popup-content {
408    margin: 31px 0 26px 31px;
409  }
410  
411  #palm-app-menu .palm-row,
412 +#palm-status-menu .palm-row,
413 +#palm-today-menu .palm-row,
414  #palm-device-menu .palm-row {
415    background: url(../images/list-separator-dark-taper.png) bottom left no-repeat;
416  }
417  
418  #palm-app-menu .palm-row.single,
419 +#palm-status-menu .palm-row.single,
420 +#palm-today-menu .palm-row.single,
421  #palm-device-menu .palm-row.single,
422  #palm-app-menu .palm-row.last,
423 +#palm-status-menu .palm-row.last,
424 +#palm-today-menu .palm-row.last,
425  #palm-device-menu .palm-row.last {
426    background: none;
427    -webkit-border-image: none;
428  }
429  
430  #palm-app-menu .label,
431 +#palm-status-menu .label,
432 +#palm-today-menu .label,
433  #palm-device-menu .label {
434    color: #AAA;
435    text-shadow: #333 0 -1px 0;
436 @@ -760,14 +826,20 @@
437  }
438  
439  #palm-app-menu .palm-row.selected,
440 +#palm-status-menu .palm-row.selected,
441 +#palm-today-menu .palm-row.selected,
442  #palm-device-menu .palm-row.selected,
443  #palm-app-menu .palm-row.selected.submenu-group,
444 +#palm-status-menu .palm-row.selected.submenu-group,
445 +#palm-today-menu .palm-row.selected.submenu-group,
446  #palm-device-menu .palm-row.selected.submenu-group {
447    background: none;
448    -webkit-border-image: url(../images/system-menu-selection-gradient-default.png) 24 20 24 20 repeat repeat;
449  }
450  
451  #palm-app-menu .palm-popup-content > .palm-list > .menu-start.selected,
452 +#palm-status-menu .palm-popup-content > .palm-list > .menu-start.selected,
453 +#palm-today-menu .palm-popup-content > .palm-list > .menu-start.selected,
454  #palm-device-menu .palm-popup-content > .palm-list > .menu-start.selected,
455  #palm-app-menu .palm-row.first.selected.submenu-group {
456    background: none;
457 @@ -775,24 +847,32 @@
458  }
459  
460  #palm-app-menu .palm-popup-content > .palm-list > .menu-end.selected,
461 +#palm-status-menu .palm-popup-content > .palm-list > .menu-end.selected,
462 +#palm-today-menu .palm-popup-content > .palm-list > .menu-end.selected,
463  #palm-device-menu .palm-popup-content > .palm-list > .menu-end.selected {
464    background: none;
465    -webkit-border-image: url(../images/system-menu-selection-gradient-last.png) 24 20 24 20 repeat repeat;
466  }
467  
468  #palm-app-menu .palm-popup-content > .palm-list > .single.selected,
469 +#palm-status-menu .palm-popup-content > .palm-list > .single.selected,
470 +#palm-today-menu .palm-popup-content > .palm-list > .single.selected,
471  #palm-device-menu .palm-popup-content > .palm-list > .single.selected {
472    background: none;
473    -webkit-border-image: url(../images/system-menu-selection-gradient-single.png) 24 20 24 20 repeat repeat;
474  }
475  
476  #palm-app-menu .palm-row.submenu-group,
477 +#palm-status-menu .palm-row.submenu-group,
478 +#palm-today-menu .palm-row.submenu-group,
479  #palm-device-menu .palm-row.submenu-group {
480    -webkit-border-image: none;
481    background: url(../images/system-menu-section-divider.png) bottom left no-repeat;
482  }
483  
484  #palm-app-menu .palm-drawer-container,
485 +#palm-status-menu .palm-drawer-container,
486 +#palm-today-menu .palm-drawer-container,
487  #palm-device-menu .palm-drawer-container {
488    position: relative;
489    top: 0px;
490 @@ -803,6 +883,8 @@
491  }
492  
493  #palm-app-menu .palm-drawer-contents,
494 +#palm-status-menu .palm-drawer-contents,
495 +#palm-today-menu .palm-drawer-contents,
496  #palm-device-menu .palm-drawer-contents {
497    margin: 0;
498    position: relative;
499 @@ -810,16 +892,22 @@
500  }
501  
502  #palm-app-menu .palm-drawer-contents .palm-row .title,
503 +#palm-status-menu .palm-drawer-contents .palm-row .title,
504 +#palm-today-menu .palm-drawer-contents .palm-row .title,
505  #palm-device-menu .palm-drawer-contents .palm-row .title {
506    margin-left: 14px;
507  }
508  
509  #palm-app-menu .palm-row .title.dim,
510 +#palm-status-menu .palm-row .title.dim,
511 +#palm-today-menu .palm-row .title.dim,
512  #palm-device-menu .palm-row .title.dim {
513    color: #BBB;
514  }
515  
516  #palm-app-menu .palm-drawer-contents .palm-row .label,
517 +#palm-status-menu .palm-drawer-contents .palm-row .label,
518 +#palm-today-menu .palm-drawer-contents .palm-row .label,
519  #palm-device-menu .palm-drawer-contents .palm-row .label {
520    margin-right: 24px;
521  }
522 --- .orig/usr/palm/applications/com.palm.app.screenlock/app/controllers/app-assistant.js
523 +++ /usr/palm/applications/com.palm.app.screenlock/app/controllers/app-assistant.js
524 @@ -6,8 +6,25 @@
525  
526  function StageAssistant(stageController) {
527    this.stageController = stageController
528 -  this.stageController.pushScene('securityconfig')
529  }
530  
531 +StageAssistant.prototype.initialize = function() {
532 +}
533  
534 +StageAssistant.prototype.setup = function() {
535 +       var params = Mojo.getLaunchParameters();
536 +       
537 +       if((params) && (params.mode)) {
538 +               if(params.mode == "none")
539 +                       this.stageController.pushScene('securityconfig', "none");
540 +               else if(params.mode == "pin")
541 +                       this.stageController.pushScene('securityconfig', "pin");
542 +               else if(params.mode == "password")
543 +                       this.stageController.pushScene('securityconfig', "password");
544 +               else
545 +                       this.stageController.pushScene('securityconfig');
546 +       }
547 +       else
548 +               this.stageController.pushScene('securityconfig');
549 +}
550  
551 --- .orig/usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js
552 +++ /usr/palm/applications/com.palm.app.screenlock/app/controllers/securityconfig-assistant.js
553 @@ -1,7 +1,9 @@
554  /* Copyright 2009 Palm, Inc.  All rights reserved. */
555  
556  var SecurityconfigAssistant = Class.create({
557 -       initialize: function() {
558 +       initialize: function(mode) {
559 +               this.mode = mode;
560 +               
561                 this.switchAppOnInfo = $L("Swiping the entire length of the gesture area will switch to the next or previous app.");
562                 this.switchAppOffInfo = $L("Any right to left swipe on the gesture area will perform the back gesture.");
563                 this.newSecurity = '';  
564 @@ -48,6 +50,8 @@
565         },
566                 
567         setup: function(){
568 +               if(this.mode)
569 +                       this.controller.get('main').hide();
570                 
571                 //this.controller.get('fixedtimerrow').hide();
572                         
573 @@ -163,6 +167,27 @@
574                 this.currentSecurity = payload.lockMode || 'none';
575                 this.showModifyRow();
576                 this.revertChanges();
577 +               
578 +               if(this.mode) {
579 +                       for(var i = 0; i < this.availableSecurity.length; i++) {
580 +                               if(this.availableSecurity[i].value == this.mode) {
581 +                                       this.newSecurity = this.mode;   
582 +                                       
583 +                                       if((this.currentSecurity === this.mode) && (this.mode === 'pin'))
584 +                                               this.controller.stageController.pushScene({name: "pin", automaticFocusAdvance: false},"changePin",this);
585 +                                       else if((this.currentSecurity === this.mode) && (this.mode === 'password'))
586 +                                               this.controller.stageController.pushScene({name: "password", automaticFocusAdvance: false},"changePassword",this);
587 +                                       else if(this.currentSecurity === 'none')
588 +                                               this.changeSecureLock(this.mode,false);
589 +                                       else if(this.currentSecurity === 'pin') 
590 +                                               this.askPin();
591 +                                       else if(this.currentSecurity === 'password')
592 +                                               this.askPassword();
593 +                                       
594 +                                       return;
595 +                               }
596 +                       }
597 +               }
598         },
599         
600         handleSystemlockValue: function(payload) {
601 @@ -371,7 +396,7 @@
602                         this.controller.stageController.pushScene({name: "pin", automaticFocusAdvance: false},"changePin",this);
603                 }
604                 else if(this.currentSecurity == 'password') {
605 -                       this.askPassword();
606 +                       this.controller.stageController.pushScene({name: "password", automaticFocusAdvance: false},"changePassword",this);
607                         this.newSecurity = "password";
608                 }                       
609         },
610 @@ -432,16 +457,16 @@
611                 if(pinCorrect)
612                         this.changeSecureLock(this.newSecurity,true);
613                 else {
614 +                       if(this.mode)
615 +                               this.controller.window.close();
616 +
617                         Mojo.Log.info("Pin was wrong");
618                         this.revertChanges();
619                 }
620         },
621         
622         askPassword: function() {
623 -               this.dialogBox = this.controller.showDialog({
624 -                       template: 'template/password-box',                      
625 -                       assistant: new VerifyPasswordAssistant(this,this.systemlockValue),                      
626 -               });
627 +               this.controller.stageController.pushScene({name: "password", automaticFocusAdvance: false},"askPassword",this); 
628         },
629         
630         passwordVerified: function(passwordCorrect) {
631 @@ -449,6 +474,9 @@
632                         this.changeSecureLock(this.newSecurity,false);
633                 }
634                 else {
635 +                       if(this.mode)
636 +                               this.controller.window.close();
637 +                       
638                         Mojo.Log.info("Password was wrong");
639                         this.revertChanges();
640                         
641 @@ -457,23 +485,37 @@
642         
643         changeSecureLock: function(newSetting,setFocus) {
644                 if(newSetting == 'pin') {
645 -                       this.showPINDialogBox();                                
646 +                       if(this.currentSecurity == 'password')
647 +                               this.showPINDialogBox.bind(this).delay(1);
648 +                       else
649 +                               this.showPINDialogBox();                                
650                 }
651                 else if (newSetting == 'password') {
652 -                       this.showPasswordDialogBox(setFocus);                           
653 +                       if(this.currentSecurity == 'pin')
654 +                               this.showPasswordDialogBox.bind(this, setFocus).delay(1);                               
655 +                       else
656 +                               this.showPasswordDialogBox(setFocus);
657                 }
658                 else {
659                         Mojo.Log.info("Security is Off");
660                         this.currentSecurity = 'none';
661                         $('lockImg').hide();
662 -                       this.setSystemlockModeReq = SystemService.setSystemlockValue('none','');
663 +                       this.setSystemlockModeReq = SystemService.setSystemlockValue('none','', this.changedSystemlockValue.bind(this));
664                         this.showModifyRow();
665                 }       
666         },
667         
668 +       changedSystemlockValue: function() {
669 +               if(this.mode)
670 +                       this.controller.window.close();
671 +       },
672 +       
673         setPinCode: function(pincode) {
674                 
675                 if(pincode === '') {
676 +                       if(this.mode)
677 +                               this.controller.window.close();
678 +
679                         Mojo.Log.info("PIN code is Emplty");
680                         this.revertChanges();
681                         return;
682 @@ -483,6 +525,10 @@
683         
684         handleSetPasscodeResponse: function(response) {
685                 Mojo.Log.error("Response "+ Object.toJSON(response));
686 +               
687 +               if(this.mode)
688 +                       this.controller.window.close();
689 +               
690                 if(response.returnValue) {
691                         this.currentSecurity = 'pin';
692                         $('lockImg').show();
693 @@ -494,6 +540,9 @@
694         },
695         
696         pinAlreadySet: function() {
697 +               if(this.mode)
698 +                       this.controller.window.close();
699 +               
700                 this.currentSecurity = 'pin';
701                 $('lockImg').show();
702                 this.policyEnforced = true;
703 @@ -505,6 +554,9 @@
704         },
705         
706         setPassword: function(password) {
707 +               if(this.mode)
708 +                       this.controller.window.close();
709 +
710                 Mojo.Log.info("Entered Password "+ password);
711                 if(password === '') {
712                         Mojo.Log.info("Password is Emplty");
713 @@ -519,6 +571,9 @@
714         },
715         
716         passwordAlreadySet: function(password) {
717 +               if(this.mode)
718 +                       this.controller.window.close();
719 +       
720                 this.currentSecurity = 'password';
721                 this.systemlockValue = password;
722                 this.policyEnforced = true;
723 @@ -528,10 +583,7 @@
724         
725         
726         showPasswordDialogBox: function(setFocus) {             
727 -               this.dialogBox = this.controller.showDialog({
728 -                       template: 'template/security-password-box',
729 -                       assistant: new PasswordAssistant(this,setFocus),                        
730 -               });             
731 +               this.controller.stageController.pushScene({name: "password", automaticFocusAdvance: false},"enterPassword",this,setFocus);      
732         },
733  
734         revertChanges: function() {
735 @@ -679,7 +731,7 @@
736         }
737  });
738  
739 -
740 +/*
741  var VerifyPasswordAssistant = Class.create({
742         
743         initialize: function(sceneAssistant) {
744 @@ -954,5 +1006,5 @@
745                 }
746         }               
747         
748 -});
749 +}); */
750  
751 --- .orig/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
752 +++ /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
753 @@ -18,6 +18,7 @@
754                 
755                 this.bluetoothState = 'Off';
756                 this.wifiState = 'Off'; 
757 +               this.gpsState = 'Off';
758                 this.wifiRadio = false;
759                 this.dualRSSI = false;
760                 this.ruim = false;
761 @@ -25,6 +26,8 @@
762                 this.hideDataIcon = false;
763  
764                 this.appMenuModels = {};
765 +               this.appMenuConfig = null;
766 +               this.appMenuCookie = null;
767                 
768                 Mojo.Dom.get('rssi').className = 'nobars';
769                 Mojo.Dom.get('ev1x').className = 'nobars';
770 @@ -32,15 +35,24 @@
771                 Mojo.Dom.get('datanet').className = 'off';
772                 Mojo.Dom.get('wifi').className = 'off';
773                 Mojo.Dom.get('bluetooth').className = 'off';
774 +               Mojo.Dom.get('gps').className = 'off';
775 +               Mojo.Dom.get('ringer').className = 'off';
776 +               Mojo.Dom.get('devicemenu').className = "";
777                 Mojo.Dom.get('roaming').hide();
778                 Mojo.Dom.get('tty').hide();
779                 Mojo.Dom.get('hac').hide();
780                 Mojo.Dom.get('callforward').hide();
781                 Mojo.Dom.get('vpn').hide();
782 +               Mojo.Dom.get('appmenu').hide();
783  
784                 
785                 this.delayedOpenSearchEngineAvailable = Mojo.Function.debounce(undefined, this.handleOpenSearchEngineAvailable.bind(this), 10, this.controller.window);
786 -               this.showDeviceMenuFn = Mojo.Function.debounce(undefined, this.showDeviceMenu.bind(this), .10, this.controller.window);
787 +               this.showDeviceMenuFn = Mojo.Function.debounce(undefined, this.showDeviceMenu.bind(this, false), .10, this.controller.window);
788 +               this.showTodayMenuFn = Mojo.Function.debounce(undefined, this.showTodayMenu.bind(this, false), .10, this.controller.window);
789 +               this.showStatusMenuFn = Mojo.Function.debounce(undefined, this.showStatusMenu.bind(this, false), .10, this.controller.window);
790 +               this.editDeviceMenuFn = Mojo.Function.debounce(undefined, this.showDeviceMenu.bind(this, true), .10, this.controller.window);
791 +               this.editTodayMenuFn = Mojo.Function.debounce(undefined, this.showTodayMenu.bind(this, true), .10, this.controller.window);
792 +               this.editStatusMenuFn = Mojo.Function.debounce(undefined, this.showStatusMenu.bind(this, true), .10, this.controller.window);
793                 
794                 this.uiAlertsMethods["subscribeToBackupStatus"] = this.handleBackupStatusNotifications.bind(this);
795                 this.uiAlertsMethods["registerForLocationServiceNotifications"] = this.handleLocationServiceNotifications.bind(this);
796 @@ -57,9 +69,9 @@
797         
798                 this.getBuildName();
799                 
800 -               //Create the Device Menu Window. But do not do this if this is a frist use run.
801 +               //Create the System Menu Windows. But do not do this if this is a frist use run.
802                 if(!PalmSystem.isMinimal){
803 -                       this.showDeviceMenu();
804 +                       this.initSystemMenus();
805                 }       
806                                                 
807                 // Initialize the Battery Power Nofication and get the initial value
808 @@ -74,6 +86,9 @@
809                 //Get the Carrier Name by querying the Carrier DB
810                 this.getCarrierName();
811                 
812 +               // Initialize the Gps icon once the service is running
813 +               this.initOnServerStart("com.palm.location", this.gpsInit.bind(this), this.gpsDeinit.bind(this));
814 +               
815                 // Initialize the Bluetooth icon once the service is running
816                 this.initOnServerStart("com.palm.btmonitor", this.btMonitorInit.bind(this), this.btMonitorDeinit.bind(this));
817                 this.initOnServerStart("com.palm.bluetooth", this.btInit.bind(this), this.btDeInit.bind(this));
818 @@ -106,6 +121,9 @@
819                 //Subscribe to Powerd Notification.
820                 this.powerInit();
821                 
822 +               //Subscribe for Ringer Switch Status
823 +               this.ringerSwitchInit();
824 +
825                 //Subscribe to Application Manager 
826                 this.initOnServerStart("com.palm.applicationManager", this.appMgrInit.bind(this));
827                 
828 @@ -120,10 +138,58 @@
829  
830                 // Subscribe to mojodb
831                 this.initOnServerStart("com.palm.db", this.dbServiceInit.bind(this));
832 +
833 +               this.batteryIconMode = "icon";
834 +               this.batteryIconClass = "";
835 +               this.powerIconClass = "";
836 +               
837 +               this.getTweaksPrefs = new Mojo.Service.Request("palm://org.webosinternals.tweaks.prefs/", {
838 +                       method: 'get', parameters: {'owner': "org.webosinternals.patches.advanced-system-menus-framework", 
839 +                       keys: ["batteryIconMode","showGPSIcon","showRingerIcon","showRoamingIcon"]}, 
840 +                       onSuccess: function(response) {
841 +                               if(response) {
842 +                                       if(response.batteryIconMode != undefined) {
843 +                                               this.batteryIconMode = response.batteryIconMode;
844 +
845 +                                               if(this.batteryIconMode == "value") {
846 +                                                       Mojo.Dom.get('power').style.display = "none";
847 +                                                       Mojo.Dom.get('battery').style.display = "block";
848 +                                               }
849 +                                               else if(this.batteryIconMode == "iconvalue") {
850 +                                                       Mojo.Dom.get('battery').style.display = "block";
851 +                                                       Mojo.Dom.get('battery').className = "small";
852 +                                                       this.batteryIconClass = "small ";
853 +                                                       this.powerIconClass = "rotated ";
854 +                                               }
855 +                                       }
856 +                                       if(response.showGPSIcon == false)
857 +                                               Mojo.Dom.get('gps').style.display = 'none';
858 +                                       if(response.showRingerIcon == false)
859 +                                               Mojo.Dom.get('ringer').style.display = 'none';
860 +                                       if(response.showRoamingIcon == false)                                                                           
861 +                                               Mojo.Dom.get('roaming').style.display = 'none';
862 +                               }
863 +                       }.bind(this)});
864 +               
865 +               this.appMenuCookie = new Mojo.Model.Cookie("appMenu");
866 +               
867 +               this.appMenuConfig = this.appMenuCookie.get();
868 +
869 +               if(!this.appMenuConfig)
870 +                       this.appMenuConfig = {fullwidth: true};
871 +
872 +               if(this.appMenuConfig.fullwidth)
873 +                       Mojo.Dom.get('appmenu').className = "fullwidth";
874                                 
875 -               Mojo.Event.listen(Mojo.Dom.get('appmenu'),'mojo-tap', this.appMenuHandleTap.bindAsEventListener(this));
876 -               Mojo.Event.listen(Mojo.Dom.get('devicemenu'),'mojo-tap', this.deviceMenuHandleTap.bindAsEventListener(this));
877 -                                               
878 +               Mojo.Event.listen(Mojo.Dom.get('appmenu'),'mojo-tap', this.appMenuHandleTap.bindAsEventListener(this, false));
879 +               Mojo.Event.listen(Mojo.Dom.get('appmenu'),'mojo-hold', this.appMenuHandleTap.bindAsEventListener(this, true));
880 +               Mojo.Event.listen(Mojo.Dom.get('devicemenu'),'mojo-tap', this.deviceMenuHandleTap.bindAsEventListener(this, false));
881 +               Mojo.Event.listen(Mojo.Dom.get('devicemenu'),'mojo-hold', this.deviceMenuHandleTap.bindAsEventListener(this, true));
882 +               Mojo.Event.listen(Mojo.Dom.get('todaymenu'),'mojo-tap', this.todayMenuHandleTap.bindAsEventListener(this, false));
883 +               Mojo.Event.listen(Mojo.Dom.get('todaymenu'),'mojo-hold', this.todayMenuHandleTap.bindAsEventListener(this, true));
884 +               Mojo.Event.listen(Mojo.Dom.get('statusmenu'),'mojo-tap', this.statusMenuHandleTap.bindAsEventListener(this, false));
885 +               Mojo.Event.listen(Mojo.Dom.get('statusmenu'),'mojo-hold', this.statusMenuHandleTap.bindAsEventListener(this, true));
886 +                                                               
887                 this.registerForeGroundApp();
888                 this.registerStatusSettings();  
889                 
890 @@ -329,8 +395,9 @@
891         //If it is First Use, Do not change the App Name.
892         if(PalmSystem.isMinimal) {
893                 this.foregroundAppID = payload.id;
894 -               Mojo.Dom.get('appname').hide();
895 +               Mojo.Dom.get('appmenu').hide();
896                 Mojo.Dom.get('carrier').show();
897 +               Mojo.Dom.get('devicemenu').className = "";
898                 return;
899         }
900         
901 @@ -363,7 +430,8 @@
902                 
903                 if (!this.deviceLocked) {
904                         Mojo.Dom.get('carrier').hide();
905 -                       Mojo.Dom.get('appname').show();
906 +                       Mojo.Dom.get('appmenu').show();
907 +                       Mojo.Dom.get('devicemenu').className = "devicemenu-appmenu";
908                 }
909                 this.foregroundAppID = payload.id;
910                 
911 @@ -372,8 +440,9 @@
912                         this.closeTutorialDashboard();
913         }
914         else{
915 -               Mojo.Dom.get('appname').hide();
916 +               Mojo.Dom.get('appmenu').hide();
917                 Mojo.Dom.get('carrier').show();
918 +               Mojo.Dom.get('devicemenu').className = "";
919                 this.foregroundAppID=null;
920         }
921  },
922 @@ -460,11 +529,13 @@
923                 }
924                 if (payload.locked || this.foregroundAppID == null) {
925                         Mojo.Dom.get('carrier').show();
926 -                       Mojo.Dom.get('appname').hide();
927 +                       Mojo.Dom.get('appmenu').hide();
928 +                       Mojo.Dom.get('devicemenu').className = "";
929                 }
930                 else {
931                         Mojo.Dom.get('carrier').hide();
932 -                       Mojo.Dom.get('appname').show();
933 +                       Mojo.Dom.get('appmenu').show();
934 +                       Mojo.Dom.get('devicemenu').className = "devicemenu-appmenu";
935                 }
936         }       
937         
938 @@ -490,11 +561,30 @@
939         return false;
940  },
941  
942 -appMenuHandleTap: function(event) { //make service call here to show app's menu
943 +appMenuHandleTap: function(event, toggle) { //make service call here to show app's menu
944         //No App Menu for FirstUse.
945         if(PalmSystem.isMinimal)
946                 return;
947  
948 +       if(toggle) {
949 +               event.stop();
950 +       
951 +               if(this.appMenuConfig.fullwidth) {
952 +                       this.appMenuConfig.fullwidth = false;
953 +               
954 +                       Mojo.Dom.get('appmenu').className = "";
955 +               }
956 +               else{
957 +                       this.appMenuConfig.fullwidth = true;
958 +               
959 +                       Mojo.Dom.get('appmenu').className = "fullwidth";
960 +               }
961 +               
962 +               this.appMenuCookie.put(this.appMenuConfig);
963 +               
964 +               return;
965 +       }
966 +
967         var appMenuModel = this.appMenuModels[this.foregroundAppID];
968         var target = event.target;
969         while(target) {
970 @@ -537,7 +627,136 @@
971         }
972  },
973  
974 -deviceMenuHandleTap: function(event){//show/hide devicemenu
975 +// System menus
976 +
977 +initSystemMenus: function() {
978 +       this.showStatusMenu();
979 +       this.showTodayMenu();
980 +       this.showDeviceMenu();
981 +},
982 +
983 +closeSystemMenus: function(skip) {
984 +       if(skip != "status") {
985 +               var statusStageController = Mojo.Controller.getAppController().getStageController("StatusMenu");
986 +               
987 +               if(statusStageController)
988 +                       statusStageController.delegateToSceneAssistant("close");
989 +       }
990 +
991 +       if(skip != "today") {
992 +               var todayStageController = Mojo.Controller.getAppController().getStageController("TodayMenu");
993 +               
994 +               if(todayStageController)
995 +                       todayStageController.delegateToSceneAssistant("close");
996 +       }
997 +       
998 +       if(skip != "device") {
999 +               var deviceStageController = Mojo.Controller.getAppController().getStageController("DeviceMenu");
1000 +               
1001 +               if(deviceStageController)
1002 +                       deviceStageController.delegateToSceneAssistant("close");
1003 +       }
1004 +},
1005 +
1006 +// Status menu
1007 +
1008 +statusMenuHandleTap: function(event, edit) { //show/hide statusmenu
1009 +       // Ignore the notification if it's in First Use.
1010 +       
1011 +       if(edit)
1012 +               event.stop();
1013 +       
1014 +       if(PalmSystem.isMinimal)
1015 +               return;
1016 +       
1017 +       var target = event.target;
1018 +       var i = 0;
1019 +       var level = 2;
1020 +       
1021 +       while((target.getAttribute('id') != 'statusmenu') && (i < level)) {
1022 +               target = target.up();
1023 +               i++;
1024 +       }
1025 +       
1026 +       if(target) {
1027 +               if(target.getAttribute('id') == 'statusmenu') {
1028 +                       if((edit) || ((event.up) && (event.up.altKey)))
1029 +                               this.editStatusMenuFn();
1030 +                       else
1031 +                               this.showStatusMenuFn();
1032 +               }
1033 +       }
1034 +},
1035 +
1036 +showStatusMenu: function(edit) {
1037 +       var stageController = Mojo.Controller.getAppController().getStageController("StatusMenu");
1038 +       if (stageController) {
1039 +               this.closeSystemMenus("status");
1040 +               
1041 +               stageController.delegateToSceneAssistant("toggleStatusMenu", edit);
1042 +       } else {
1043 +               this.statusMenuCreatedHandler = this.statusMenuCreated.bind(this);
1044 +               Mojo.Controller.getAppController().createStageWithCallback({name:"StatusMenu",lightweight: true}, 
1045 +                       this.statusMenuCreatedHandler, "menu");
1046 +       }
1047 +},
1048 +
1049 +statusMenuCreated: function(stageController) {
1050 +       stageController.pushScene('statusmenu',this);
1051 +},
1052 +
1053 +// Today menu
1054 +
1055 +todayMenuHandleTap: function(event, edit) { //show/hide todaymenu
1056 +       //Ignore the notification if it's in First Use.
1057 +       
1058 +       if(edit)
1059 +               event.stop();
1060 +       
1061 +       if(PalmSystem.isMinimal)
1062 +               return;
1063 +       
1064 +       var target = event.target;
1065 +       var i = 0;
1066 +       var level = 2;
1067 +       
1068 +       while((target.getAttribute('id') != 'todaymenu') && (i < level)) {
1069 +               target = target.up();
1070 +               i++;
1071 +       }
1072 +       
1073 +       if(target) {
1074 +               if(target.getAttribute('id') == 'todaymenu') {
1075 +                       if((edit) || ((event.up) && (event.up.altKey)))
1076 +                               this.editTodayMenuFn();
1077 +                       else
1078 +                               this.showTodayMenuFn();
1079 +               }                       
1080 +       }
1081 +},
1082 +
1083 +showTodayMenu: function(edit) {
1084 +       var stageController = Mojo.Controller.getAppController().getStageController("TodayMenu");
1085 +       if (stageController) {
1086 +               this.closeSystemMenus("today");
1087 +               
1088 +               stageController.delegateToSceneAssistant("toggleTodayMenu", edit);
1089 +       } else {
1090 +               this.todayMenuCreatedHandler = this.todayMenuCreated.bind(this);
1091 +               Mojo.Controller.getAppController().createStageWithCallback({name:"TodayMenu",lightweight: true}, 
1092 +                       this.todayMenuCreatedHandler, "menu");
1093 +       }
1094 +},
1095 +
1096 +todayMenuCreated: function(stageController) {
1097 +       stageController.pushScene('todaymenu',this);
1098 +},
1099 +
1100 +// Device menu
1101 +
1102 +deviceMenuHandleTap: function(event, edit){//show/hide devicemenu
1103 +       if(edit)
1104 +               event.stop();
1105         
1106         //Ignore the notification if it's in First Use.
1107         if(PalmSystem.isMinimal)
1108 @@ -554,16 +773,21 @@
1109                 i++;
1110         }
1111         if (target) {
1112 -               if(target.getAttribute('id') == 'devicemenu'){//show/hide deviceMenu
1113 -                       this.showDeviceMenuFn();
1114 +               if(target.getAttribute('id') == 'devicemenu') {
1115 +                       if((edit) || ((event.up) && (event.up.altKey)))
1116 +                               this.editDeviceMenuFn();
1117 +                       else
1118 +                               this.showDeviceMenuFn();
1119                 }
1120         }
1121  },
1122  
1123 -showDeviceMenu: function() {
1124 +showDeviceMenu: function(edit) {
1125                 var stageController = Mojo.Controller.getAppController().getStageController("DeviceMenu");
1126                 if (stageController) {
1127 -                       stageController.delegateToSceneAssistant("toggleDeviceMenu");
1128 +                       this.closeSystemMenus("device");
1129 +                       
1130 +                       stageController.delegateToSceneAssistant("toggleDeviceMenu", edit);                     
1131                 } else {
1132                         this.deviceMenuCreatedHandler = this.deviceMenuCreated.bind(this);
1133                         Mojo.Controller.getAppController().createStageWithCallback({
1134 @@ -701,6 +925,13 @@
1135                                 this.callForwardNotificationSession = null;     
1136                         }
1137                 }
1138 +               
1139 +               var stageController = Mojo.Controller.getAppController().getStageController("DeviceMenu");
1140 +               
1141 +               if (stageController) {
1142 +                       stageController.delegateToSceneAssistant("updatePhoneState");
1143 +               }
1144 +               
1145                 this.updatePhoneAppName();
1146         }
1147  },
1148 @@ -835,6 +1066,13 @@
1149                         Mojo.Dom.get('roaming').hide();
1150                         break;                  
1151         }
1152 +       
1153 +       var stageController = Mojo.Controller.getAppController().getStageController("DeviceMenu");
1154 +               
1155 +       if (stageController) {
1156 +               stageController.delegateToSceneAssistant("updatePhoneState");
1157 +       }
1158 +       
1159         this.updatePhoneAppName();
1160         this.handleNetworkStatus.cancel();
1161  },
1162 @@ -901,7 +1139,12 @@
1163                         this.updatePhoneAppName();
1164                         break;
1165         }       
1166 -       
1167 +
1168 +       var stageController = Mojo.Controller.getAppController().getStageController("DeviceMenu");
1169 +               
1170 +       if (stageController) {
1171 +               stageController.delegateToSceneAssistant("updatePhoneState");
1172 +       }       
1173  },
1174  
1175  handleSignalStrengthQueryNotification: function(payload) {
1176 @@ -1426,8 +1669,14 @@
1177                                 this.createUSBDashboard();
1178                         }
1179                 }               
1180 -               
1181         }
1182 +
1183 +       var stageController = Mojo.Controller.getAppController().getStageController("DeviceMenu");
1184 +       
1185 +       if (stageController) {
1186 +               stageController.delegateToSceneAssistant("updatePhoneState");
1187 +       }
1188 +
1189         this.updatePhoneAppName();
1190  },
1191  
1192 @@ -1825,6 +2074,51 @@
1193  },
1194  
1195  /*
1196 +* Initialize GPS status on device menu
1197 +*/
1198 +
1199 +gpsInit:function(payload) {
1200 +       // Initial value
1201 +       this.gpsState = 'Off';
1202 +       
1203 +       this.gpsGetRadioStatus();
1204 +},
1205 +
1206 +gpsGetRadioStatus:function() {
1207 +       if(this.gpsRadioStatusRequest) {
1208 +               this.gpsRadioStatusRequest.cancel();
1209 +       }
1210 +       
1211 +       this.gpsRadioStatusRequest = new Mojo.Service.Request('palm://com.palm.location/',{
1212 +               method:'getUseGps', parameters: {},
1213 +               onSuccess: this.gpsHandleRadioStatus.bind(this)
1214 +       });
1215 +},
1216 +
1217 +gpsHandleRadioStatus:function(payload) {
1218 +       if (payload.useGps != undefined) {
1219 +               if(payload.useGps) {
1220 +                       this.gpsState = 'On';
1221 +                       Mojo.Dom.get('gps').className = 'on';
1222 +               }                       
1223 +               else {
1224 +                       this.gpsState = 'Off';
1225 +                       Mojo.Dom.get('gps').className = 'off';
1226 +               }
1227 +
1228 +               // Update the Device Menu
1229 +               var stageController = Mojo.Controller.getAppController().getStageController("DeviceMenu");
1230 +               
1231 +               if (stageController) {
1232 +                       stageController.delegateToSceneAssistant("updateGPSState");
1233 +               }
1234 +       }
1235 +},
1236 +
1237 +gpsDeinit:function(payload) {
1238 +},
1239 +
1240 +/*
1241   * Initialize Bluetooth icon on status bar 
1242   */
1243  btInit:function(payload){
1244 @@ -2037,6 +2331,8 @@
1245   * Handle power and charging notifications
1246   */
1247  handlePowerNotifications: function(payload) {
1248 +
1249 +       this.gpsGetRadioStatus();
1250         
1251         Mojo.Log.info("SystemUI Power Payload "+ Object.toJSON(payload));
1252         if(!this.powerdServiceUp) {
1253 @@ -2047,6 +2343,10 @@
1254                 this.queryBatteryStatusReq.cancel();
1255                 this.queryBatteryStatusReq = undefined;
1256         }       
1257 +       // Is the temperature info provided?
1258 +       if(payload.temperature_C) {
1259 +               this.batteryTemp = payload.temperature_C;
1260 +       }
1261         // Is the battery level provided?
1262         if (payload.percent_ui != undefined) {
1263                 
1264 @@ -2064,8 +2364,12 @@
1265                         // Show the battery level if not charging
1266                         if (!this.isCharging) {
1267                                 Mojo.Log.info("SystemUI- Is Charging "+ this.isCharging + " Battery level "+ i);
1268 -                               Mojo.Dom.get('power').className = 'battery-' + i;
1269 -                               
1270 +                               Mojo.Dom.get('power').className = this.powerIconClass + 'battery-' + i;
1271 +                               if(this.batteryIconMode != "icon") {
1272 +                                       Mojo.Dom.get('battery').className = this.batteryIconClass + this.getBatteryLevelColor();
1273 +                                       Mojo.Dom.get('battery').innerHTML = this.batteryLevel + unescape('%');
1274 +                               }
1275 +                                                               
1276                                 //Show Banner Message if the Battery level is below 20%
1277                                 var batteryalert = $L("#{percent_ui}% battery remaining").interpolate(payload); 
1278                                 if(this.batteryLevel <= 5 && !this.batteryLevel5Shown) {
1279 @@ -2099,10 +2403,14 @@
1280                         else {
1281                                 Mojo.Log.info("SystemUI- Is Charging "+ this.isCharging );
1282                                 if(payload.percent_ui == 100)
1283 -                                       Mojo.Dom.get('power').className = 'battery-charged';
1284 +                                       Mojo.Dom.get('power').className = this.powerIconClass + 'battery-charged';
1285                                 else
1286 -                                       Mojo.Dom.get('power').className = 'battery-charging-' + i;
1287 +                                       Mojo.Dom.get('power').className = this.powerIconClass + 'battery-charging-' + i;
1288                                         
1289 +                               if(this.batteryIconMode != "icon") {
1290 +                                       Mojo.Dom.get('battery').className = this.batteryIconClass + this.getBatteryLevelColor();
1291 +                                       Mojo.Dom.get('battery').innerHTML = this.batteryLevel + unescape('%');
1292 +                               }
1293                         }
1294                         
1295                         if(this.batteryLevel > 5 && this.batteryLevel <= 10) {                          
1296 @@ -2117,7 +2425,10 @@
1297                         //Update the System Menu
1298                         var stageController = Mojo.Controller.getAppController().getStageController("DeviceMenu");
1299                         if (stageController) {
1300 -                               stageController.delegateToSceneAssistant("updateBatteryLevel", this.batteryLevel);                      
1301 +                               if(this.isCharging)
1302 +                                       stageController.delegateToSceneAssistant("updateBatteryInfo", this.batteryLevel, "Charging");
1303 +                               else
1304 +                                       stageController.delegateToSceneAssistant("updateBatteryInfo", this.batteryLevel, "Discharging");
1305                         }
1306                         
1307                          //Update the Software Update Alert
1308 @@ -2147,9 +2458,14 @@
1309                 if (this.isCharging) {
1310                         Mojo.Log.info("SystemUI- Charger Notification "+ this.isCharging + " Last battery level "+ this.lastBatteryLevel);
1311                         if(this.batteryLevel == 100)
1312 -                               Mojo.Dom.get('power').className = 'battery-charged';
1313 +                               Mojo.Dom.get('power').className = this.powerIconClass + 'battery-charged';
1314                         else
1315 -                               Mojo.Dom.get('power').className = 'battery-charging-' + this.lastBatteryLevel;
1316 +                               Mojo.Dom.get('power').className = this.powerIconClass + 'battery-charging-' + this.lastBatteryLevel;
1317 +
1318 +                       if(this.batteryIconMode != "icon") {
1319 +                               Mojo.Dom.get('battery').className = this.batteryIconClass + this.getBatteryLevelColor();
1320 +                               Mojo.Dom.get('battery').innerHTML = this.batteryLevel + unescape('%');
1321 +                       }
1322                                                 
1323                         var stageController = Mojo.Controller.getAppController().getStageController("LowBatteryAlert");
1324                         if (stageController) {
1325 @@ -2173,7 +2489,13 @@
1326                 else {
1327                         this.chargingBannerShown = false;                       
1328                         Mojo.Log.info("SystemUI- Charger Notification "+ this.isCharging + " Last battery level "+ this.lastBatteryLevel);
1329 -                       Mojo.Dom.get('power').className = 'battery-' + this.lastBatteryLevel;   
1330 +                       Mojo.Dom.get('power').className = this.powerIconClass + 'battery-' + this.lastBatteryLevel;     
1331 +
1332 +                       if(this.batteryIconMode != "icon") {
1333 +                               Mojo.Dom.get('battery').className = this.batteryIconClass + this.getBatteryLevelColor();
1334 +                               Mojo.Dom.get('battery').innerHTML = this.batteryLevel + unescape('%');
1335 +                       }
1336 +
1337                         Mojo.Controller.getAppController().removeBanner('chargingAlert');       
1338                         if (this.batteryLevel < this.minBatThresholdForUpdate) {
1339                                 Mojo.Log.info("SystemUI - OTA - Closing All Update Alerts due to battery level dropped below threshold level and charger disconnected.");
1340 @@ -2225,6 +2547,36 @@
1341         return this.batteryLevel;
1342  },
1343  
1344 +getBatteryState: function() {
1345 +       if(this.isCharging)
1346 +               return "Charging";
1347 +       else
1348 +               return "Discharging";
1349 +},
1350 +
1351 +getBatteryLevelColor: function() {
1352 +       var levelColor = "";
1353 +
1354 +       if(this.batteryIconMode == "value") {
1355 +               if(this.isCharging)
1356 +                       levelColor = "charging";
1357 +               else if(this.batteryLevel >= 70) 
1358 +                       levelColor = "full";
1359 +               else if(this.batteryLevel < 70 && this.batteryLevel >= 45) 
1360 +                       levelColor = "medium";
1361 +               else if(this.batteryLevel < 45 && this.batteryLevel >= 20)
1362 +                       levelColor = "low";
1363 +               else if(this.batteryLevel < 20)
1364 +                       levelColor = "critical";
1365 +       }
1366 +       
1367 +       return levelColor;
1368 +},
1369 +
1370 +getBatteryTemp: function() {
1371 +       return this.batteryTemp;
1372 +},
1373 +
1374  queryBatteryStatus: function() {
1375         this.queryBatteryStatusReq = new Mojo.Service.Request('palm://com.palm.power/com/palm/power/', {
1376                 method: 'batteryStatusQuery',});
1377 @@ -2238,6 +2590,7 @@
1378         this.lastBatteryLevel = 0;
1379         this.chargingBannerShown = false;
1380         this.batteryLevel = 0;
1381 +       this.batteryTemp = 0;
1382         // Subscribe to Battery Power Notifications
1383         this.powerNotificationSession = new Mojo.Service.Request('palm://com.palm.bus/signal/', {
1384                 method: 'addmatch',
1385 @@ -2274,7 +2627,7 @@
1386  
1387  powerDeInit: function() {
1388         Mojo.Log.error("SystemUI - Power service not available on the bus!");
1389 -       Mojo.Dom.get('power').className = 'error';
1390 +       Mojo.Dom.get('power').className = this.powerIconClass + 'error';
1391         this.powerSource['usb'] = false;
1392         this.powerSource['inductive'] = false;
1393         this.powerdServiceUp = false;
1394 @@ -2287,6 +2640,27 @@
1395  },
1396  
1397  /*
1398 + * Initialize ringer switch
1399 + */
1400 +
1401 +ringerSwitchInit: function() {
1402 +       this.controller.serviceRequest('palm://com.palm.keys/switches', {
1403 +               method:'status', parameters: {"subscribe":true},
1404 +               onSuccess: function(payload) {
1405 +                       this.controller.serviceRequest('palm://com.palm.audio/media', {
1406 +                               method:'status',
1407 +                               onSuccess: function(response) {
1408 +                                       if(!response['ringer switch'])
1409 +                                               Mojo.Dom.get('ringer').className = 'off';
1410 +                                       else
1411 +                                               Mojo.Dom.get('ringer').className = 'on';   
1412 +                               }.bind(this)
1413 +                       });
1414 +               }.bind(this)
1415 +       });
1416 +},
1417 +
1418 +/*
1419   * Handle WAN notifications
1420   */
1421  handleWANNotifications: function(payload) {
1422 @@ -2296,6 +2670,22 @@
1423          if(payload.returnValue != undefined && payload.returnValue)
1424                 return;
1425                 
1426 +        if(payload.disablewan === 'on')
1427 +               this.dataConnState = false;
1428 +        else if(payload.disablewan === 'off')
1429 +               this.dataConnState = true;
1430 +
1431 +       var stageController = Mojo.Controller.getAppController().getStageController("DeviceMenu");
1432 +               
1433 +       if (stageController) {
1434 +               stageController.delegateToSceneAssistant("updateDataState");
1435 +       }
1436 +
1437 +        if(payload.roamGuard === 'disable')
1438 +               this.dataRoamState = true;
1439 +        else if(payload.roamGuard === 'enable')
1440 +               this.dataRoamState = false;
1441 +        
1442          var mipFailureCode, causeCode; 
1443                         
1444          if (payload.networkstatus == "attached" && payload.connectedservices && payload.connectedservices.length > 0) { 
1445 @@ -3023,6 +3413,10 @@
1446                 if (stageController) {
1447                         stageController.delegateToSceneAssistant("updateAirplaneModeProgress");
1448                 }       
1449 +               var stageController2 = Mojo.Controller.getAppController().getStageController("StatusMenu");     
1450 +               if (stageController2) {
1451 +                       stageController2.delegateToSceneAssistant("updateAirplaneModeProgress");
1452 +               }       
1453                 if (this.airplaneMode === false) 
1454                         this.disableFlightMode();
1455                 else {
1456 @@ -3034,6 +3428,10 @@
1457                 if (stageController) {
1458                         stageController.delegateToSceneAssistant("updateAirplaneModeSettings");
1459                 }
1460 +               var stageController2 = Mojo.Controller.getAppController().getStageController("StatusMenu");     
1461 +               if (stageController2) {
1462 +                       stageController2.delegateToSceneAssistant("updateAirplaneModeSettings");
1463 +               }       
1464         }       
1465         this.airplaneModeInitialQueryDone = true;
1466         if(this.telephonyPowerQueryPayload) {
1467 @@ -3057,6 +3455,14 @@
1468                 });     
1469  },
1470  
1471 +getAirplaneModeInProgress: function() {
1472 +       return this.apModeInProgress;
1473 +},
1474 +
1475 +setAirplaneModeInProgress: function(inprogress) {
1476 +       this.apModeInProgress = inprogress;
1477 +},
1478 +
1479  //Disable Airplane Mode by turning on Phone and other radios.
1480  disableFlightMode: function() {
1481         Mojo.Log.info("System UI - Disabling Airplane Mode");
1482 @@ -3192,6 +3598,12 @@
1483                 this.airplaneModeTriggered = false;
1484                 stageController.delegateToSceneAssistant("updateAirplaneModeSettings");
1485         }       
1486 +
1487 +       var stageController2 = Mojo.Controller.getAppController().getStageController("StatusMenu");     
1488 +
1489 +       if (apModeDone && stageController2) {
1490 +               stageController2.delegateToSceneAssistant("updateAirplaneModeProgress");
1491 +       }       
1492  },
1493  
1494  //Clear the Hash before enable / disable the Airplane mode
1495 @@ -3312,6 +3724,51 @@
1496                         
1497  },
1498  
1499 +getCurrentPhoneState: function() {
1500 +       if(this.phoneRadioState) {
1501 +               if((this.carrierText.length > 0) &&
1502 +                       (this.currentCarrierText != "Network search...") &&
1503 +                       (this.currentCarrierText != "Searching...") &&
1504 +                       (this.currentCarrierText != "Airplane Mode") &&
1505 +                       (this.currentCarrierText != "Phone offline") &&
1506 +                       (this.currentCarrierText != "SIM lock") &&
1507 +                       (this.currentCarrierText != "Check SIM") &&
1508 +                       (this.currentCarrierText != "No service") &&
1509 +                       (this.currentCarrierText != "Check SIM-SOS only") &&
1510 +                       (this.currentCarrierText != "SIM lock-SOS only") &&
1511 +                       (this.currentCarrierText != "SOS Only"))
1512 +               {
1513 +                       return this.carrierText;
1514 +               }
1515 +               else
1516 +                       return 'On';
1517 +       }
1518 +       else
1519 +               return 'Off';
1520 +},
1521 +
1522 +getCurrentDataState: function() {
1523 +       if(this.dataConnState) {
1524 +               if(this.carrierText.length > 0)
1525 +                       return this.carrierText;
1526 +               else
1527 +                       return 'On';
1528 +       }
1529 +       else
1530 +               return 'Off';
1531 +},
1532 +
1533 +getRoamingDataState: function() {      
1534 +       if(this.dataRoamState)
1535 +               return 'On';
1536 +       else
1537 +               return 'Off';
1538 +},
1539 +
1540 +getCurrentGpsState: function() {
1541 +       return this.gpsState;
1542 +},
1543 +
1544  getCurrentBluetoothState: function() {
1545         return this.bluetoothState;
1546  },
1547 @@ -4731,6 +5188,8 @@
1548         // Telephony Variables
1549         phoneType: null,
1550         phoneRadioState: null,
1551 +       dataConnState: null,
1552 +       dataRoamState: null,
1553         phoneRadioNotificationSession: null,
1554         signalNotificationSession: null,
1555         networkNotificationSession: null,
1556 --- .orig/usr/lib/luna/system/luna-systemui/app/views/bar/bar-scene.html
1557 +++ /usr/lib/luna/system/luna-systemui/app/views/bar/bar-scene.html
1558 @@ -5,15 +5,11 @@
1559                         <span id="today"></span> 
1560                 </div>
1561         </div>
1562 -       <div id="appmenu">
1563 -               <div id="carrier" class="carrier-wrapper truncating-text"></div>
1564 -               <div class="appname-container">
1565 -                       <div id="appname" class="appname-wrapper truncating-text"></div>
1566 -               </div>
1567 -       </div>
1568  
1569         <div id="devicemenu">
1570 +               <span id="battery" style="display:none;"></span>
1571                 <div id="power"></div>
1572 +               <div id="ringer"></div>
1573                 <div id="rssi"></div>
1574                 <div id="ev1x">
1575                         <div id="rssi-ev"></div>
1576 @@ -24,8 +20,21 @@
1577                 <div id="wifi"></div>
1578                 <div id="vpn"></div>
1579                 <div id="bluetooth"></div>
1580 +               <div id="gps"></div>
1581                 <div id="tty"></div>
1582                 <div id="callforward"></div>
1583                 <div id="hac"></div>
1584         </div>
1585 -</div>
1586 \ No newline at end of file
1587 +
1588 +       <div id="statusmenu">
1589 +               <div id="carrier" class="carrier-wrapper truncating-text"></div>                                
1590 +       </div>
1591 +       
1592 +       <div id="todaymenu"></div>
1593 +       
1594 +       <div id="appmenu">
1595 +               <div class="appname-container">
1596 +                       <div id="appname" class="appname-wrapper truncating-text"></div>
1597 +               </div>
1598 +       </div>
1599 +</div>
1600 --- .orig/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
1601 +++ /usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
1602 @@ -120,6 +120,7 @@
1603  
1604  /* device menu icons */
1605  
1606 +#battery,
1607  #power,
1608  #rssi,
1609  #roaming,
1610 @@ -130,6 +131,7 @@
1611  #tty,
1612  #hac,
1613  #callforward,
1614 +#ringer,
1615  #gps,
1616  #ev1x {
1617         float: right;
1618 @@ -141,11 +143,63 @@
1619         background-repeat: no-repeat;
1620  }
1621  
1622 +#battery { 
1623 +       margin-left: 2px;
1624 +       position: relative;
1625 +       bottom: 3px;
1626 +       font-size: 16px;
1627 +       margin-right: 2px;
1628 +       padding-top: 1px;
1629 +       min-width: 22px;
1630 +       text-align: center;
1631 +}
1632 +
1633 +#battery.small { 
1634 +       margin-left: 2px;
1635 +       position: relative;
1636 +       bottom: 11px;
1637 +       font-size: 10px;
1638 +       margin-right: 2px;
1639 +       min-width: 22px;
1640 +       text-align: center;
1641 +}
1642 +
1643 +#battery.charging {
1644 +       color: #33CCFF;
1645 +}
1646 +
1647 +#battery.full {
1648 +       color: #33FF33;
1649 +}
1650 +
1651 +#battery.medium {
1652 +       color: #FFFF33;
1653 +}
1654 +
1655 +#battery.low {
1656 +       color: #FFCC00;
1657 +}
1658 +
1659 +#battery.critical {
1660 +       color: #FF0000;
1661 +}
1662 +
1663  #power {
1664         margin-left: 2px;
1665         width: 17px;            
1666  }
1667  
1668 +#power.rotated {
1669 +       position:absolute;
1670 +       right: 2px;
1671 +       top: 9px;
1672 +       margin-top: 0px;
1673 +       margin-right: 1px;
1674 +       height: 20px;
1675 +       width: 20px;
1676 +       -webkit-transform: rotate(270deg);
1677 +}
1678 +
1679  #power.error { background-image: url(../images/battery-error.png); }
1680  #power.battery-0 { background-image: url(../images/battery-0.png); }
1681  #power.battery-1 { background-image: url(../images/battery-1.png); }
1682 @@ -174,6 +228,18 @@
1683  #power.battery-charging-11 { background-image: url(../images/battery-charging-11.png); }
1684  #power.battery-charged { background-image: url(../images/battery-charged.png); }
1685  
1686 +#ringer {
1687 +       width: 20px;
1688 +}
1689 +
1690 +#ringer.off {
1691 +       background: url(../../../../../palm/applications/com.palm.app.soundsandalerts/images/prefs-mute.png) center left no-repeat;
1692 +}
1693 +
1694 +#ringer.on {
1695 +       display: none;
1696 +}
1697 +
1698  #rssi {
1699         width: 19px;
1700  }
1701 @@ -274,6 +340,18 @@
1702  #bluetooth.connecting { background-image: url(../images/bluetooth-connecting.png); }
1703  #bluetooth.connected { background-image: url(../images/bluetooth-connected.png); }
1704  
1705 +#gps.off {
1706 +       display: none;
1707 +}
1708 +
1709 +#gps.on {
1710 +       background: url(../images/gps-on.png) center center no-repeat;
1711 +}
1712 +
1713 +#gps.active{
1714 +       background: url(../images/gps-active.png) center center no-repeat;
1715 +}
1716 +
1717  #tty {
1718         width: 16px;
1719         background-image: url(../images/tty.png);
1720 @@ -309,3 +387,27 @@
1721  .in-drawer-list .palm-row.last {
1722         background: url(../images/list-separator-dark-taper.png) bottom left no-repeat !important;
1723  }
1724 +
1725 +#statusmenu {
1726 +       color: #fff;
1727 +       position: fixed;
1728 +       margin: 0;
1729 +       top: 0;
1730 +       left: 0;
1731 +       height: 28px;
1732 +       width: 110px;
1733 +       padding: 0;
1734 +}
1735 +
1736 +#todaymenu {
1737 +       color: #fff;
1738 +       position: fixed;
1739 +       margin: 0;
1740 +       top: 0;
1741 +       left: 110px;
1742 +       right: 110px;
1743 +       height: 28px;
1744 +       width: 100px;
1745 +       padding: 0;
1746 +}
1747 +