updates and additions
[webos-internals:modifications.git] / camera / camera-improved-photo-naming-pre.patch
1 diff --git a/usr/palm/applications/com.palm.app.camera/javascripts/camera-control.js b/usr/palm/applications/com.palm.app.camera/javascripts/camera-control.js
2 index f9d2140..0e73870 100644
3 --- a/usr/palm/applications/com.palm.app.camera/javascripts/camera-control.js
4 +++ b/usr/palm/applications/com.palm.app.camera/javascripts/camera-control.js
5 @@ -706,7 +706,17 @@ CameraControl.prototype = {
6                                 } 
7  
8                                 llog("Capture Options: ", JSON.stringify(imagecaptureoptions));
9 -
10 +                               if(!this.scene.sublaunch) {
11 +                                       var date = new Date();
12 +                                       var YYYY = date.getFullYear();
13 +                                       var MM = (1+date.getMonth()); if (MM<10) { MM = "0"+MM; }
14 +                                       var DD = (0+date.getDate()); if (DD<10) { DD = "0"+DD; }
15 +                                       var hh = date.getHours(); if (hh < 10) { hh = "0"+hh; }
16 +                                       var mm = date.getMinutes(); if (mm < 10) { mm = "0"+mm; }
17 +                                       var ss = date.getSeconds(); if (ss < 10) { ss = "0"+ss; }
18 +                                       var fileBase = "_" + YYYY + "-" +  MM + "-" + DD + "-" + hh + mm + ss;
19 +                                       this.scene.defaultFilename = "/media/internal/DCIM/100PALM/PRE" + fileBase + ".jpg";
20 +                               }
21                                 cam.startImageCapture(this.scene.defaultFilename, imagecaptureoptions);
22  
23                                 break;