8 New, 4 updated patches.
[webos-internals:modifications.git] / camera / camera-improved-photo-naming-pixi.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 526c91f..7419e29 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 @@ -62,6 +62,17 @@ CameraControl = Class.create({
6                         // A (default) filename was passed in - presumably we've been sublaunched and the caller
7                         // knows where they want to save the file.
8                         cam.imageDestination = this.scene.defaultFilename;
9 +               } else {
10 +                       var date = new Date();
11 +                       var YYYY = date.getFullYear();
12 +                       var MM = (1+date.getMonth()); if (MM<10) { MM = "0"+MM; }
13 +                       var DD = (0+date.getDate()); if (DD<10) { DD = "0"+DD; }
14 +                       var hh = date.getHours(); if (hh < 10) { hh = "0"+hh; }
15 +                       var mm = date.getMinutes(); if (mm < 10) { mm = "0"+mm; }
16 +                       var ss = date.getSeconds(); if (ss < 10) { ss = "0"+ss; }
17 +                       var fileBase = YYYY + "-" +  MM + "-" + DD + "-" + hh + mm + ss;
18 +                       cam.imageDestination = "/media/internal/DCIM/100PALM/" + 
19 +                                       "PIXI" + fileBase + ".jpg";
20                 }
21  
22                 // Call the capture state machine.