4 New, 2 updated patches.
[webos-internals:imagineer1981s-modifications.git] / browser / browser-mega-mix.patch
1 Name: Browser Mega Mix
2 Version: 1.3.5-1
3 Author: mamouton, Suggestions from chrislo combination of fritos1406's No Icons in browser app, full screen, and no refresh
4 Description: Hides All Icons In The Browser shows icon while loading. Fullscreen Browser and No Refresh 
5 Description: Adds Enable Disable options in the app menu for the scroll feature using the gesture area in landscape
6 Enable Gesture Scroll: Gesture+e
7 Disable Gesture Scroll: Gesture+d
8
9 Adds shortcut keys to the launcher. Hold onto Gesture+key to execute
10 New Card: Gesture+n
11 Add Bookmark: Gesture+m
12 Add To Launcher: Gesture+l
13 Bookmarks: Gesture+b
14 History: Gesture+h
15 Share Page: Gesture+s
16
17 --- .orig/usr/palm/applications/com.palm.app.browser/app/controllers/widget_webview.js
18 +++ /usr/palm/applications/com.palm.app.browser/app/controllers/widget_webview.js
19 @@ -1542,7 +1542,7 @@
20                 }
21                 else {
22                         if (this._serverConnectTimer === undefined) {
23 -                               this._serverConnectTimer = this.controller.window.setTimeout(this._connectAdapterToServer, 3000);
24 +                               this._serverConnectTimer = this.controller.window.setTimeout(this._connectAdapterToServer, 60000);
25                         }
26                 }
27         },
28
29 --- .orig/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
30 +++ /usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
31 @@ -299,6 +299,9 @@
32                 
33                 this._updateOrientation();
34                 
35 +               // FullScreen Browser
36 +        this.controller.enableFullScreenMode(true);            
37 +               
38                 // Update any pending web preferences changes
39                 AppAssistant.WebPreferences.activate(this._webView.mojo);
40  
41 @@ -1862,7 +1865,7 @@
42                 if (!this._addressBar.hasFocus()) {
43                         this._addressBar.hide();
44                         this.chrome.hide();
45 -
46 +                   this.controller.enableFullScreenMode(true);
47                         // Only focus this webview widget if this assistant has
48                         // focus. All page-assisants can receive 'moved' events
49                         // so we have to be careful when explicitly setting the
50 @@ -1885,7 +1888,7 @@
51                 //Mojo.Log.info("-> TOP > 0 SO SHOWING");
52                 this._addressBar.show();
53                 this.chrome.show();
54 -
55 +               this.controller.enableFullScreenMode(false);
56         } else {
57                 //Mojo.Log.info("-> TOP == 0 Do Nothing.");
58                 // Do nothing.
59 --- .orig/usr/palm/applications/com.palm.app.browser/app/controllers/page-controls.js
60 +++ /usr/palm/applications/com.palm.app.browser/app/controllers/page-controls.js
61 @@ -98,7 +98,8 @@
62                         type: 'idle',
63                         label: MenuData.NavigationMenu.Reload.label,
64                         icon: MenuData.NavigationMenu.Reload.icon,
65 -                       command: MenuData.NavigationMenu.Reload.command
66 +                       command: MenuData.NavigationMenu.Reload.command,
67 +                        
68                 };
69  
70                 if (this._animation) {
71 @@ -111,6 +112,7 @@
72                 // The spacer... right aligns the following button.
73                 this._model.items.push(idleModel);
74                 this._controller.modelChanged(this._model);
75 +               this._controller.setMenuVisible(Mojo.Menu.commandMenu, false);
76  
77                 this._currentPageModel = idleModel;
78         },
79 @@ -141,6 +143,7 @@
80                         this._model.items.push(progressModel);
81                         this._controller.modelChanged(this._model);
82                         this._animation.start(0);
83 +                       this._controller.setMenuVisible(Mojo.Menu.commandMenu, true);
84  
85                         this._currentPageModel = progressModel;
86  
87 @@ -186,6 +189,7 @@
88                         this._model.items.push(searchModel);
89                         this._controller.modelChanged(this._model);
90                         this._animation.start();
91 +                       this._controller.setMenuVisible(Mojo.Menu.commandMenu, true);
92  
93                         this._currentPageModel = searchModel;
94
95 --- .orig/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
96 +++ /usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
97 @@ -90,7 +90,7 @@
98                 this._updateOrientation();
99  
100                 // Allow override of 'back' gesture in landscape mode.
101 -               this.controller.useLandscapePageUpDown(true);
102 +               this.controller.useLandscapePageUpDown(false);
103  
104                 // Create the browser server status control.
105                 this._browserServerStatus = new BrowserServerStatus(this.controller);
106 @@ -787,8 +787,15 @@
107                 this.appMenuModel = {
108                         visible: true,
109                         items: [
110 -                               MenuData.ApplicationMenu.NewCard,
111 -                               MenuData.ApplicationMenu.AddBookmark,
112 +                               {
113 +                                       label: $L("On/Off Gesture"),
114 +                                       items: [
115 +                                           {label:$L('Enable Gesture'),     shortcut:'e', command:'enable-gesture-cmd'},
116 +                        {label:$L('Disable Gesture'),     shortcut:'d', command:'disable-gesture-cmd'},
117 +                                                  ]
118 +                               },      
119 +                               {label:$L('New Card'),     shortcut:'n', command:'new-page-cmd'},
120 +                               {label:$L('Add Bookmark'),     shortcut:'m', command:'add-bookmark-cmd'},
121                                 {
122                                         label: $L("Page"),
123                                         items: [
124 @@ -792,8 +792,10 @@
125                                 {
126                                         label: $L("Page"),
127                                         items: [
128 -                                               MenuData.ApplicationMenu.AddToLauncher,
129 -                                               MenuData.ApplicationMenu.SharePage]
130 +                                               {label:$L('Add To Launcher'),     shortcut:'l', command:'add-launch-icon-cmd'},
131 +                                               {label:$L('Share Page'),     shortcut:'s', command:'share-page-cmd'},
132 +                       {label:$L('Refresh Page'),     shortcut:'r', command:'refresh'},
133 +                           ]
134                                 },
135                                 MenuData.ApplicationMenu.ShowBookmarks,
136                                 MenuData.ApplicationMenu.ShowHistory]
137 @@ -795,8 +796,9 @@
138                                                 MenuData.ApplicationMenu.AddToLauncher,
139                                                 MenuData.ApplicationMenu.SharePage]
140                                 },
141 -                               MenuData.ApplicationMenu.ShowBookmarks,
142 -                               MenuData.ApplicationMenu.ShowHistory]
143 +                               {label:$L('Bookmarks'),     shortcut:'b', command:'show-bookmarks-cmd'},
144 +                               {label:$L('History'),     shortcut:'h', command:'show-history-cmd'},
145 +                           ]
146                 };
147  
148                 this.controller.setupWidget(Mojo.Menu.appMenu, undefined, this.appMenuModel);
149 @@ -2077,6 +2084,10 @@
150                                 case MenuData.ApplicationMenu.NewCard.command:
151                                         this._newBrowserPage();
152                                         break;
153 +                                       
154 +                               case MenuData.ApplicationMenu.EnableGesture.command:
155 +                                       this.controller.useLandscapePageUpDown(true);
156 +                                       break;  
157  
158                                 case MenuData.ApplicationMenu.AddBookmark.command:
159                                         urlReference = new UrlReference(this.currentUrl, this.currentTitle, new Date());
160 @@ -2078,6 +2089,10 @@
161                                         this._newBrowserPage();
162                                         break;
163  
164 +                               case MenuData.ApplicationMenu.DisableGesture.command:
165 +                                       this.controller.useLandscapePageUpDown(false);
166 +                                       break;
167 +                                       
168                                 case MenuData.ApplicationMenu.AddBookmark.command:
169                                         urlReference = new UrlReference(this.currentUrl, this.currentTitle, new Date());
170                                         this._createDefaultBookmarkImages(urlReference);
171 --- .orig/usr/palm/applications/com.palm.app.browser/app/controllers/page-applicationmenu.js
172 +++ /usr/palm/applications/com.palm.app.browser/app/controllers/page-applicationmenu.js
173 @@ -11,6 +11,18 @@
174                 command: 'new-page-cmd'
175         },
176         
177 +       EnableGesture: {
178 +               label: $L('Enable Gesture'),
179 +               command: 'enable-gesture-cmd',
180 +               checkEnabled: true
181 +       },
182 +       
183 +       DisableGesture: {
184 +               label: $L('Disable Gesture'),
185 +               command: 'disable-gesture-cmd',
186 +               checkEnabled: true
187 +       },      
188 +       
189         SharePage: {
190                 label: $L('Share'),
191                 command: 'share-page-cmd',
192
193 --- .orig/usr/palm/applications/com.palm.app.browser/app/controllers/startpage-assistant.js
194 +++ /usr/palm/applications/com.palm.app.browser/app/controllers/startpage-assistant.js
195 @@ -23,7 +23,7 @@
196         this._updateOrientation();
197  
198         // Allow override of 'back' gesture in landscape mode.
199 -       this.controller.useLandscapePageUpDown(true);
200 +       this.controller.useLandscapePageUpDown(false);
201  
202         // Listen for scene scope keyboard events.
203         this.controller.listen(this.controller.sceneElement, Mojo.Event.keydown, this._onKeyDownEventHandler);
204 @@ -42,6 +42,13 @@
205         this.appMenuModel = {
206                 visible: true,
207                 items: [
208 +                               {
209 +                                       label: $L("On/Off Gesture"),
210 +                                       items: [
211 +                                           {label:$L('Enable Gesture'),     shortcut:'e', command:'enable-gesture-cmd'},
212 +                        {label:$L('Disable Gesture'),     shortcut:'d', command:'disable-gesture-cmd'},
213 +                                                  ]
214 +                               },                      
215                         MenuData.ApplicationMenu.NewCard,
216                         MenuData.ApplicationMenu.AddBookmark,
217                         {
218