GEPS008: Moved PlaceUtils module
svn: r19805
This commit is contained in:
parent
20682993b5
commit
cfd59da40f
@ -5,7 +5,6 @@
|
|||||||
src/const.py
|
src/const.py
|
||||||
src/gramps.py
|
src/gramps.py
|
||||||
src/LdsUtils.py
|
src/LdsUtils.py
|
||||||
src/PlaceUtils.py
|
|
||||||
src/TransUtils.py
|
src/TransUtils.py
|
||||||
src/Utils.py
|
src/Utils.py
|
||||||
|
|
||||||
@ -324,6 +323,9 @@ src/gen/proxy/private.py
|
|||||||
src/gen/simple/_simpleaccess.py
|
src/gen/simple/_simpleaccess.py
|
||||||
src/gen/simple/_simpletable.py
|
src/gen/simple/_simpletable.py
|
||||||
|
|
||||||
|
# gen.utils
|
||||||
|
src/gen/utils/place.py
|
||||||
|
|
||||||
# gui - GUI code
|
# gui - GUI code
|
||||||
src/gui/aboutdialog.py
|
src/gui/aboutdialog.py
|
||||||
src/gui/clipboard.py
|
src/gui/clipboard.py
|
||||||
|
@ -21,8 +21,7 @@ gdir_PYTHON = \
|
|||||||
LdsUtils.py \
|
LdsUtils.py \
|
||||||
MacTransUtils.py\
|
MacTransUtils.py\
|
||||||
TransUtils.py\
|
TransUtils.py\
|
||||||
Utils.py\
|
Utils.py
|
||||||
PlaceUtils.py
|
|
||||||
|
|
||||||
# Clean up all the byte-compiled files
|
# Clean up all the byte-compiled files
|
||||||
MOSTLYCLEANFILES = *pyc *pyo
|
MOSTLYCLEANFILES = *pyc *pyo
|
||||||
|
@ -35,7 +35,7 @@ from gen.ggettext import gettext as _
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gen.filters.rules import Rule
|
from gen.filters.rules import Rule
|
||||||
import PlaceUtils
|
from gen.utils import conv_lat_lon
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -82,7 +82,7 @@ class InLatLonNeighborhood(Rule):
|
|||||||
self.list[1] = '0.0'
|
self.list[1] = '0.0'
|
||||||
|
|
||||||
#we allow a band instead of a triangle
|
#we allow a band instead of a triangle
|
||||||
self.lat, self.lon = PlaceUtils.conv_lat_lon(self.list[0],self.list[1],"D.D8")
|
self.lat, self.lon = conv_lat_lon(self.list[0],self.list[1],"D.D8")
|
||||||
if self.lat is not None and self.lon is not None :
|
if self.lat is not None and self.lon is not None :
|
||||||
self.lat = float(self.lat)
|
self.lat = float(self.lat)
|
||||||
self.lon = float(self.lon)
|
self.lon = float(self.lon)
|
||||||
@ -138,7 +138,7 @@ class InLatLonNeighborhood(Rule):
|
|||||||
if not ( place.get_latitude().strip and place.get_longitude().strip() ):
|
if not ( place.get_latitude().strip and place.get_longitude().strip() ):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
latpl, lonpl = PlaceUtils.conv_lat_lon(place.get_latitude(),
|
latpl, lonpl = conv_lat_lon(place.get_latitude(),
|
||||||
place.get_longitude(), "D.D8")
|
place.get_longitude(), "D.D8")
|
||||||
if latpl and lonpl :
|
if latpl and lonpl :
|
||||||
latpl = float(latpl)
|
latpl = float(latpl)
|
||||||
|
@ -11,7 +11,8 @@ pkgpython_PYTHON = \
|
|||||||
callback.py \
|
callback.py \
|
||||||
callman.py \
|
callman.py \
|
||||||
configmanager.py \
|
configmanager.py \
|
||||||
fallback.py
|
fallback.py \
|
||||||
|
place.py
|
||||||
|
|
||||||
pkgpyexecdir = @pkgpyexecdir@/gen/utils
|
pkgpyexecdir = @pkgpyexecdir@/gen/utils
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
Generic utilities useful for users of the gen package
|
Generic utilities useful for users of the gen package
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from fallback import *
|
|
||||||
from configmanager import ConfigManager
|
|
||||||
from callback import Callback
|
from callback import Callback
|
||||||
|
from configmanager import ConfigManager
|
||||||
|
from fallback import *
|
||||||
|
from place import conv_lat_lon
|
||||||
|
@ -51,7 +51,7 @@ from displaytabs import (GrampsTab, LocationEmbedList, CitationEmbedList,
|
|||||||
GalleryTab, NoteTab, WebEmbedList, PlaceBackRefList)
|
GalleryTab, NoteTab, WebEmbedList, PlaceBackRefList)
|
||||||
from gui.widgets import MonitoredEntry, PrivacyButton
|
from gui.widgets import MonitoredEntry, PrivacyButton
|
||||||
from gen.errors import ValidationError
|
from gen.errors import ValidationError
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
from gui.dialog import ErrorDialog
|
from gui.dialog import ErrorDialog
|
||||||
from gui.glade import Glade
|
from gui.glade import Glade
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ import gtk
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import Utils
|
import Utils
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
from gui.views.treemodels.flatbasemodel import FlatBaseModel
|
from gui.views.treemodels.flatbasemodel import FlatBaseModel
|
||||||
from gui.views.treemodels.treebasemodel import TreeBaseModel
|
from gui.views.treemodels.treebasemodel import TreeBaseModel
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ from gen.errors import DatabaseError
|
|||||||
from gui.plug.export import WriterOptionBox
|
from gui.plug.export import WriterOptionBox
|
||||||
from gen.updatecallback import UpdateCallback
|
from gen.updatecallback import UpdateCallback
|
||||||
from Utils import media_path_full
|
from Utils import media_path_full
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -65,7 +65,7 @@ from gen.lib import Date
|
|||||||
|
|
||||||
import gen.mime
|
import gen.mime
|
||||||
import Utils
|
import Utils
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
|
|
||||||
from gen.db import DbTxn
|
from gen.db import DbTxn
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
from gen.plug import Gramplet
|
from gen.plug import Gramplet
|
||||||
from gui.widgets import Photo
|
from gui.widgets import Photo
|
||||||
from gen.ggettext import gettext as _
|
from gen.ggettext import gettext as _
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
import Utils
|
import Utils
|
||||||
import gtk
|
import gtk
|
||||||
import pango
|
import pango
|
||||||
|
@ -35,7 +35,7 @@ Base class for map services. Example: open place in openstreetmap.org
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
from gui.display import display_url
|
from gui.display import display_url
|
||||||
|
|
||||||
class MapService():
|
class MapService():
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
from gui.listmodel import ListModel
|
from gui.listmodel import ListModel
|
||||||
from gen.ggettext import gettext as _
|
from gen.ggettext import gettext as _
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
from fractions import Fraction
|
from fractions import Fraction
|
||||||
import gen.lib
|
import gen.lib
|
||||||
import gen.datehandler
|
import gen.datehandler
|
||||||
|
@ -52,7 +52,7 @@ import gen.lib
|
|||||||
import config
|
import config
|
||||||
import gen.datehandler
|
import gen.datehandler
|
||||||
from gen.display.name import displayer as _nd
|
from gen.display.name import displayer as _nd
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
from gui.views.navigationview import NavigationView
|
from gui.views.navigationview import NavigationView
|
||||||
from gui.views.bookmarks import PersonBookmarks
|
from gui.views.bookmarks import PersonBookmarks
|
||||||
from maps import constants
|
from maps import constants
|
||||||
|
@ -59,7 +59,7 @@ import Utils
|
|||||||
import config
|
import config
|
||||||
import gen.datehandler
|
import gen.datehandler
|
||||||
from gen.display.name import displayer as _nd
|
from gen.display.name import displayer as _nd
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
from gui.views.pageview import PageView
|
from gui.views.pageview import PageView
|
||||||
from gui.editors import EditPlace
|
from gui.editors import EditPlace
|
||||||
from gui.selectors.selectplace import SelectPlace
|
from gui.selectors.selectplace import SelectPlace
|
||||||
|
@ -52,7 +52,7 @@ import gen.lib
|
|||||||
import config
|
import config
|
||||||
import gen.datehandler
|
import gen.datehandler
|
||||||
from gen.display.name import displayer as _nd
|
from gen.display.name import displayer as _nd
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
from gui.views.navigationview import NavigationView
|
from gui.views.navigationview import NavigationView
|
||||||
from gui.views.bookmarks import FamilyBookmarks
|
from gui.views.bookmarks import FamilyBookmarks
|
||||||
from maps import constants
|
from maps import constants
|
||||||
|
@ -59,7 +59,7 @@ import Utils
|
|||||||
import config
|
import config
|
||||||
import gen.datehandler
|
import gen.datehandler
|
||||||
from gen.display.name import displayer as _nd
|
from gen.display.name import displayer as _nd
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
from gui.views.pageview import PageView
|
from gui.views.pageview import PageView
|
||||||
from gui.editors import EditPlace
|
from gui.editors import EditPlace
|
||||||
from gui.selectors.selectplace import SelectPlace
|
from gui.selectors.selectplace import SelectPlace
|
||||||
|
@ -55,7 +55,7 @@ import gen.lib
|
|||||||
import config
|
import config
|
||||||
import gen.datehandler
|
import gen.datehandler
|
||||||
from gen.display.name import displayer as _nd
|
from gen.display.name import displayer as _nd
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
from gui.views.navigationview import NavigationView
|
from gui.views.navigationview import NavigationView
|
||||||
from gui.views.bookmarks import PersonBookmarks
|
from gui.views.bookmarks import PersonBookmarks
|
||||||
from maps import constants
|
from maps import constants
|
||||||
|
@ -60,7 +60,7 @@ import Utils
|
|||||||
import config
|
import config
|
||||||
import gen.datehandler
|
import gen.datehandler
|
||||||
from gen.display.name import displayer as _nd
|
from gen.display.name import displayer as _nd
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
from gui.views.pageview import PageView
|
from gui.views.pageview import PageView
|
||||||
from gui.editors import EditPlace
|
from gui.editors import EditPlace
|
||||||
from gui.selectors.selectplace import SelectPlace
|
from gui.selectors.selectplace import SelectPlace
|
||||||
|
@ -59,7 +59,7 @@ import gen.lib
|
|||||||
import Utils
|
import Utils
|
||||||
import config
|
import config
|
||||||
from gen.display.name import displayer as _nd
|
from gen.display.name import displayer as _nd
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
from gui.views.pageview import PageView
|
from gui.views.pageview import PageView
|
||||||
from gui.editors import EditPlace
|
from gui.editors import EditPlace
|
||||||
from gui.selectors.selectplace import SelectPlace
|
from gui.selectors.selectplace import SelectPlace
|
||||||
|
@ -105,7 +105,7 @@ from libhtml import Html
|
|||||||
from libhtmlbackend import HtmlBackend, process_spaces
|
from libhtmlbackend import HtmlBackend, process_spaces
|
||||||
|
|
||||||
from libgedcom import make_gedcom_date
|
from libgedcom import make_gedcom_date
|
||||||
from PlaceUtils import conv_lat_lon
|
from gen.utils import conv_lat_lon
|
||||||
from gui.pluginmanager import GuiPluginManager
|
from gui.pluginmanager import GuiPluginManager
|
||||||
|
|
||||||
from gen.relationship import get_relationship_calculator
|
from gen.relationship import get_relationship_calculator
|
||||||
|
Loading…
Reference in New Issue
Block a user