Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_x


Modified Files:
        ecore_x_icccm.c 


Log Message:
If the title isn't utf8, convert it! (If utf8 is available).

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_icccm.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ecore_x_icccm.c     6 Jan 2005 09:08:20 -0000       1.17
+++ ecore_x_icccm.c     10 Feb 2005 12:14:37 -0000      1.18
@@ -1,4 +1,7 @@
 /*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+/*
  * Various ICCCM related functions.
  * 
  * This is ALL the code involving anything ICCCM related. for both WM and
@@ -452,19 +455,16 @@
             char              **list = NULL;
             char               *t = NULL;
             int                 num = 0;
+            int                 ret;
 
-            if (xprop.encoding == ECORE_X_ATOM_STRING)
-              {
-                 t = strdup(xprop.value);
-              }
-            else if (xprop.encoding == ECORE_X_ATOM_UTF8_STRING)
+            if (xprop.encoding == ECORE_X_ATOM_UTF8_STRING)
               {
                  t = strdup(xprop.value);
               }
             else
               {
-                 int                 ret;
 
+                 /* convert to utf8 */
 #ifdef X_HAVE_UTF8_STRING
                  ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
                                                    &list, &num);
@@ -472,6 +472,7 @@
                  ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
                                                  &list, &num);
 #endif
+
                  if ((ret == XLocaleNotSupported) ||
                      (ret == XNoMemory) || (ret == XConverterNotFound))
                    {
@@ -481,13 +482,13 @@
                    {
                       if ((num >= 1) && (list))
                         {
-                           /* FIXME: convert to utf8 */
                            t = strdup(list[0]);
                         }
                       if (list)
-                         XFreeStringList(list);
+                        XFreeStringList(list);
                    }
               }
+
             XFree(xprop.value);
             return t;
          }




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to