diff --git a/gramps/gen/config.py b/gramps/gen/config.py index faf9e11b3..6ea404ab8 100644 --- a/gramps/gen/config.py +++ b/gramps/gen/config.py @@ -263,6 +263,7 @@ register('preferences.iprefix', 'I%04d') register('preferences.name-format', 1) register('preferences.place-format', 0) register('preferences.place-auto', True) +register('preferences.coord-format', 0) register('preferences.patronimic-surname', False) register('preferences.no-given-text', "[%s]" % _("Missing Given Name")) register('preferences.no-record-text', "[%s]" % _("Missing Record")) diff --git a/gramps/gen/plug/report/stdoptions.py b/gramps/gen/plug/report/stdoptions.py index 638dcd050..a712c7625 100644 --- a/gramps/gen/plug/report/stdoptions.py +++ b/gramps/gen/plug/report/stdoptions.py @@ -37,7 +37,7 @@ from ..menu import EnumeratedListOption, BooleanOption, NumberOption from ...proxy import PrivateProxyDb, LivingProxyDb from ...utils.grampslocale import GrampsLocale from ...const import GRAMPS_LOCALE as glocale -from ...utils.place import coord_formats +from ...utils.place import coord_formats, coord_formats_desc _ = glocale.translation.sgettext # _T_ is a gramps-defined keyword -- see po/update_po.py and po/genpot.sh @@ -383,9 +383,9 @@ def add_coordinates_format_option(menu, category): Insert an option for changing the report's coordinates format to a report-specific format instead of the user's Edit=>Preferences choice """ - coord_format = EnumeratedListOption(_("Coordinates format"), -1) + coord_format = EnumeratedListOption(_("Coordinates format"), 0) for number, fmt in enumerate(coord_formats): - coord_format.add_item(number, fmt) + coord_format.add_item(number, fmt + '\t' + coord_formats_desc[number]) coord_format.set_help(_("Select the format to display coordinates")) menu.add_option(category, "coord_format", coord_format) return coord_format diff --git a/gramps/gen/utils/place.py b/gramps/gen/utils/place.py index 82622f22b..df8e39f04 100644 --- a/gramps/gen/utils/place.py +++ b/gramps/gen/utils/place.py @@ -98,6 +98,13 @@ coord_formats = ( # 'ISO-DMS' ISO 6709 degree, minutes, seconds notation ) +coord_formats_desc = ( + _("Degree, minutes, seconds notation"), + _("Degree, minutes, seconds notation with :"), + _("Degree notation, 4 decimals"), + _("Degree notation, 8 decimals (precision like ISO-DMS)"), + _("Output format for the Swedish coordinate system RT90"), + ) #------------------ # diff --git a/gramps/gui/configure.py b/gramps/gui/configure.py index 0405700d1..8d45c8bc2 100644 --- a/gramps/gui/configure.py +++ b/gramps/gui/configure.py @@ -57,7 +57,7 @@ from gramps.gen.display.name import NameDisplayError from gramps.gen.display.place import displayer as _pd from gramps.gen.utils.alive import update_constants from gramps.gen.utils.file import media_path -from gramps.gen.utils.place import coord_formats +from gramps.gen.utils.place import coord_formats, coord_formats_desc from gramps.gen.utils.keyword import (get_keywords, get_translations, get_translation_from_keyword, get_keyword_from_translation) @@ -1145,8 +1145,8 @@ class GrampsPreferences(ConfigureDialog): Called to rebuild the coordinates format list. """ model = Gtk.ListStore(str) - for fmt in coord_formats: - model.append([fmt]) + for number, fmt in enumerate(coord_formats): + model.append([fmt + '\t' + coord_formats_desc[number]]) self.cformat.set_model(model) self.cformat.set_active(0) @@ -1244,8 +1244,6 @@ class GrampsPreferences(ConfigureDialog): self.cformat.pack_start(renderer, True) self.cformat.add_attribute(renderer, "text", 0) self.cb_coord_fmt_rebuild() - if not config.is_set('preferences.coord-format'): - config.register('preferences.coord-format', 0) active = config.get('preferences.coord-format') self.cformat.set_active(active) self.cformat.connect('changed', self.cb_coord_fmt_changed)