incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [3/3] wp7 commit: fixes capture api
Date Thu, 11 Oct 2012 18:22:39 GMT
fixes capture api


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/commit/06dc27ae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/tree/06dc27ae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/diff/06dc27ae

Branch: refs/heads/master
Commit: 06dc27aee8828a53d7b978cf2698d4e03efb0fe5
Parents: 22477ea
Author: sgrebnov <sergei.grebnov@gmail.com>
Authored: Mon Oct 8 15:42:27 2012 +0400
Committer: sgrebnov <sergei.grebnov@gmail.com>
Committed: Mon Oct 8 15:42:27 2012 +0400

----------------------------------------------------------------------
 .../standalone/cordovalib/Commands/Capture.cs      |   13 +++++++------
 .../standalone/cordovalib/UI/AudioCaptureTask.cs   |    2 +-
 .../standalone/cordovalib/UI/VideoCaptureTask.cs   |    2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/06dc27ae/templates/standalone/cordovalib/Commands/Capture.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/Commands/Capture.cs b/templates/standalone/cordovalib/Commands/Capture.cs
index 3dfc0cf..3cda1b9 100644
--- a/templates/standalone/cordovalib/Commands/Capture.cs
+++ b/templates/standalone/cordovalib/Commands/Capture.cs
@@ -244,8 +244,9 @@ namespace WP7CordovaClassLib.Cordova.Commands
             {
                 try
                 {
-                    this.captureImageOptions = String.IsNullOrEmpty(options) ?
-                        CaptureImageOptions.Default : JSON.JsonHelper.Deserialize<CaptureImageOptions[]>(options)[0];
+
+                    string args = JSON.JsonHelper.Deserialize<string[]>(options)[0];
+                    this.captureImageOptions = String.IsNullOrEmpty(args) ? CaptureImageOptions.Default
: JSON.JsonHelper.Deserialize<CaptureImageOptions>(args);
 
                 }
                 catch (Exception ex)
@@ -275,8 +276,8 @@ namespace WP7CordovaClassLib.Cordova.Commands
             {
                 try
                 {
-                    this.captureAudioOptions = String.IsNullOrEmpty(options) ?
-                        CaptureAudioOptions.Default : JSON.JsonHelper.Deserialize<CaptureAudioOptions[]>(options)[0];
+                    string args = JSON.JsonHelper.Deserialize<string[]>(options)[0];
+                    this.captureAudioOptions = String.IsNullOrEmpty(args) ? CaptureAudioOptions.Default
: JSON.JsonHelper.Deserialize<CaptureAudioOptions>(args);
 
                 }
                 catch (Exception ex)
@@ -306,8 +307,8 @@ namespace WP7CordovaClassLib.Cordova.Commands
             {
                 try
                 {
-                    this.captureVideoOptions = String.IsNullOrEmpty(options) ?
-                        CaptureVideoOptions.Default : JSON.JsonHelper.Deserialize<CaptureVideoOptions[]>(options)[0];
+                    string args = JSON.JsonHelper.Deserialize<string[]>(options)[0];
+                    this.captureVideoOptions = String.IsNullOrEmpty(args) ? CaptureVideoOptions.Default
: JSON.JsonHelper.Deserialize<CaptureVideoOptions>(args);
 
                 }
                 catch (Exception ex)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/06dc27ae/templates/standalone/cordovalib/UI/AudioCaptureTask.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/UI/AudioCaptureTask.cs b/templates/standalone/cordovalib/UI/AudioCaptureTask.cs
index 565343b..3de33f7 100644
--- a/templates/standalone/cordovalib/UI/AudioCaptureTask.cs
+++ b/templates/standalone/cordovalib/UI/AudioCaptureTask.cs
@@ -76,7 +76,7 @@ namespace WP7CordovaClassLib.Cordova.UI
 
                 string baseUrl = WP7CordovaClassLib.Cordova.Commands.BaseCommand.GetBaseURL();
                 // dummy parameter is used to always open a fresh version
-                root.Navigate(new System.Uri( baseUrl + "Cordova/UI/AudioRecorder.xaml?dummy="
+ Guid.NewGuid().ToString(), UriKind.Relative));
+                root.Navigate(new System.Uri(baseUrl + "CordovaLib/UI/AudioRecorder.xaml?dummy="
+ Guid.NewGuid().ToString(), UriKind.Relative));
 
             });
         }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/06dc27ae/templates/standalone/cordovalib/UI/VideoCaptureTask.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/UI/VideoCaptureTask.cs b/templates/standalone/cordovalib/UI/VideoCaptureTask.cs
index 3fd92a5..6655730 100644
--- a/templates/standalone/cordovalib/UI/VideoCaptureTask.cs
+++ b/templates/standalone/cordovalib/UI/VideoCaptureTask.cs
@@ -76,7 +76,7 @@ namespace WP7CordovaClassLib.Cordova.UI
 
                 string baseUrl = WP7CordovaClassLib.Cordova.Commands.BaseCommand.GetBaseURL();
                 // dummy parameter is used to always open a fresh version
-                root.Navigate(new System.Uri( baseUrl + "Cordova/UI/VideoRecorder.xaml?dummy="
+ Guid.NewGuid().ToString(), UriKind.Relative));
+                root.Navigate(new System.Uri(baseUrl + "CordovaLib/UI/VideoRecorder.xaml?dummy="
+ Guid.NewGuid().ToString(), UriKind.Relative));
             });
         }
 


Mime
View raw message