libgweather r508 - in trunk: . libgweather
- From: danw svn gnome org
- To: svn-commits-list gnome org
- Subject: libgweather r508 - in trunk: . libgweather
- Date: Tue, 25 Nov 2008 15:10:46 +0000 (UTC)
Author: danw
Date: Tue Nov 25 15:10:45 2008
New Revision: 508
URL: http://svn.gnome.org/viewvc/libgweather?rev=508&view=rev
Log:
* libgweather/weather.c (temperature_string): Use the degree sign
followed by "C" or "F" rather than using the combined "degrees C"
and "degrees F" glyphs, which aren't available in some fonts, and
look bad in others. #526437
* libgweather/test_metar.c (main): tweak this a little to test
that change
Modified:
trunk/ChangeLog
trunk/libgweather/test_metar.c
trunk/libgweather/weather.c
Modified: trunk/libgweather/test_metar.c
==============================================================================
--- trunk/libgweather/test_metar.c (original)
+++ trunk/libgweather/test_metar.c Tue Nov 25 15:10:45 2008
@@ -57,16 +57,16 @@
memset (&info, 0, sizeof (info));
info.valid = 1;
metar_parse (buf, &info);
+ weather_info_to_metric (&info);
printf ("Returned info:\n");
printf (" update: %s", ctime (&info.update));
printf (" sky: %s\n", weather_info_get_sky (&info));
printf (" cond: %s\n", weather_info_get_conditions (&info));
- printf (" temp: %g F\n", info.temp);
- printf (" dewp: %g F\n", info.dew);
- printf (" winddir: %s\n", weather_wind_direction_string (info.wind));
- printf (" windsp: %d knots\n", info.windspeed);
- printf (" pressure: %g\" Hg\n", info.pressure);
- printf (" vis: %g miles\n", info.visibility);
+ printf (" temp: %s\n", weather_info_get_temp (&info));
+ printf (" dewp: %s\n", weather_info_get_dew (&info));
+ printf (" wind: %s\n", weather_info_get_wind (&info));
+ printf (" pressure: %s\n", weather_info_get_pressure (&info));
+ printf (" vis: %s\n", weather_info_get_visibility (&info));
// TODO: retrieve location's lat/lon to display sunrise/set times
}
Modified: trunk/libgweather/weather.c
==============================================================================
--- trunk/libgweather/weather.c (original)
+++ trunk/libgweather/weather.c Tue Nov 25 15:10:45 2008
@@ -761,20 +761,20 @@
switch (to_unit) {
case TEMP_UNIT_FAHRENHEIT:
if (!round) {
- /* TRANSLATOR: This is the temperature in degrees Fahrenheit (\342\204\211 is the "DEGREE FAHRENHEIT" symbol) */
- g_snprintf (buf, sizeof (buf), _("%.1f \342\204\211"), far);
+ /* TRANSLATOR: This is the temperature in degrees Fahrenheit (\302\260 is U+00B0 DEGREE SIGN) */
+ g_snprintf (buf, sizeof (buf), _("%.1f \302\260F"), far);
} else {
- /* TRANSLATOR: This is the temperature in degrees Fahrenheit (\342\204\211 is the "DEGREE FAHRENHEIT" symbol) */
- g_snprintf (buf, sizeof (buf), _("%d \342\204\211"), (int)floor (far + 0.5));
+ /* TRANSLATOR: This is the temperature in degrees Fahrenheit (\302\260 is U+00B0 DEGREE SIGN) */
+ g_snprintf (buf, sizeof (buf), _("%d \302\260F"), (int)floor (far + 0.5));
}
break;
case TEMP_UNIT_CENTIGRADE:
if (!round) {
- /* TRANSLATOR: This is the temperature in degrees Celsius (\342\204\203 is the "DEGREE CELSIUS" symbol) */
- g_snprintf (buf, sizeof (buf), _("%.1f \342\204\203"), TEMP_F_TO_C (far));
+ /* TRANSLATOR: This is the temperature in degrees Celsius (\302\260 is U+00B0 DEGREE SIGN) */
+ g_snprintf (buf, sizeof (buf), _("%.1f \302\260C"), TEMP_F_TO_C (far));
} else {
- /* TRANSLATOR: This is the temperature in degrees Celsius (\342\204\203 is the "DEGREE CELSIUS" symbol) */
- g_snprintf (buf, sizeof (buf), _("%d \342\204\203"), (int)floor (TEMP_F_TO_C (far) + 0.5));
+ /* TRANSLATOR: This is the temperature in degrees Celsius (\302\260 is U+00B0 DEGREE SIGN) */
+ g_snprintf (buf, sizeof (buf), _("%d \302\260C"), (int)floor (TEMP_F_TO_C (far) + 0.5));
}
break;
case TEMP_UNIT_KELVIN:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]