Enlightenment CVS committal
Author : sebastid
Project : e17
Module : apps/e
Dir : e17/apps/e/src/modules/temperature
Modified Files:
e_mod_main.c
Log Message:
Convert degree sign to utf8
===================================================================
RCS file:
/cvsroot/enlightenment/e17/apps/e/src/modules/temperature/e_mod_main.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- e_mod_main.c 20 Sep 2005 18:16:33 -0000 1.34
+++ e_mod_main.c 20 Sep 2005 19:14:29 -0000 1.35
@@ -1074,6 +1074,8 @@
if (ret)
{
+ char *utf8;
+
if (ef->have_temp != 1)
{
/* enable therm object */
@@ -1085,6 +1087,12 @@
ef->have_temp = 1;
}
+ if (ef->conf->units == FAHRENHEIT)
+ snprintf(buf, sizeof(buf), "%i°F", temp);
+ else
+ snprintf(buf, sizeof(buf), "%i°C", temp);
+ utf8 = ecore_txt_convert("iso-8859-1", "utf-8", buf);
+
for (l = ef->faces; l; l = l->next)
{
face = l->data;
@@ -1092,13 +1100,9 @@
(double)(temp - ef->conf->low) /
(double)(ef->conf->high - ef->conf->low));
- if (ef->conf->units == FAHRENHEIT)
- snprintf(buf, sizeof(buf), "%i°F", temp);
- else
- snprintf(buf, sizeof(buf), "%i°C", temp);
-
- edje_object_part_text_set(face->temp_object, "reading", buf);
+ edje_object_part_text_set(face->temp_object, "reading", utf8);
}
+ free(utf8);
}
else
{
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs