summaryrefslogtreecommitdiff
path: root/xgps
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-12-21 13:53:29 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-12-21 13:53:29 +0000
commitfd8e2a3deb0154e59cf4949721ab0200c6f0e99d (patch)
tree8305589e4bbdd79a4e2375144308bf9a727f85ba /xgps
parentaf4c85801807f5b556c1fc1fa71ceb18c35a729e (diff)
downloadgpsd-fd8e2a3deb0154e59cf4949721ab0200c6f0e99d.tar.gz
Make AIS display honor the selected degree format.
Diffstat (limited to 'xgps')
-rwxr-xr-xxgps7
1 files changed, 4 insertions, 3 deletions
diff --git a/xgps b/xgps
index 7c765bf3..0ac213c6 100755
--- a/xgps
+++ b/xgps
@@ -161,8 +161,9 @@ class AISView:
"Encapsulate store and view objects for watching AIS data."
AIS_ENTRIES = 10
DWELLTIME = 360
- def __init__(self):
+ def __init__(self, deg_type):
"Initialize the store and view."
+ self.deg_type = deg_type
self.name_to_mmsi = {}
self.named = {}
self.store = gtk.ListStore(str,str,str,str,str,str)
@@ -211,7 +212,7 @@ class AISView:
else:
latsuff = ""
lat = abs(lat)
- lat = gps.client.deg_to_str(gps.client.deg_dd, lat)
+ lat = gps.client.deg_to_str(self.deg_type, lat)
if lon < 0:
lonsuff = "W"
elif lon > 0:
@@ -394,7 +395,7 @@ class Base:
aisframe = gtk.Frame(label="AIS Data")
self.aisbox.add(aisframe)
- self.aisview = AISView()
+ self.aisview = AISView(self.deg_type)
aisframe.add(self.aisview.widget)
self.window.show_all()