You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2013/05/17 02:29:24 UTC

git commit: CB-3176 added deprecation notice for plugin xml elements

Updated Branches:
  refs/heads/master c47376b91 -> db6c6d2f4


CB-3176 added deprecation notice for plugin xml elements


Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/db6c6d2f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/db6c6d2f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/db6c6d2f

Branch: refs/heads/master
Commit: db6c6d2f46b4a88a946f79c8ef8ba11a654edbe8
Parents: c47376b
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu May 16 16:30:09 2013 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu May 16 16:30:09 2013 -0700

----------------------------------------------------------------------
 templates/standalone/cordovalib/ConfigHandler.cs |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/db6c6d2f/templates/standalone/cordovalib/ConfigHandler.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/ConfigHandler.cs b/templates/standalone/cordovalib/ConfigHandler.cs
index 98d740b..de57471 100644
--- a/templates/standalone/cordovalib/ConfigHandler.cs
+++ b/templates/standalone/cordovalib/ConfigHandler.cs
@@ -5,7 +5,6 @@ using System.IO;
 using System.Linq;
 using System.Text;
 using System.Text.RegularExpressions;
-using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Resources;
 using System.Xml.Linq;
@@ -31,7 +30,6 @@ namespace WPCordovaClassLib.CordovaLib
 
         public string ContentSrc { get; private set; }
 
-
         protected bool AllowAllDomains = false;
         protected bool AllowAllPlugins = false;
 
@@ -111,7 +109,6 @@ namespace WPCordovaClassLib.CordovaLib
 
         public bool URLIsAllowed(string url)
         {
-            // Debug.WriteLine("Testing URLIsAllowed : " + url);
             // easy case first
             if (this.AllowAllDomains)
             {
@@ -163,16 +160,10 @@ namespace WPCordovaClassLib.CordovaLib
         {
             get
             {
+                // TODO:
                 var res = from results in AllowedPlugins.TakeWhile(p => p.Value.isAutoLoad)
                           select results.Value.Name;
 
-                foreach (var s in res)
-                {
-                    Debug.WriteLine(s);
-                }
-                //string[] res = from results in (AllowedPlugins.Where(p => p.Value.isAutoLoad) )
-                //                select (string)results.Key;
-
                 return new string[] { "", "asd" };
             }
         }
@@ -188,7 +179,7 @@ namespace WPCordovaClassLib.CordovaLib
 
             foreach (var plugin in plugins)
             {
-                Debug.WriteLine("plugin " + plugin.name);
+                Debug.WriteLine("Warning: Deprecated use of <plugin> by plugin : " + plugin.name);
                 PluginConfig pConfig = new PluginConfig(plugin.name, plugin.autoLoad != null && plugin.autoLoad.Value == "true");
                 if (pConfig.Name == "*")
                 {
@@ -223,7 +214,6 @@ namespace WPCordovaClassLib.CordovaLib
             }
         }
 
-
         public void LoadAppPackageConfig()
         {
             StreamResourceInfo streamInfo = Application.GetResourceStream(new Uri("config.xml", UriKind.Relative));
@@ -236,8 +226,6 @@ namespace WPCordovaClassLib.CordovaLib
 
                 LoadPluginFeatures(document);
 
-
-
                 var preferences = from results in document.Descendants("preference")
                                   select new
                                   {
@@ -247,6 +235,7 @@ namespace WPCordovaClassLib.CordovaLib
 
                 foreach (var pref in preferences)
                 {
+                    Preferences[pref.name] = pref.value;
                     Debug.WriteLine("pref" + pref.name + ", " + pref.value);
                 }