GEPS008: Moved LdsUtils module
svn: r19902
This commit is contained in:
parent
742c3d770e
commit
e2a80ded2a
@ -4,7 +4,6 @@
|
|||||||
#
|
#
|
||||||
src/const.py
|
src/const.py
|
||||||
src/gramps.py
|
src/gramps.py
|
||||||
src/LdsUtils.py
|
|
||||||
src/TransUtils.py
|
src/TransUtils.py
|
||||||
src/Utils.py
|
src/Utils.py
|
||||||
|
|
||||||
@ -325,6 +324,7 @@ src/gen/simple/_simpletable.py
|
|||||||
|
|
||||||
# gen.utils
|
# gen.utils
|
||||||
src/gen/utils/alive.py
|
src/gen/utils/alive.py
|
||||||
|
src/gen/utils/lds.py
|
||||||
src/gen/utils/place.py
|
src/gen/utils/place.py
|
||||||
|
|
||||||
# gui - GUI code
|
# gui - GUI code
|
||||||
|
@ -15,7 +15,6 @@ gdirdir=$(prefix)/share/gramps
|
|||||||
gdir_PYTHON = \
|
gdir_PYTHON = \
|
||||||
const.py\
|
const.py\
|
||||||
gramps.py\
|
gramps.py\
|
||||||
LdsUtils.py \
|
|
||||||
MacTransUtils.py\
|
MacTransUtils.py\
|
||||||
TransUtils.py\
|
TransUtils.py\
|
||||||
Utils.py
|
Utils.py
|
||||||
|
@ -14,6 +14,7 @@ pkgpython_PYTHON = \
|
|||||||
configmanager.py \
|
configmanager.py \
|
||||||
fallback.py \
|
fallback.py \
|
||||||
image.py \
|
image.py \
|
||||||
|
lds.py \
|
||||||
place.py \
|
place.py \
|
||||||
referent.py
|
referent.py
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ import gtk
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import gen.datehandler
|
import gen.datehandler
|
||||||
import LdsUtils
|
from gen.utils.lds import TEMPLES
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -59,7 +59,7 @@ class LdsModel(gtk.ListStore):
|
|||||||
lds_ord.type2str(),
|
lds_ord.type2str(),
|
||||||
gen.datehandler.get_date(lds_ord),
|
gen.datehandler.get_date(lds_ord),
|
||||||
lds_ord.status2str(),
|
lds_ord.status2str(),
|
||||||
LdsUtils.TEMPLES.name(lds_ord.get_temple()),
|
TEMPLES.name(lds_ord.get_temple()),
|
||||||
self.column_place(lds_ord),
|
self.column_place(lds_ord),
|
||||||
lds_ord,
|
lds_ord,
|
||||||
])
|
])
|
||||||
|
@ -47,7 +47,7 @@ import gtk
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import gen.lib
|
import gen.lib
|
||||||
from gen.display.name import displayer as name_displayer
|
from gen.display.name import displayer as name_displayer
|
||||||
import LdsUtils
|
from gen.utils.lds import TEMPLES
|
||||||
from gui.glade import Glade
|
from gui.glade import Glade
|
||||||
from editsecondary import EditSecondary
|
from editsecondary import EditSecondary
|
||||||
from objectentries import PlaceEntry
|
from objectentries import PlaceEntry
|
||||||
@ -205,7 +205,7 @@ class EditLdsOrd(EditSecondary):
|
|||||||
self.top.get_object('temple'),
|
self.top.get_object('temple'),
|
||||||
self.obj.set_temple,
|
self.obj.set_temple,
|
||||||
self.obj.get_temple,
|
self.obj.get_temple,
|
||||||
LdsUtils.TEMPLES.name_code_data(),
|
TEMPLES.name_code_data(),
|
||||||
self.db.readonly)
|
self.db.readonly)
|
||||||
self.track_ref_for_deletion('temple_menu')
|
self.track_ref_for_deletion('temple_menu')
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ class EditFamilyLdsOrd(EditSecondary):
|
|||||||
self.top.get_object('temple'),
|
self.top.get_object('temple'),
|
||||||
self.obj.set_temple,
|
self.obj.set_temple,
|
||||||
self.obj.get_temple,
|
self.obj.get_temple,
|
||||||
LdsUtils.TEMPLES.name_code_data(),
|
TEMPLES.name_code_data(),
|
||||||
self.db.readonly)
|
self.db.readonly)
|
||||||
self.track_ref_for_deletion('temple_menu')
|
self.track_ref_for_deletion('temple_menu')
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ import gen.lib
|
|||||||
from gen.db import DbTxn
|
from gen.db import DbTxn
|
||||||
from gen.updatecallback import UpdateCallback
|
from gen.updatecallback import UpdateCallback
|
||||||
import gen.mime
|
import gen.mime
|
||||||
import LdsUtils
|
from gen.utils.lds import TEMPLES
|
||||||
import Utils
|
import Utils
|
||||||
from gen.datehandler._dateparser import DateParser
|
from gen.datehandler._dateparser import DateParser
|
||||||
from gen.db.dbconst import EVENT_KEY
|
from gen.db.dbconst import EVENT_KEY
|
||||||
@ -7136,10 +7136,10 @@ class GedcomParser(UpdateCallback):
|
|||||||
|
|
||||||
def __extract_temple(self, line):
|
def __extract_temple(self, line):
|
||||||
def get_code(code):
|
def get_code(code):
|
||||||
if LdsUtils.TEMPLES.is_valid_code(code):
|
if TEMPLES.is_valid_code(code):
|
||||||
return code
|
return code
|
||||||
elif LdsUtils.TEMPLES.is_valid_name(code):
|
elif TEMPLES.is_valid_name(code):
|
||||||
return LdsUtils.TEMPLES.code(code)
|
return TEMPLES.code(code)
|
||||||
|
|
||||||
code = get_code(line.data)
|
code = get_code(line.data)
|
||||||
if code:
|
if code:
|
||||||
|
@ -54,7 +54,7 @@ import gen.mime
|
|||||||
from gui.plug import tool
|
from gui.plug import tool
|
||||||
import Utils
|
import Utils
|
||||||
from gui.utils import ProgressMeter
|
from gui.utils import ProgressMeter
|
||||||
import LdsUtils
|
from gen.utils.lds import TEMPLES
|
||||||
from gen.db.dbconst import *
|
from gen.db.dbconst import *
|
||||||
import const
|
import const
|
||||||
|
|
||||||
@ -1535,7 +1535,7 @@ class TestcaseGenerator(tool.BatchTool):
|
|||||||
|
|
||||||
if isinstance(o,gen.lib.LdsOrd):
|
if isinstance(o,gen.lib.LdsOrd):
|
||||||
if randint(0,1) == 1:
|
if randint(0,1) == 1:
|
||||||
o.set_temple( choice( LdsUtils.TEMPLES.name_code_data())[1])
|
o.set_temple( choice(TEMPLES.name_code_data())[1])
|
||||||
|
|
||||||
if issubclass(o.__class__,gen.lib.ldsordbase.LdsOrdBase):
|
if issubclass(o.__class__,gen.lib.ldsordbase.LdsOrdBase):
|
||||||
while randint(0,1) == 1:
|
while randint(0,1) == 1:
|
||||||
|
Loading…
Reference in New Issue
Block a user