From: javiplx Date: Sat, 14 May 2011 19:26:34 +0000 (+0000) Subject: BUGFIX : store current GPS only if not using mapper, even in case that configuration... X-Git-Tag: hildon-wrapped~6 X-Git-Url: http://vcs.maemo.org/git/?p=wifihood;a=commitdiff_plain;h=77bf740b27f0831ad56680c7e8b8bb048bc893cd BUGFIX : store current GPS only if not using mapper, even in case that configuration was changed after starting git-svn-id: file:///svnroot/wifihood/trunk@172 c51dfc6a-5949-4919-9c8e-f207a149c383 --- diff --git a/wifiscanner/wifimap/config.py b/wifiscanner/wifimap/config.py index 99eeeab..35d9538 100644 --- a/wifiscanner/wifimap/config.py +++ b/wifiscanner/wifimap/config.py @@ -29,7 +29,6 @@ class Configuration : self.store_gps = client.get_bool( "/apps/wifihood/store-gps" ) if self.use_mapper : # FIXME : This will reset the stored default - self.store_gps = False self.lat = client.get_float( "/apps/maemo/maemo-mapper/center_latitude" ) self.lon = client.get_float( "/apps/maemo/maemo-mapper/center_longitude" ) self.zoom = client.get_int( "/apps/maemo/maemo-mapper/zoom" ) @@ -47,14 +46,14 @@ class Configuration : self.zoom = 15 def set_latlon ( self , ( lat , lon ) ) : - if self.store_gps : + if self.store_gps and not self.use_mapper : client = gconf.client_get_default() client.set_float( "/apps/wifihood/latitude" , lat ) client.set_float( "/apps/wifihood/longitude" , lon ) self.lat , self.lon = lat , lon def set_zoom ( self , zoom ) : - if self.store_gps or self._type == 'scanner' : + if self._type == 'scanner' or ( self.store_gps and not self.use_mapper ) : client = gconf.client_get_default() client.set_int( "/apps/wifihood/%s-zoom" % self._type , zoom ) self.zoom = zoom