Commit a7452f7c872cf7b171987f007ca15344e50b2bab

  • avatar
  • egaudet
  • Mon Oct 26 23:01:32 CET 2009
Added patches submitted via dBsooner's submission script.
  
1--- /tmp/old/app/controllers/chrome.js Thu Oct 22 01:20:25 2009
2+++ /usr/palm/applications/com.palm.app.browser/app/controllers/chrome.js Thu Oct 22 01:24:41 2009
1--- /dev/null
2+++ /usr/palm/applications/com.palm.app.browser/app/controllers/chrome.js
33@@ -102,12 +102,39 @@
44 }
55 };
4040 };
4141
4242 Chrome.prototype.isVisible = function() {
43--- /tmp/old/app/controllers/downloaddialog-assistant.js Wed Dec 31 16:00:00 1969
44+++ /usr/palm/applications/com.palm.app.browser/app/controllers/downloaddialog-assistant.js Thu Oct 22 01:24:41 2009
43--- /dev/null
44+++ /usr/palm/applications/com.palm.app.browser/app/controllers/downloaddialog-assistant.js
4545@@ -0,0 +1,46 @@
4646+/**
4747+ * A dialog assistant for display of yes/no box.
8989+ }
9090+ }
9191+});
92--- /tmp/old/app/controllers/page-assistant.js Thu Oct 22 01:20:25 2009
93+++ /usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js Thu Oct 22 00:28:49 2009
94@@ -1198,7 +1198,30 @@
92--- /dev/null
93+++ /usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
94@@ -614,6 +614,7 @@
95 {label: $L('Open In New Card'), command:'openNew'},
96 {label: $L('Share Link'), command:'shareUrl'},
97 {label: $L('Copy URL'), command:'copyUrl'},
98+ {label: $L('Download URL'), command:'downloadUrl'},
99 {label: $L('Copy to Photos'), command:'copyToPhotos'},
100 {label: $L('Share Image'), command:'shareImage'},
101 {label: $L('Set Wallpaper'), command:'setWallpaper'}
102@@ -665,6 +666,9 @@
103 case 'copyUrl':
104 this.controller.stageController.setClipboard(urlInfo.url);
105 break;
106+ case 'downloadUrl':
107+ this._downloadResource(urlInfo.url);
108+ break;
109 case 'copyToPhotos':
110 this._webView.mojo.saveImageAtPoint(tapPt.left, tapPt.top, "/media/internal", saveImageCallback);
111 break;
112@@ -685,6 +689,7 @@
113 usedItems.push( findItem('openNew') );
114 usedItems.push( findItem('shareUrl') );
115 usedItems.push( findItem('copyUrl') );
116+ usedItems.push( findItem('downloadUrl') );
117 }
118
119 if (response.src) {
120@@ -1198,7 +1203,30 @@
95121 PageAssistant.prototype._streamResource = function(uri, appid, mimeType){
96122
97123 Mojo.Log.info("Streaming: '%s' with '%s' (%s)", uri, appid, mimeType);
98124-
99+ if(appid === 'com.palm.app.email' || 'com.palm.app.docviewer' || 'com.palm.app.pdfviewer' || 'com.palm.app.maps' || 'com.palm.app.youtube' || 'com.palm.app.phone')
125+ if(appid === 'com.palm.app.email' || appid === 'com.palm.app.docviewer' || appid === 'com.palm.app.pdfviewer' || appid === 'com.palm.app.maps' || appid === 'com.palm.app.phone' || appid === 'com.palm.app.youtube')
100126+ //a phone #, Google Map, docviewer, email, pdfviewer, or YouTube link was clicked, so we bypass the download dialog and open the app.
101127+ {
102128+ var params = {target: uri, mimeType: mimeType};
149149 // Only a few select applications can be
150150 crossAppScene = {
151151 'com.palm.app.videoplayer': 'nowplaying',
152@@ -1206,11 +1229,9 @@
152@@ -1206,11 +1234,9 @@
153153 };
154154 var params = {target: uri, mimeType: mimeType};
155155 if (crossAppScene[appid]) {
162162 this.controller.serviceRequest('palm://com.palm.applicationManager', {
163163 method: 'open',
164164 parameters: {
165@@ -1219,6 +1240,9 @@
165@@ -1219,6 +1245,9 @@
166166 }
167167 });
168168 }
172172 };
173173
174174 /**
175@@ -2237,6 +2261,31 @@
175@@ -2237,6 +2266,24 @@
176176 // allowed to trigger the bar.
177177 if (this._addressBar.isAGotoAddressBarEvent(event.originalEvent)) {
178178 this._gotoUrlBar();
182182+ var pageHeight = scroller.mojo.scrollerSize().height;
183183+ if (pageHeight > 50) pageHeight = pageHeight - 50;
184184+ if (key == Mojo.Char.spaceBar) {
185+ // alternate method for scrolling, gives visual feedback, but slower
186+ //var currentTop = scroller.mojo.getScrollPosition().top;
187+ //currentTop += scroller.mojo.scrollerSize().height - 50;
188+ //scroller.mojo.scrollTo(undefined, currentTop, true);
189185+ scroller.mojo.adjustBy(0, -1*pageHeight);
190186+ this._addressBar.hide();
191+ } else if (key == Mojo.Char.shift) {
192+ scroller.mojo.adjustBy(0, pageHeight);
193187+ } else if (key == Mojo.Char.period) {
194+ scroller.mojo.adjustBy(0, -25);
195+ this._addressBar.hide();
188+ scroller.mojo.adjustBy(0, pageHeight);
196189+ } else if (key == Mojo.Char.backspace) {
197190+ scroller.mojo.revealTop(0);
198191+ } else if (key == Mojo.Char.enter) {
197197 }
198198 }
199199 };
200--- /tmp/old/app/controllers/urlbar.js Thu Oct 22 01:20:25 2009
201+++ /usr/palm/applications/com.palm.app.browser/app/controllers/urlbar.js Thu Oct 22 01:24:41 2009
200--- /dev/null
201+++ /usr/palm/applications/com.palm.app.browser/app/controllers/urlbar.js
202202@@ -47,6 +47,10 @@
203203 if (orientation !== 'up') {
204204 // In landscape and down we ALWAYS hide the BAR so we make sure it's
258258 };
259259
260260 UrlBar.prototype.isVisible = function() {
261--- /tmp/old/app/views/download/download-stream-popup.html Wed Dec 31 16:00:00 1969
262+++ /usr/palm/applications/com.palm.app.browser/app/views/download/download-stream-popup.html Thu Oct 22 01:24:41 2009
261--- /dev/null
262+++ /usr/palm/applications/com.palm.app.browser/app/views/download/download-stream-popup.html
263263@@ -0,0 +1,8 @@
264264+<div id="palm-dialog-content" class="palm-dialog-content">
265265+ <div class="dialog-message" x-mojo-loc="">This file type has been registered as a streaming media file. Would you like to download it to /media/internal/downloads instead?</div>
269269+ <div class="dismiss palm-button" id="acceptButton" x-mojo-loc="" x-mojo-tap-highlight="momentary">Stream</div>
270270+ <div class="dismiss palm-button" id="dismissButton" x-mojo-loc="" x-mojo-tap-highlight="momentary">Download</div>
271271+</div>
272--- /tmp/old/sources.json Thu Oct 22 01:20:25 2009
273+++ /usr/palm/applications/com.palm.app.browser/sources.json Thu Oct 22 01:24:41 2009
272--- /dev/null
273+++ /usr/palm/applications/com.palm.app.browser/sources.json
274274@@ -48,6 +48,9 @@
275275 "source": "app\/controllers\/download-controller.js",
276276 },
281281 "source": "app\/controllers\/preferences-assistant.js",
282282 },
283283 {
284--- /tmp/old/stylesheets/browser.css Thu Oct 22 01:20:25 2009
285+++ /usr/palm/applications/com.palm.app.browser/stylesheets/browser.css Thu Oct 22 01:24:41 2009
284--- /dev/null
285+++ /usr/palm/applications/com.palm.app.browser/stylesheets/browser.css
286286@@ -753,7 +753,7 @@
287287 }
288288
  
1Copyright (c) 2009 diomark
2
3Permission is hereby granted, free of charge, to any person
4obtaining a copy of this software and associated documentation
5files (the "Software"), to deal in the Software without
6restriction, including without limitation the rights to use,
7copy, modify, merge, publish, distribute, sublicense, and/or sell
8copies of the Software, and to permit persons to whom the
9Software is furnished to do so, subject to the following
10conditions:
11
12The above copyright notice and this permission notice shall be
13included in all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22OTHER DEALINGS IN THE SOFTWARE.
  
1Index: /etc/palm/download.conf
2===================================================================
3--- /dev/null
4+++ /etc/palm/download.conf
5@@ -0,0 +1,8 @@
6+#Tested to work with WebOS 1.2.1
7+#Mark R (Diomark) 10/20/09
8+#unthrottles the download manager from 64kb/sec to unlimited
9+
10+[DownloadManager]
11+MaxQueueLength=128
12+MaxConcurrent=2
13+MaxRecvSpeed=-1
  
1Copyright (c) 2009 dallashigh <karl@webosnerd.com>
2
3Permission is hereby granted, free of charge, to any person
4obtaining a copy of this software and associated documentation
5files (the "Software"), to deal in the Software without
6restriction, including without limitation the rights to use,
7copy, modify, merge, publish, distribute, sublicense, and/or sell
8copies of the Software, and to permit persons to whom the
9Software is furnished to do so, subject to the following
10conditions:
11
12The above copyright notice and this permission notice shall be
13included in all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22OTHER DEALINGS IN THE SOFTWARE.
  
1Index: /usr/palm/applications/com.palm.app.phone/app/controllers/activecall-assistant.js
2===================================================================
3--- /usr/palm/applications/com.palm.app.phone/app/controllers/~activecall-assistant.orig
4+++ /usr/palm/applications/com.palm.app.phone/app/controllers/activecall-assistant.js
5@@ -1186,17 +1186,7 @@
6
7 // always pop active call
8 // FIXME: actually don't if dialpad is on top
9- var closeStage = false;
10- if ( this.lastLines &&
11- this.lastLines.length > 0 &&
12- this.lastLines[0] &&
13- (this.lastLines[0].origin === TelephonyCallState.DIALING) &&
14- this.appAssistant.firstuse !== true) {
15- QDLogger.log( "activeCallAssistant::updateCalls", "last call outgoing, so back to the pad: ");
16- } else {
17- QDLogger.log( "activeCallAssistant::updateCalls", "last call incoming, so hiding stage");
18- closeStage = true;
19- }
20+ var closeStage = true;
21
22 this.lastLines = [];
23 this.appAssistant.popActiveCall();