All outstanding updates
[webos-internals:skurriers-modifications.git] / app-launcher / app-launcher-4x4-icons-v4-no-arrows-plus-more.patch
1 diff --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
2 index 9057138..6c52d5d 100644
3 --- a/usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
4 +++ b/usr/lib/luna/system/luna-applauncher/app/controllers/launcher-assistant.js
5 @@ -10,7 +10,7 @@ var LauncherAssistant = Class.create({
6          */
7         kQuickLaunchHeight: 67,
8         
9 -       kPageIndicatorSpacing: 6,       /* spacing between each page indicator */
10 +       kPageIndicatorSpacing: 1,       /* spacing between each page indicator */
11         kPageMargin: 10, /* 10 pixel margin on each side of a page */
12         kPageWidthNoMargin: NaN,
13         kPageWidth: NaN,
14 @@ -23,8 +23,8 @@ var LauncherAssistant = Class.create({
15                 visible: true,
16                 label: $L('Launcher'),
17          items: [
18 -                       /*{ label: $L('New page'), command: 'newpage' },
19 -                       { label: $L('Delete page'), command: 'deletepage' },*/
20 +                       { label: $L('New page'), command: 'newpage' },
21 +                       { label: $L('Delete page'), command: 'deletepage' },
22                         Mojo.Menu.editItem,
23                         { label: $L('List Apps...'), command: 'listapps' },
24                         { label: $L('Default Applications'), command: 'defaultapps'},
25 @@ -121,7 +121,7 @@ var LauncherAssistant = Class.create({
26                                 case 'defaultapps':
27                                         ApplicationService.launch(this.deviceInfo.id, this.deviceInfo.defaultAppParams);
28                                         break;
29 -                               /*
30 +                               //start add del page code
31                                 case 'newpage':
32                                         if (this.pageDivs.length < 10) {
33                                                 this.insertPage(this.activePageIndex, true);
34 @@ -135,7 +135,7 @@ var LauncherAssistant = Class.create({
35                                                 }
36                                         }
37                                         break;
38 -                               */
39 +                               //end add del page code
40                         }
41                 }
42                 else if (event.type === Mojo.Event.commandEnable) {
43 @@ -336,9 +336,9 @@ var LauncherAssistant = Class.create({
44                         newAppDiv = $(newAppInfo.launchPointId);
45                         Mojo.assert(newAppDiv !== undefined, "Application (%d) was inserted into the DOM but unable to be retrieved!", newAppInfo.launchPointId);
46                         if (isNaN(this.kAppWidth) || isNaN(this.kAppHeight)) {
47 -                               this.kAppWidth = newAppDiv.getWidth();
48 -                               this.kAppHeight = newAppDiv.getHeight();
49 -                               this.kAppsPerRow = Math.round(this.kPageWidthNoMargin / this.kAppWidth);
50 +                               this.kAppWidth = 80;
51 +                               this.kAppHeight = 91;
52 +                               this.kAppsPerRow = 4;
53                         }
54                         
55                         Mojo.listen(newAppDiv, Mojo.Event.tap, this.onAppTapped.bindAsEventListener(this));
56 @@ -536,7 +536,7 @@ var LauncherAssistant = Class.create({
57         /* determines the position of an app element at appIndex within a page */
58         calculateAppPosition: function(appIndex) {
59                 return {
60 -                       left: (((appIndex % this.kAppsPerRow) * this.kAppWidth) + this.kPageMargin),
61 +                       left: (((appIndex % this.kAppsPerRow) * this.kAppWidth) - 10),
62                         top: (Math.floor(appIndex/this.kAppsPerRow) * this.kAppHeight)
63                 };
64         },
65 @@ -720,7 +720,7 @@ var LauncherAssistant = Class.create({
66         onAppTapped: function(event) {
67                 var target = event.currentTarget;
68                 var appInfo = target._info;
69 -               if (event.up && event.up.altKey) {
70 +               if (event.up && event.up.altKey || event.up && event.up.metaKey) {
71                         // open app-info dialog
72                         this.showAppInfoMenu(appInfo);
73                 } else if (!this.launchRequest) { // are we already trying to launch something?