diff --git a/ChangeLog b/ChangeLog index 14a743aba..651bd810b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-05-19 Don Allingham * src/GrampsDb/_GrampsDbBase.py: repository does not have a media_list + * src/DataViews/_MapView.py: use config value to determine if online + maps should be used + * src/GrampsCfg.py: online map config value + * src/Config/_GrampsCOnfigKeys.py: online map config value + * daa/gramps.schema.in: online map config value 2006-05-19 Alex Roitman * src/GrampsDb/_DbUtils.py (db_copy): Copy custom types. diff --git a/data/gramps.schemas.in b/data/gramps.schemas.in index eaa5729a7..db1487fca 100644 --- a/data/gramps.schemas.in +++ b/data/gramps.schemas.in @@ -3,6 +3,18 @@ + + /schemas/apps/gramps/preferences/online-maps + /apps/gramps/preferences/online-maps + gramps + bool + 0 + + Use online maps + If True, the Map View will connect to OpenGIS servers to download maps. + + + /schemas/apps/gramps/preferences/family-details /apps/gramps/preferences/family-details diff --git a/src/Config/_GrampsConfigKeys.py b/src/Config/_GrampsConfigKeys.py index c49f17a44..0095f6c0c 100644 --- a/src/Config/_GrampsConfigKeys.py +++ b/src/Config/_GrampsConfigKeys.py @@ -1,3 +1,4 @@ +ONLINE_MAPS = ('preferences','online-maps', 0) FAMILY_DETAILS = ('preferences','family-details', 0) COMPLETE_COLOR = ('preferences','complete-color', 2) TODO_COLOR = ('preferences','todo-color', 2) @@ -52,10 +53,11 @@ WEBSITE_DIRECTORY = ('paths','website-directory', 2) default_value = { + ONLINE_MAPS : False, FAMILY_DETAILS : True, - COMPLETE_COLOR : '#FF0000', - TODO_COLOR : '#FF0000', - CUSTOM_MARKER_COLOR : '#00FF00', + COMPLETE_COLOR : '#008b00', + TODO_COLOR : '#ff0000', + CUSTOM_MARKER_COLOR : '#8b008b', FAMILY_WARN : True, HIDE_EP_MSG : False, LAST_VIEW : 0, diff --git a/src/DataViews/_MapView.py b/src/DataViews/_MapView.py index 5ccd8213b..152e9254c 100644 --- a/src/DataViews/_MapView.py +++ b/src/DataViews/_MapView.py @@ -35,8 +35,6 @@ import urllib2 import tempfile from xml.dom.minidom import parseString as xmlStringParser -use_online_map = False - log = logging.getLogger(".") #------------------------------------------------------------------------- @@ -54,8 +52,11 @@ import gtk.gdk # #------------------------------------------------------------------------- import PageView +import Config import const +use_online_map = Config.get(Config.ONLINE_MAPS) + # Some initial places for debugging glob_loc_data = [ # (Name, longitude, latitude) ("_Center", 0,0), diff --git a/src/GrampsCfg.py b/src/GrampsCfg.py index fcf47be3d..17d606b2a 100644 --- a/src/GrampsCfg.py +++ b/src/GrampsCfg.py @@ -268,6 +268,7 @@ class GrampsPreferences(ManagedWindow.ManagedWindow): self.add_checkbox(table, _('Automatically load last database'), 0, Config.AUTOLOAD) self.add_checkbox(table, _('Enable spelling checker'), 1, Config.SPELLCHECK) self.add_checkbox(table, _('Display Tip of the Day'), 2, Config.USE_TIPS) + self.add_checkbox(table, _('Download maps online'), 3, Config.ONLINE_MAPS) return table