Bug 53274
Summary: | odometer 0.7 total distance traveled does not change | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Landon Curt Noll <redhat-mail> |
Component: | gnome-applets | Assignee: | Mark McLoughlin <markmc> |
Status: | CLOSED RAWHIDE | QA Contact: | Aaron Brown <abrown> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-04-09 21:43:45 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Landon Curt Noll
2001-09-05 22:53:21 UTC
The problem is due to a mis-feature / design brain-damage. The applet, as shipped by RH, tries to be cleaver about multiple unit levels. In metric mode, it has cm, them meter then km. This means that once someone has moved the mount more than 999.9 meters, the odometer jumps to 1.0 (1km = 1000.0 m). It stays at 1.0 until another 100 meters of movement where is jumps to 1.1. Thus once somebody has moved beyond 1km the odometer moves very slowly. The non-metric mode has a similar problem. Once somebody as moused over 5280 feed, it jumps to 1.0 miles and stays that way for another 528 feet. Worse still, the units for the total distance moved can and will be different from the trip distance. In my case the meter read: 000003.0 000087.9 Here the 3.0 means 3km and changes very slowly (and to the casual observer not at all) where the 87.9 means 87.9 meters and changes with reasonable speed. The following patch fixes this brain damage. For metric (the default) it only uses the meter units. For the non-metric, it uses inches (until 12) where it quickly switches to feet. Both the meters and feet change at a reasonable speed. Internally the applet records distance in inches. To remain conpatible with existing distance readings in ~/.gnome/panel.d/default/Applet_* files I kept the inch/feet step for the non-metric side. This is not too bad as after 1 foot of mouse motion the meter stays in feet. I recommend this patch for the gnome-applets-1.2.4-3: *** odometer/odo.h.init Wed Sep 5 19:00:01 2001 --- odometer/odo.h Wed Sep 5 19:07:51 2001 *************** *** 17,31 **** #include <gnome.h> #include <applet-widget.h> ! #define ODO_VERSION "0.7" #define UPDATE_TIMEOUT 75 #define SIZEHINT_DEFAULT 46 #define INCH 0 #define FOOT 1 ! #define MILE 2 ! #define MAX_UNIT 3 #undef DEBUG #define INTEGER 0 --- 17,30 ---- #include <gnome.h> #include <applet-widget.h> ! #define ODO_VERSION "0.7-a" #define UPDATE_TIMEOUT 75 #define SIZEHINT_DEFAULT 46 #define INCH 0 #define FOOT 1 ! #define MAX_UNIT 2 #undef DEBUG #define INTEGER 0 *** odometer/odo.c.init Thu May 4 05:24:03 2000 --- odometer/odo.c Wed Sep 5 19:14:26 2001 *************** *** 108,116 **** #include <libgnomeui/gnome-window-icon.h> static conversionEntry conversion_table[MAX_UNIT] = { ! { INCH, "inch", "inches", 12.0, 2.54, "cm", "cm", 100.0, 2 }, ! { FOOT, "foot", "feet", 5280.0, 0.3048, "meter", "meters", 1000.0, 1 }, ! { MILE, "mile", "miles", -1.0, 1.609344, "km", "km", -1.0, 1 } }; static void --- 108,115 ---- #include <libgnomeui/gnome-window-icon.h> static conversionEntry conversion_table[MAX_UNIT] = { ! { INCH, "inch", "inches", 12.0, 0.0254, "meter", "meters", 1.0, 1 }, ! { FOOT, "foot", "feet", -1.0, 0.3048, "meter", "meters", -1.0, 1 }, }; static void This applet seems to be gone in gnome 2 Odometer confirmed now gone. |