Author: remi
Date: 2009-03-23 19:39:28 +0100 (Mon, 23 Mar 2009)
New Revision: 4187

Modified:
   
software_suite_v2/tuxware/tuxdroidserver/trunk/util/applicationserver/gadget/WebGadgetTools.py
Log:
* fixed an encoding bug in the google gadget generator.
* fixed a bad reference to an object

Modified: 
software_suite_v2/tuxware/tuxdroidserver/trunk/util/applicationserver/gadget/WebGadgetTools.py
===================================================================
--- 
software_suite_v2/tuxware/tuxdroidserver/trunk/util/applicationserver/gadget/WebGadgetTools.py
      2009-03-23 18:36:28 UTC (rev 4186)
+++ 
software_suite_v2/tuxware/tuxdroidserver/trunk/util/applicationserver/gadget/WebGadgetTools.py
      2009-03-23 18:39:28 UTC (rev 4187)
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
 #    Copyright (C) 2009 C2ME Sa
 #    Remi Jocaille <[email protected]>
 #    Distributed under the terms of the GNU General Public License
@@ -124,7 +126,7 @@
         structure['command'] = command
         # Fill the parameters
         for key in parameters:
-            if key in self.getParametersName():
+            if key in gadget.getParametersName():
                 for sKey in structure['parameters']:
                     param = structure['parameters'][sKey]
                     if param['name'] == key:
@@ -147,13 +149,13 @@
         else:
             language = gadget.getContainer().getLanguage()
         result = GOOGLE_GADGET_BASE_CODE % (
-            gadget.getDescription().getName(),
-            gadget.getDescription().getAuthor(),
-            gadget.getDescription().getDescription(language),
-            gadget.getDescription().getIconFile(),
-            gadget.getDescription().getIconFile(),
+            gadget.getDescription().getName().decode("utf-8"),
+            gadget.getDescription().getAuthor().decode("utf-8"),
+            gadget.getDescription().getDescription(language).decode("utf-8"),
+            "/gagdet.png", # TODO : Will be an icon located on the kysoh ftp
+            "/gagdet.png", # TODO : Will be an icon located on the kysoh ftp
             url)
-        return result
+        return result.encode("utf-8")
 
     getWebGadgetUrl = staticmethod(getWebGadgetUrl)
     generateWebGadgetStructure = staticmethod(generateWebGadgetStructure)


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to