Bug 53274 - odometer 0.7 total distance traveled does not change
odometer 0.7 total distance traveled does not change
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gnome-applets (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Mark McLoughlin
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-09-05 18:53 EDT by Landon Curt Noll
Modified: 2007-04-18 12:36 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-09 17:43:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Landon Curt Noll 2001-09-05 18:53:21 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.2.19-7.0.8 i686)

Description of problem:
The odometer applet's top value (total distance) does not change.
The current trip botton value does change, but the top grand total value
stays at 3.1 meters.

The ~/.gnome/panel.d/default/Applet_* file for the odometer shows that both
the trip_distance and the distance values are being updated.   In
particular
the distance value indicates that the total distance is being recorded, but
not displayed on the top value.
 

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.add odometer applet to the pannel
2.configure to use metric, autoreset and enabled with 7 digits, scaled to
the
  pannel and 57 chvey theme
3.move the mouse for a few tens of meters
4. logout
5. login again
6. move the mouse some more
	

Actual Results:  The top total distance meter is stuck at 3.1 meters.

Expected Results:  The top total distance meter should have resumed its
previous value after step 5.
It should have continued to change in step 6.

Additional info:
Comment 1 Landon Curt Noll 2001-09-05 22:37:42 EDT
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
Comment 2 Havoc Pennington 2002-04-09 17:43:40 EDT
This applet seems to be gone in gnome 2
Comment 3 Havoc Pennington 2002-07-02 18:24:01 EDT
Odometer confirmed now gone.

Note You need to log in before you can comment on or make changes to this bug.