* src/gramps_main.py: dropped New Database message. After all, it should
be incredibly obvious. * src/Utils.py: create_id to generate random internal ID * src/RelLib.py: new internal ID support * src/AddSpouse.py: bug fixes * src/ChooseParents.py: bug fixes * src/PeopleModel.py: bug fixes * src/PeopleView.py: bug fixes * src/FamilyView.py: bug fixes * src/Bookmarks.py: support for new internal IDs * src/EditPerson.py: support for new internal IDs * src/plugins/ReadGedcom.py: handle new internal IDs svn: r3233
This commit is contained in:
14
src/Utils.py
14
src/Utils.py
@ -28,6 +28,7 @@
|
||||
import string
|
||||
import os
|
||||
import locale
|
||||
import time
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -53,6 +54,15 @@ import GrampsMime
|
||||
#-------------------------------------------------------------------------
|
||||
from gettext import gettext as _
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Random
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import random
|
||||
|
||||
rand = random.Random(time.time())
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# modified flag
|
||||
@ -527,3 +537,7 @@ def unbold_label(label):
|
||||
label.set_text(text)
|
||||
label.set_use_markup(0)
|
||||
|
||||
def create_id():
|
||||
return str("%08x%08x" % (
|
||||
int(time.time()*10000),
|
||||
rand.randint(0,0x7fffffff)))
|
||||
|
Reference in New Issue
Block a user