]> git.street.me.uk Git - andy/viking.git/commitdiff
Use define for conversion of meters->miles units.
authorRob Norris <rw_norris@hotmail.com>
Sat, 29 Jan 2011 10:55:36 +0000 (10:55 +0000)
committerRob Norris <rw_norris@hotmail.com>
Sat, 29 Jan 2011 10:56:09 +0000 (10:56 +0000)
src/viktrwlayer.c

index a1ada99513cbfa0267dab719cce57cc0fd5b9a75..98bfc26b685dc08ec404aa7bcabde4ad1ed8db7f 100644 (file)
@@ -1639,7 +1639,7 @@ static const gchar* trw_layer_layer_tooltip ( VikTrwLayer *vtl )
       // Setup info dependent on distance units
       if ( a_vik_get_units_distance() == VIK_UNITS_DISTANCE_MILES ) {
        g_snprintf (tbuf4, sizeof(tbuf4), "miles");
-       len_in_units = tt.length/1600.0;
+       len_in_units = VIK_METERS_TO_MILES(tt.length);
       }
       else {
        g_snprintf (tbuf4, sizeof(tbuf4), "kms");
@@ -1706,7 +1706,7 @@ static const gchar* trw_layer_sublayer_tooltip ( VikTrwLayer *l, gint subtype, g
          g_snprintf (tmp_buf, sizeof(tmp_buf), _("%s%.1f km %s"), time_buf1, tr_len/1000.0, time_buf2);
          break;
        case VIK_UNITS_DISTANCE_MILES:
-         g_snprintf (tmp_buf, sizeof(tmp_buf), _("%s%.1f miles %s"), time_buf1, tr_len/1600.0, time_buf2);
+         g_snprintf (tmp_buf, sizeof(tmp_buf), _("%s%.1f miles %s"), time_buf1, VIK_METERS_TO_MILES(tr_len), time_buf2);
          break;
        default:
          break;