* src/AddrEdit.py: use new label scheme for tabs that uses an
icon to indicate used tabs * src/AttrEdit.py: use new label scheme for tabs that uses an icon to indicate used tabs * src/NameEdit.py: use new label scheme for tabs * src/Date.py: incorporate instance check form gramps20 branch * src/EditPerson.py: add additional fields for name edit, handle lds page better, adapt to new label scheme * src/GrampsDbBase.py: fix typos * src/GrampsGEDDB.py: fix undo handling * src/GrampsInMemDB.py: fix undo handling * src/GrampsXMLDB.py: fix undo handling * src/PeopleView.py: don't reselect an already selected person * src/Utils.py: new tab scheme * src/edit_person.glade new tab scheme * src/gramps_main.py: 1->True, 0->False replacements * src/DbPrompter.py: bring up to date with gramps20 branch * src/DisplayModels.py: bring up to date with gramps20 branch * src/ReadGedcom.py: bring up to date with gramps20 branch * src/Relationship.py: bring up to date with gramps20 branch svn: r4406
This commit is contained in:
parent
1153713d67
commit
5c137d199c
22
ChangeLog
22
ChangeLog
@ -1,3 +1,25 @@
|
||||
2005-04-23 Don Allingham <don@gramps-project.org>
|
||||
* src/AddrEdit.py: use new label scheme for tabs that uses an
|
||||
icon to indicate used tabs
|
||||
* src/AttrEdit.py: use new label scheme for tabs that uses an
|
||||
icon to indicate used tabs
|
||||
* src/NameEdit.py: use new label scheme for tabs
|
||||
* src/Date.py: incorporate instance check form gramps20 branch
|
||||
* src/EditPerson.py: add additional fields for name edit, handle
|
||||
lds page better, adapt to new label scheme
|
||||
* src/GrampsDbBase.py: fix typos
|
||||
* src/GrampsGEDDB.py: fix undo handling
|
||||
* src/GrampsInMemDB.py: fix undo handling
|
||||
* src/GrampsXMLDB.py: fix undo handling
|
||||
* src/PeopleView.py: don't reselect an already selected person
|
||||
* src/Utils.py: new tab scheme
|
||||
* src/edit_person.glade new tab scheme
|
||||
* src/gramps_main.py: 1->True, 0->False replacements
|
||||
* src/DbPrompter.py: bring up to date with gramps20 branch
|
||||
* src/DisplayModels.py: bring up to date with gramps20 branch
|
||||
* src/ReadGedcom.py: bring up to date with gramps20 branch
|
||||
* src/Relationship.py: bring up to date with gramps20 branch
|
||||
|
||||
2005-04-23 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||
* src/GrampsDbBase.py (_find_from_handle,find_object_from_handle,
|
||||
find_place_from_handle): Fix typo
|
||||
|
Binary file not shown.
@ -96,8 +96,9 @@ class AddressEditor:
|
||||
self.note_field = self.top.get_widget("addr_note")
|
||||
self.priv = self.top.get_widget("priv")
|
||||
self.slist = self.top.get_widget("slist")
|
||||
self.sources_label = self.top.get_widget("sourcesAddr")
|
||||
self.notes_label = self.top.get_widget("noteAddr")
|
||||
self.sources_label = self.top.get_widget("sources_tab")
|
||||
self.notes_label = self.top.get_widget("note_tab")
|
||||
self.general_label = self.top.get_widget("general_tab")
|
||||
self.flowed = self.top.get_widget("addr_flowed")
|
||||
self.preform = self.top.get_widget("addr_preform")
|
||||
|
||||
@ -123,9 +124,15 @@ class AddressEditor:
|
||||
self.preform.set_active(1)
|
||||
else:
|
||||
self.flowed.set_active(1)
|
||||
Utils.bold_label(self.general_label)
|
||||
else:
|
||||
Utils.unbold_label(self.sources_label)
|
||||
Utils.bold_label(self.general_label)
|
||||
else:
|
||||
Utils.unbold_label(self.general_label)
|
||||
self.addr_date_obj = Date.Date()
|
||||
self.srcreflist = []
|
||||
self.switch_page()
|
||||
|
||||
self.sourcetab = Sources.SourceTab(
|
||||
self.srcreflist, self, self.top, self.window, self.slist,
|
||||
@ -240,8 +247,13 @@ class AddressEditor:
|
||||
self.check(self.addr.get_privacy,self.addr.set_privacy,priv)
|
||||
|
||||
def on_switch_page(self,obj,a,page):
|
||||
self.switch_page()
|
||||
|
||||
def switch_page(self):
|
||||
buf = self.note_field.get_buffer()
|
||||
text = unicode(buf.get_text(buf.get_start_iter(),buf.get_end_iter(),False))
|
||||
start = buf.get_start_iter()
|
||||
stop = buf.get_end_iter()
|
||||
text = unicode(buf.get_text(start,stop,False))
|
||||
if text:
|
||||
Utils.bold_label(self.notes_label)
|
||||
else:
|
||||
|
@ -98,8 +98,9 @@ class AttributeEditor:
|
||||
self.type_field = self.attrib_menu.child
|
||||
self.source_field = self.top.get_widget("attr_source")
|
||||
self.priv = self.top.get_widget("priv")
|
||||
self.sources_label = self.top.get_widget("sourcesAttr")
|
||||
self.notes_label = self.top.get_widget("noteAttr")
|
||||
self.general_label = self.top.get_widget("general_tab")
|
||||
self.sources_label = self.top.get_widget("sources_tab")
|
||||
self.notes_label = self.top.get_widget("note_tab")
|
||||
self.flowed = self.top.get_widget("attr_flowed")
|
||||
self.preform = self.top.get_widget("attr_preform")
|
||||
|
||||
@ -133,9 +134,11 @@ class AttributeEditor:
|
||||
self.note_field.get_buffer().set_text(attrib.get_note())
|
||||
Utils.bold_label(self.notes_label)
|
||||
if attrib.get_note_format() == 1:
|
||||
self.preform.set_active(1)
|
||||
self.preform.set_active(True)
|
||||
else:
|
||||
self.flowed.set_active(1)
|
||||
self.flowed.set_active(True)
|
||||
else:
|
||||
Utils.unbold_label(self.notes_label)
|
||||
|
||||
self.top.signal_autoconnect({
|
||||
"on_help_attr_clicked" : self.on_help_clicked,
|
||||
@ -148,6 +151,7 @@ class AttributeEditor:
|
||||
if parent_window:
|
||||
self.window.set_transient_for(parent_window)
|
||||
self.add_itself_to_menu()
|
||||
self.update_note_page()
|
||||
self.window.show()
|
||||
|
||||
def on_delete_event(self,obj,b):
|
||||
@ -242,8 +246,13 @@ class AttributeEditor:
|
||||
self.check(self.attrib.get_privacy,self.attrib.set_privacy,priv)
|
||||
|
||||
def on_switch_page(self,obj,a,page):
|
||||
self.update_note_page()
|
||||
|
||||
def update_note_page(self):
|
||||
buf = self.note_field.get_buffer()
|
||||
text = unicode(buf.get_text(buf.get_start_iter(),buf.get_end_iter(),False))
|
||||
start = buf.get_start_iter()
|
||||
end = buf.get_end_iter()
|
||||
text = unicode(buf.get_text(start,end,False))
|
||||
if text:
|
||||
Utils.bold_label(self.notes_label)
|
||||
else:
|
||||
|
@ -135,7 +135,10 @@ class Date:
|
||||
Comparison function. Allows the usage of equality tests.
|
||||
This allows you do run statements like 'date1 <= date2'
|
||||
"""
|
||||
return cmp(self.sortval,other.sortval)
|
||||
if isinstance(other,Date):
|
||||
return cmp(self.sortval,other.sortval)
|
||||
else:
|
||||
return -1
|
||||
|
||||
def is_equal(self,other):
|
||||
"""
|
||||
|
@ -297,8 +297,14 @@ class ImportDbPrompter:
|
||||
filename = choose.get_filename()
|
||||
filetype = type_selector.get_value()
|
||||
if filetype == 'auto':
|
||||
filetype = get_mime_type(filename)
|
||||
|
||||
try:
|
||||
filetype = get_mime_type(filename)
|
||||
except RuntimeError,msg:
|
||||
QuestionDialog.ErrorDialog(
|
||||
_("Could not open file: %s") % filename,
|
||||
str(msg))
|
||||
return False
|
||||
|
||||
if filetype == const.app_gramps:
|
||||
choose.destroy()
|
||||
ReadGrdb.importData(self.parent.db,filename)
|
||||
|
@ -111,7 +111,7 @@ class BaseModel(gtk.GenericTreeModel):
|
||||
def on_get_path(self, node):
|
||||
'''returns the tree path (a tuple of indices at the various
|
||||
levels) for a particular node.'''
|
||||
return self.indexlist[node[0]]
|
||||
return self.indexlist[node]
|
||||
|
||||
def on_get_column_type(self,index):
|
||||
return gobject.TYPE_STRING
|
||||
|
@ -85,18 +85,27 @@ class DisplayTrace:
|
||||
msg.write("Python : %s.%s.%s %s\n" % (ver[0],ver[1],ver[2],ver[3]))
|
||||
msg.write("GTK : %s.%s.%s\n" % gtk.gtk_version)
|
||||
msg.write('PyGTK : %d.%d.%d\n' % gtk.pygtk_version)
|
||||
for n in _release_files:
|
||||
if os.path.isfile(n):
|
||||
try:
|
||||
f = open(n)
|
||||
text = f.readline()
|
||||
if n.find('debian') != -1:
|
||||
text = "Debian %s" % text
|
||||
msg.write("OS : %s\n" % text)
|
||||
f.close()
|
||||
break
|
||||
except:
|
||||
pass
|
||||
n = '/etc/lsb-release'
|
||||
if os.path.isfile(n):
|
||||
f = open(n)
|
||||
for line in f.readlines():
|
||||
(val,text) = line.split('=')
|
||||
if val == "DISTRIB_DESCRIPTION":
|
||||
msg.write("OS : %s\n" % text.replace('"',''))
|
||||
f.close()
|
||||
else:
|
||||
for n in _release_files:
|
||||
if os.path.isfile(n):
|
||||
try:
|
||||
f = open(n)
|
||||
text = f.readline()
|
||||
if n.find('debian') != -1:
|
||||
text = "Debian %s" % text
|
||||
msg.write("OS : %s\n" % text)
|
||||
f.close()
|
||||
break
|
||||
except:
|
||||
pass
|
||||
|
||||
traceback.print_exception(data[0],data[1],data[2],None,msg)
|
||||
|
||||
|
@ -128,8 +128,8 @@ class EditPerson:
|
||||
mod = not self.db.readonly
|
||||
|
||||
self.load_obj = None
|
||||
self.top = gtk.glade.XML(const.editPersonFile, "editPerson","gramps")
|
||||
self.window = self.get_widget("editPerson")
|
||||
self.top = gtk.glade.XML(const.editPersonFile, "edit_person","gramps")
|
||||
self.window = self.get_widget("edit_person")
|
||||
self.window.set_title("%s - GRAMPS" % _('Edit Person'))
|
||||
|
||||
self.icon_list = self.top.get_widget("iconlist")
|
||||
@ -211,12 +211,12 @@ class EditPerson:
|
||||
self.gid = self.get_widget("gid")
|
||||
self.gid.set_editable(mod)
|
||||
self.slist = self.get_widget("slist")
|
||||
self.general_label = self.get_widget("general_label")
|
||||
self.names_label = self.get_widget("names_label")
|
||||
self.attr_label = self.get_widget("attr_label")
|
||||
self.addr_label = self.get_widget("addr_label")
|
||||
self.notes_label = self.get_widget("notes_label")
|
||||
self.sources_label = self.get_widget("sources_label")
|
||||
self.events_label = self.get_widget("events_label")
|
||||
self.inet_label = self.get_widget("inet_label")
|
||||
self.gallery_label = self.get_widget("gallery_label")
|
||||
self.lds_tab = self.get_widget("lds_tab")
|
||||
@ -264,29 +264,33 @@ class EditPerson:
|
||||
else:
|
||||
self.srcreflist = []
|
||||
|
||||
#Utils.bold_label(self.general_label)
|
||||
#if self.srcreflist:
|
||||
# Utils.bold_label(self.sources_label)
|
||||
#if self.nlist:
|
||||
# Utils.bold_label(self.names_label)
|
||||
#if self.alist:
|
||||
# Utils.bold_label(self.attr_label)
|
||||
#if self.ulist:
|
||||
# Utils.bold_label(self.inet_label)
|
||||
#if self.plist:
|
||||
# Utils.bold_label(self.addr_label)
|
||||
#if self.person.get_media_list():
|
||||
# Utils.bold_label(self.gallery_label)
|
||||
if self.event_list:
|
||||
Utils.bold_label(self.events_label)
|
||||
if self.srcreflist:
|
||||
Utils.bold_label(self.sources_label)
|
||||
if self.nlist:
|
||||
Utils.bold_label(self.names_label)
|
||||
if self.alist:
|
||||
Utils.bold_label(self.attr_label)
|
||||
if self.ulist:
|
||||
Utils.bold_label(self.inet_label)
|
||||
if self.plist:
|
||||
Utils.bold_label(self.addr_label)
|
||||
if self.person.get_media_list():
|
||||
Utils.bold_label(self.gallery_label)
|
||||
|
||||
# event display
|
||||
|
||||
event_default = [ 'Event', 'Description', 'Date', 'Place' ]
|
||||
event_default = [ 'Event', 'Description', 'Date', 'Place',
|
||||
'Source', 'Note' ]
|
||||
self.event_trans = TransTable.TransTable(event_default)
|
||||
evalues = {
|
||||
'Event' : (_('Event'),-1,150),
|
||||
'Event' : (_('Event'),-1,125),
|
||||
'Description' : (_('Description'),-1,150),
|
||||
'Date' : (_('Date'),-1,100),
|
||||
'Place' : (_('Place'),-1,100)
|
||||
'Place' : (_('Place'),-1,100),
|
||||
'Source' : (_(':Source'),-1,50),
|
||||
'Note' : (_(':Note'),-1,50)
|
||||
}
|
||||
|
||||
if not self.db.readonly:
|
||||
@ -315,7 +319,9 @@ class EditPerson:
|
||||
self.on_update_addr_clicked)
|
||||
|
||||
# name display
|
||||
ntitles = [(_('Name'),-1,250),(_('Type'),-1,100)]
|
||||
ntitles = [(_('Family Name'),-1,250),(_('Prefix'),-1,50),
|
||||
(_('Given Name'),-1,200),(_('Suffix'),-1,50),
|
||||
(_('Type'),-1,100)]
|
||||
self.ntree = ListModel.ListModel(self.name_list,ntitles,
|
||||
self.on_name_select_row)
|
||||
self.ntree.tree.connect('event',self.aka_double_click)
|
||||
@ -340,16 +346,12 @@ class EditPerson:
|
||||
self.lds_endowment = RelLib.LdsOrd(self.person.get_lds_endowment())
|
||||
self.lds_sealing = RelLib.LdsOrd(self.person.get_lds_sealing())
|
||||
|
||||
if GrampsKeys.get_uselds() \
|
||||
or (not self.lds_baptism.is_empty()) \
|
||||
or (not self.lds_endowment.is_empty()) \
|
||||
or (not self.lds_sealing.is_empty()):
|
||||
self.get_widget("lds_tab").show()
|
||||
self.get_widget("lds_page").show()
|
||||
#if (not self.lds_baptism.is_empty()) \
|
||||
# or (not self.lds_endowment.is_empty()) \
|
||||
# or (not self.lds_sealing.is_empty()):
|
||||
# Utils.bold_label(self.lds_tab)
|
||||
self.get_widget("lds_tab").show()
|
||||
self.get_widget("lds_page").show()
|
||||
if (not self.lds_baptism.is_empty()) \
|
||||
or (not self.lds_endowment.is_empty()) \
|
||||
or (not self.lds_sealing.is_empty()):
|
||||
Utils.bold_label(self.lds_tab)
|
||||
|
||||
types = const.NameTypesMap.get_values()
|
||||
types.sort()
|
||||
@ -366,7 +368,7 @@ class EditPerson:
|
||||
self.preform.set_active(1)
|
||||
else:
|
||||
self.flowed.set_active(1)
|
||||
#Utils.bold_label(self.notes_label)
|
||||
Utils.bold_label(self.notes_label)
|
||||
|
||||
self.name_list.drag_dest_set(gtk.DEST_DEFAULT_ALL,
|
||||
[DdTargets.NAME.target()],
|
||||
@ -678,7 +680,6 @@ class EditPerson:
|
||||
self.ldssealstat = self.get_widget("sealstat")
|
||||
self.ldssealstat.set_sensitive(not self.db.readonly)
|
||||
|
||||
|
||||
self.bstat = self.lds_field(
|
||||
self.lds_baptism, self.ldsbap_temple,
|
||||
self.ldsbap_date, self.ldsbapplace)
|
||||
@ -968,13 +969,16 @@ class EditPerson:
|
||||
self.ntree.clear()
|
||||
self.nmap = {}
|
||||
for name in self.nlist:
|
||||
node = self.ntree.add([name.get_name(),_(name.get_type())],name)
|
||||
node = self.ntree.add([
|
||||
name.get_surname(),name.get_surname_prefix(),
|
||||
name.get_first_name(), name.get_suffix(),
|
||||
_(name.get_type())],name)
|
||||
self.nmap[str(name)] = node
|
||||
if self.nlist:
|
||||
self.ntree.select_row(0)
|
||||
# Utils.bold_label(self.names_label)
|
||||
# else:
|
||||
# Utils.unbold_label(self.names_label)
|
||||
Utils.bold_label(self.names_label)
|
||||
else:
|
||||
Utils.unbold_label(self.names_label)
|
||||
|
||||
def redraw_url_list(self):
|
||||
"""redraws the url list, disabling the go button if no url
|
||||
@ -988,12 +992,10 @@ class EditPerson:
|
||||
if len(self.ulist) > 0:
|
||||
self.web_go.set_sensitive(False)
|
||||
self.wtree.select_row(0)
|
||||
# Utils.bold_label(self.inet_label)
|
||||
Utils.bold_label(self.inet_label)
|
||||
else:
|
||||
self.web_go.set_sensitive(False)
|
||||
# self.web_url.set_text("")
|
||||
# self.web_description.set_text("")
|
||||
# Utils.unbold_label(self.inet_label)
|
||||
Utils.unbold_label(self.inet_label)
|
||||
|
||||
def redraw_addr_list(self):
|
||||
"""Redraws the address list"""
|
||||
@ -1006,9 +1008,9 @@ class EditPerson:
|
||||
self.pmap[str(addr)] = node
|
||||
if self.plist:
|
||||
self.ptree.select_row(0)
|
||||
# Utils.bold_label(self.addr_label)
|
||||
# else:
|
||||
# Utils.unbold_label(self.addr_label)
|
||||
Utils.bold_label(self.addr_label)
|
||||
else:
|
||||
Utils.unbold_label(self.addr_label)
|
||||
|
||||
def redraw_attr_list(self):
|
||||
"""redraws the attribute list for the person"""
|
||||
@ -1019,9 +1021,9 @@ class EditPerson:
|
||||
self.amap[str(attr)] = node
|
||||
if self.alist:
|
||||
self.atree.select_row(0)
|
||||
# Utils.bold_label(self.attr_label)
|
||||
# else:
|
||||
# Utils.unbold_label(self.attr_label)
|
||||
Utils.bold_label(self.attr_label)
|
||||
else:
|
||||
Utils.unbold_label(self.attr_label)
|
||||
|
||||
def name_edit_callback(self,name):
|
||||
self.redraw_name_list()
|
||||
@ -1060,11 +1062,14 @@ class EditPerson:
|
||||
for event_handle in self.elist:
|
||||
event = self.db.get_event_from_handle(event_handle)
|
||||
pname = place_title(self.db,event)
|
||||
node = self.etree.add([const.display_pevent(event.get_name()),
|
||||
event.get_description(),
|
||||
event.get_date(),pname],event)
|
||||
has_note = event.get_note()
|
||||
has_source = len(event.get_source_references())> 0
|
||||
data = [const.display_pevent(event.get_name()),
|
||||
event.get_description(), event.get_date(),
|
||||
pname, has_source, has_note]
|
||||
node = self.etree.add(data, event)
|
||||
self.emap[str(event)] = node
|
||||
node = self.etree.add(["","","",""],None)
|
||||
node = self.etree.add(["","","","",False,False],None)
|
||||
|
||||
def strip_id(self,text):
|
||||
index = text.rfind('[')
|
||||
@ -1450,7 +1455,7 @@ class EditPerson:
|
||||
|
||||
def on_apply_person_clicked(self,obj):
|
||||
|
||||
if self.is_unknown.get_active():
|
||||
if self.gender.get_active() == RelLib.Person.UNKNOWN:
|
||||
dialog = QuestionDialog2(
|
||||
_("Unknown gender specified"),
|
||||
_("The gender of the person is currently unknown. "
|
||||
@ -1542,7 +1547,7 @@ class EditPerson:
|
||||
f = self.db.find_family_from_handle(family,trans)
|
||||
new_order = self.reorder_child_list(self.person,f.get_child_handle_list())
|
||||
f.set_child_handle_list(new_order)
|
||||
|
||||
|
||||
error = False
|
||||
(female,male,unknown) = _select_gender[self.gender.get_active()]
|
||||
if male and self.person.get_gender() != RelLib.Person.MALE:
|
||||
@ -1731,27 +1736,27 @@ class EditPerson:
|
||||
if page == 0:
|
||||
self.load_person_image()
|
||||
self.redraw_event_list()
|
||||
elif page == 7 and self.not_loaded:
|
||||
elif page == 6 and self.not_loaded:
|
||||
self.not_loaded = False
|
||||
elif page == 9 and self.lds_not_loaded:
|
||||
elif page == 8 and self.lds_not_loaded:
|
||||
self.lds_not_loaded = False
|
||||
self.draw_lds()
|
||||
note_buf = self.notes_buffer
|
||||
text = unicode(note_buf.get_text(note_buf.get_start_iter(),
|
||||
note_buf.get_end_iter(),False))
|
||||
# if text:
|
||||
# Utils.bold_label(self.notes_label)
|
||||
# else:
|
||||
# Utils.unbold_label(self.notes_label)
|
||||
if text:
|
||||
Utils.bold_label(self.notes_label)
|
||||
else:
|
||||
Utils.unbold_label(self.notes_label)
|
||||
|
||||
if not self.lds_not_loaded:
|
||||
self.check_lds()
|
||||
# if self.lds_baptism.is_empty() \
|
||||
# and self.lds_endowment.is_empty() \
|
||||
# and self.lds_sealing.is_empty():
|
||||
# Utils.unbold_label(self.lds_tab)
|
||||
# else:
|
||||
# Utils.bold_label(self.lds_tab)
|
||||
if self.lds_baptism.is_empty() \
|
||||
and self.lds_endowment.is_empty() \
|
||||
and self.lds_sealing.is_empty():
|
||||
Utils.unbold_label(self.lds_tab)
|
||||
else:
|
||||
Utils.bold_label(self.lds_tab)
|
||||
|
||||
def change_name(self,obj):
|
||||
sel_objs = self.ntree.get_selected_objects()
|
||||
|
@ -464,36 +464,36 @@ class GrampsDbBase(GrampsDBCallback.GrampsDBCallback):
|
||||
|
||||
def _find_from_handle(self,handle,transaction,class_type,dmap,add_func):
|
||||
obj = class_type()
|
||||
val = str(handle)
|
||||
if dmap.get(val):
|
||||
obj.unserialize(dmap.get(val))
|
||||
handle = str(handle)
|
||||
if dmap.get(handle):
|
||||
obj.unserialize(dmap.get(handle))
|
||||
else:
|
||||
obj.set_handle(val)
|
||||
obj.set_handle(handle)
|
||||
add_func(obj,transaction)
|
||||
return obj
|
||||
|
||||
def find_person_from_handle(self,val,transaction):
|
||||
def find_person_from_handle(self,handle,transaction):
|
||||
"""
|
||||
Finds a Person in the database from the passed GRAMPS ID.
|
||||
If no such Person exists, a new Person is added to the database.
|
||||
"""
|
||||
return self._find_from_handle(val,transaction,Person,
|
||||
return self._find_from_handle(handle,transaction,Person,
|
||||
self.person_map,self.add_person)
|
||||
|
||||
def find_source_from_handle(self,val,transaction):
|
||||
def find_source_from_handle(self,handle,transaction):
|
||||
"""
|
||||
Finds a Source in the database from the passed GRAMPS ID.
|
||||
If no such Source exists, a new Source is added to the database.
|
||||
"""
|
||||
return self._find_from_handle(val,transaction,Source,
|
||||
return self._find_from_handle(handle,transaction,Source,
|
||||
self.source_map,self.add_source)
|
||||
|
||||
def find_event_from_handle(self,val,transaction):
|
||||
def find_event_from_handle(self,handle,transaction):
|
||||
"""
|
||||
Finds a Event in the database from the passed GRAMPS ID.
|
||||
If no such Event exists, a new Event is added to the database.
|
||||
"""
|
||||
return self._find_from_handle(val,transaction,Event,
|
||||
return self._find_from_handle(handle,transaction,Event,
|
||||
self.event_map,self.add_event)
|
||||
|
||||
def find_object_from_handle(self,val,transaction):
|
||||
@ -501,7 +501,7 @@ class GrampsDbBase(GrampsDBCallback.GrampsDBCallback):
|
||||
Finds an MediaObject in the database from the passed GRAMPS ID.
|
||||
If no such MediaObject exists, a new Object is added to the database."""
|
||||
|
||||
return self._find_from_handle(val,transaction,MediaObject,
|
||||
return self._find_from_handle(handle,transaction,MediaObject,
|
||||
self.media_map,self.add_object)
|
||||
|
||||
def find_place_from_handle(self,val,transaction):
|
||||
@ -509,15 +509,15 @@ class GrampsDbBase(GrampsDBCallback.GrampsDBCallback):
|
||||
Finds a Place in the database from the passed GRAMPS ID.
|
||||
If no such Place exists, a new Place is added to the database.
|
||||
"""
|
||||
return self._find_from_handle(val,transaction,Place,
|
||||
return self._find_from_handle(handle,transaction,Place,
|
||||
self.place_map,self.add_place)
|
||||
|
||||
def find_family_from_handle(self,val,transaction):
|
||||
def find_family_from_handle(self,handle,transaction):
|
||||
"""
|
||||
Finds a Family in the database from the passed gramps' ID.
|
||||
If no such Family exists, a new Family is added to the database.
|
||||
"""
|
||||
return self._find_from_handle(val,transaction,Family,
|
||||
return self._find_from_handle(handle,transaction,Family,
|
||||
self.family_map,self.add_family)
|
||||
|
||||
def get_person_from_gramps_id(self,val):
|
||||
@ -1251,6 +1251,7 @@ class Transaction:
|
||||
self.first = None
|
||||
self.last = None
|
||||
self.batch = False
|
||||
self.length = 0
|
||||
|
||||
self.person_add = []
|
||||
self.person_del = []
|
||||
@ -1330,3 +1331,4 @@ class Transaction:
|
||||
if self.last and self.first:
|
||||
return self.last - self.first + 1
|
||||
return 0
|
||||
|
||||
|
@ -45,11 +45,9 @@ class GrampsGEDDB(GrampsInMemDB):
|
||||
GrampsInMemDB.__init__(self)
|
||||
|
||||
def load(self,name,callback, mode="w"):
|
||||
self.filename = name
|
||||
GrampsInMemDB.load(self,name,callback,mode)
|
||||
ReadGedcom.importData(self,name,use_trans=False)
|
||||
|
||||
self.readonly = mode == "r"
|
||||
|
||||
self.bookmarks = self.metadata.get('bookmarks')
|
||||
if self.bookmarks == None:
|
||||
self.bookmarks = []
|
||||
|
@ -25,6 +25,8 @@ Provides the common infrastructure for database formats that
|
||||
must hold all of their data in memory.
|
||||
"""
|
||||
|
||||
from bsddb import dbshelve, db
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
@ -86,8 +88,12 @@ class GrampsInMemDB(GrampsDbBase):
|
||||
self.eventnames = {}
|
||||
self.undodb = []
|
||||
|
||||
def load(self,name,callback):
|
||||
pass
|
||||
def load(self,name,callback,mode="w"):
|
||||
self.undolog = "%s.log" % name
|
||||
self.undodb = db.DB()
|
||||
self.undodb.open(self.undolog, db.DB_RECNO, db.DB_CREATE)
|
||||
self.filename = name
|
||||
self.readonly = mode == "r"
|
||||
|
||||
def get_person_cursor(self):
|
||||
return GrampsInMemCursor(self.person_map)
|
||||
@ -105,7 +111,12 @@ class GrampsInMemDB(GrampsDbBase):
|
||||
return GrampsInMemCursor(self.media_map)
|
||||
|
||||
def close(self):
|
||||
pass
|
||||
if not self.readonly:
|
||||
self.undodb.close()
|
||||
try:
|
||||
os.remove(self.undolog)
|
||||
except:
|
||||
pass
|
||||
|
||||
def abort_changes(self):
|
||||
pass
|
||||
|
@ -45,10 +45,8 @@ class GrampsXMLDB(GrampsInMemDB):
|
||||
GrampsInMemDB.__init__(self)
|
||||
|
||||
def load(self,name,callback,mode="w"):
|
||||
self.filename = name
|
||||
GrampsInMemDB.load(self,name,callback,mode)
|
||||
self.id_trans = {}
|
||||
|
||||
self.readonly = mode == "r"
|
||||
|
||||
ReadXML.importData(self,name,use_trans=False)
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
from gobject import TYPE_STRING, TYPE_PYOBJECT, TYPE_OBJECT
|
||||
from gobject import TYPE_STRING, TYPE_PYOBJECT, TYPE_OBJECT, TYPE_BOOLEAN
|
||||
import gtk
|
||||
import const
|
||||
|
||||
@ -33,9 +33,14 @@ class ListModel:
|
||||
def __init__(self,tree,dlist,select_func=None,
|
||||
event_func=None,mode=gtk.SELECTION_SINGLE):
|
||||
self.tree = tree
|
||||
l = len(dlist)
|
||||
self.mylist = [TYPE_STRING]*l + [TYPE_PYOBJECT]
|
||||
|
||||
self.mylist = []
|
||||
for l in dlist:
|
||||
if l[0] and l[0][0] == ':':
|
||||
self.mylist.append(TYPE_BOOLEAN)
|
||||
else:
|
||||
self.mylist.append(TYPE_STRING)
|
||||
self.mylist.append(TYPE_PYOBJECT)
|
||||
|
||||
self.tree.set_rules_hint(True)
|
||||
self.model = None
|
||||
self.selection = None
|
||||
@ -60,18 +65,26 @@ class ListModel:
|
||||
|
||||
cnum = 0
|
||||
for name in dlist:
|
||||
if gtk26 and cnum == 0:
|
||||
if name[0] and name[0][0] == ':':
|
||||
renderer = gtk.CellRendererToggle()
|
||||
column = gtk.TreeViewColumn(name[0][1:],renderer)
|
||||
column.add_attribute(renderer,'active',cnum)
|
||||
elif gtk26 and cnum == 0:
|
||||
renderer = gtk.CellRendererCombo()
|
||||
renderer.set_property('model',model)
|
||||
renderer.set_property('text_column',0)
|
||||
renderer.set_property('editable',True)
|
||||
renderer.set_fixed_height_from_font(True)
|
||||
renderer.connect('edited',self.edited_cb, cnum)
|
||||
column = gtk.TreeViewColumn(name[0],renderer,text=cnum)
|
||||
column.set_reorderable(True)
|
||||
else:
|
||||
renderer = gtk.CellRendererText()
|
||||
renderer.set_property('editable',True)
|
||||
renderer.set_fixed_height_from_font(True)
|
||||
renderer.connect('edited',self.edited_cb, cnum)
|
||||
column = gtk.TreeViewColumn(name[0],renderer,text=cnum)
|
||||
column.set_reorderable(True)
|
||||
renderer.set_fixed_height_from_font(True)
|
||||
renderer.connect('edited',self.edited_cb, cnum)
|
||||
column = gtk.TreeViewColumn(name[0],renderer,text=cnum)
|
||||
column.set_reorderable(True)
|
||||
column.set_min_width(name[2])
|
||||
|
||||
if name[0] == '':
|
||||
|
@ -105,8 +105,9 @@ class NameEditor:
|
||||
self.note_field = self.top.get_widget("alt_note")
|
||||
self.slist = self.top.get_widget('slist')
|
||||
self.priv = self.top.get_widget("priv")
|
||||
self.sources_label = self.top.get_widget("sourcesName")
|
||||
self.notes_label = self.top.get_widget("noteName")
|
||||
self.general_label = self.top.get_widget("general_tab")
|
||||
self.sources_label = self.top.get_widget("sources_tab")
|
||||
self.notes_label = self.top.get_widget("note_tab")
|
||||
self.flowed = self.top.get_widget("alt_flowed")
|
||||
self.preform = self.top.get_widget("alt_preform")
|
||||
self.group_over = self.top.get_widget('group_over')
|
||||
@ -115,6 +116,7 @@ class NameEditor:
|
||||
types.sort()
|
||||
AutoComp.fill_combo(self.type_combo,types)
|
||||
self.type_field = self.type_combo.get_child()
|
||||
self.type_field.set_text(types[0])
|
||||
|
||||
full_name = NameDisplay.displayer.display_name(name)
|
||||
|
||||
@ -152,6 +154,7 @@ class NameEditor:
|
||||
self.type_field.set_text(_(name.get_type()))
|
||||
self.patronymic_field.set_text(name.get_patronymic())
|
||||
self.priv.set_active(name.get_privacy())
|
||||
Utils.bold_label(self.general_label)
|
||||
if name.get_note():
|
||||
self.note_buffer.set_text(name.get_note())
|
||||
Utils.bold_label(self.notes_label)
|
||||
@ -159,6 +162,8 @@ class NameEditor:
|
||||
self.preform.set_active(1)
|
||||
else:
|
||||
self.flowed.set_active(1)
|
||||
else:
|
||||
Utils.unbold_label(self.notes_label)
|
||||
self.display_as.set_active(name.get_display_as())
|
||||
self.sort_as.set_active(name.get_display_as())
|
||||
grp_as = name.get_group_as()
|
||||
@ -169,6 +174,9 @@ class NameEditor:
|
||||
else:
|
||||
self.display_as.set_active(0)
|
||||
self.sort_as.set_active(0)
|
||||
Utils.unbold_label(self.notes_label)
|
||||
Utils.unbold_label(self.sources_label)
|
||||
Utils.unbold_label(self.general_label)
|
||||
|
||||
if parent_window:
|
||||
self.window.set_transient_for(parent_window)
|
||||
|
@ -117,15 +117,11 @@ class PeopleView:
|
||||
selected_ids = self.get_selected_objects()
|
||||
|
||||
if len(selected_ids) == 1:
|
||||
self.person_tree.drag_source_set(BUTTON1_MASK,
|
||||
[DdTargets.PERSON_LINK.target()],
|
||||
ACTION_COPY)
|
||||
self.person_tree.drag_source_set(
|
||||
BUTTON1_MASK, [DdTargets.PERSON_LINK.target()], ACTION_COPY)
|
||||
elif len(selected_ids) > 1:
|
||||
self.person_tree.drag_source_set(BUTTON1_MASK,
|
||||
[DdTargets.PERSON_LINK_LIST.target()],
|
||||
ACTION_COPY)
|
||||
|
||||
|
||||
self.person_tree.drag_source_set(
|
||||
BUTTON1_MASK, [DdTargets.PERSON_LINK_LIST.target()], ACTION_COPY)
|
||||
|
||||
def sort_clicked(self,obj):
|
||||
for col in self.columns:
|
||||
@ -248,9 +244,13 @@ class PeopleView:
|
||||
top_name = self.parent.db.get_name_group_mapping(group_name)
|
||||
top_path = self.person_model.on_get_path(top_name)
|
||||
self.person_tree.expand_row(top_path,0)
|
||||
self.person_selection.unselect_all()
|
||||
self.person_selection.select_path(path)
|
||||
self.person_tree.scroll_to_cell(path,None,1,0.5,0)
|
||||
|
||||
current = self.person_model.on_get_iter(path)
|
||||
selected = self.person_selection.path_is_selected(path)
|
||||
if current != p.get_handle() or not selected:
|
||||
self.person_selection.unselect_all()
|
||||
self.person_selection.select_path(path)
|
||||
self.person_tree.scroll_to_cell(path,None,1,0.5,0)
|
||||
except KeyError:
|
||||
self.person_selection.unselect_all()
|
||||
print "Person not currently available due to filter"
|
||||
@ -350,7 +350,6 @@ class PeopleView:
|
||||
self.person_model.rebuild_data(self.DataFilter,skip=node)
|
||||
|
||||
def person_updated(self,handle_list):
|
||||
|
||||
for node in handle_list:
|
||||
person = self.parent.db.get_person_from_handle(node)
|
||||
try:
|
||||
|
@ -89,6 +89,7 @@ rel_types = (RelLib.Person.CHILD_REL_BIRTH,
|
||||
|
||||
pedi_type = {
|
||||
'birth' : RelLib.Person.CHILD_REL_BIRTH,
|
||||
'natural': RelLib.Person.CHILD_REL_BIRTH,
|
||||
'adopted': RelLib.Person.CHILD_REL_ADOPT,
|
||||
'foster' : RelLib.Person.CHILD_REL_FOST,
|
||||
}
|
||||
@ -210,7 +211,8 @@ def import2(database, filename, cb, codeset, use_trans):
|
||||
DisplayTrace.DisplayTrace()
|
||||
return
|
||||
|
||||
statusTop.get_widget("close").set_sensitive(1)
|
||||
statusTop.get_widget("close").set_sensitive(True)
|
||||
statusWindow.set_modal(False)
|
||||
if close:
|
||||
statusWindow.destroy()
|
||||
|
||||
@ -768,12 +770,10 @@ class GedcomParser:
|
||||
return (mrel,frel)
|
||||
# FTW
|
||||
elif matches[1] == "_FREL":
|
||||
if matches[2].lower() != "natural":
|
||||
frel = matches[2].capitalize()
|
||||
frel = pedi_type.get(matches[2].lower(),RelLib.Person.CHILD_REL_BIRTH)
|
||||
# FTW
|
||||
elif matches[1] == "_MREL":
|
||||
if matches[2].lower() != "natural":
|
||||
mrel = RelLib.Person.CHILD_REL_BIRTH
|
||||
mrel = pedi_type.get(matches[2].lower(),RelLib.Person.CHILD_REL_BIRTH)
|
||||
elif matches[1] == "ADOP":
|
||||
mrel = RelLib.Person.CHILD_REL_ADOPT
|
||||
frel = RelLib.Person.CHILD_REL_ADOPT
|
||||
@ -981,9 +981,9 @@ class GedcomParser:
|
||||
break
|
||||
else:
|
||||
if ftype in rel_types:
|
||||
self.person.add_parent_family_handle(handle,
|
||||
RelLib.Person.CHILD_REL_BIRTH,
|
||||
RelLib.Person.CHILD_REL_BIRTH)
|
||||
self.person.add_parent_family_handle(
|
||||
handle, RelLib.Person.CHILD_REL_BIRTH,
|
||||
RelLib.Person.CHILD_REL_BIRTH)
|
||||
else:
|
||||
if self.person.get_main_parents_family_handle() == handle:
|
||||
self.person.set_main_parent_family_handle(None)
|
||||
@ -1427,8 +1427,8 @@ class GedcomParser:
|
||||
self.barf(level+1)
|
||||
|
||||
def parse_adopt_famc(self,level):
|
||||
mrel = "Adopted"
|
||||
frel = "Adopted"
|
||||
mrel = RelLib.Person.CHILD_REL_ADOPT
|
||||
frel = RelLib.Person.CHILD_REL_ADOPT
|
||||
while 1:
|
||||
matches = self.get_next()
|
||||
if int(matches[0]) < level:
|
||||
|
@ -170,8 +170,8 @@ class RelationshipCalculator:
|
||||
pmap[person.get_handle()] = rel_str
|
||||
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
if family_handle != None:
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
if family_handle != None and family:
|
||||
father = self.db.get_person_from_handle(family.get_father_handle())
|
||||
mother = self.db.get_person_from_handle(family.get_mother_handle())
|
||||
self.apply_filter(father,rel_str+'f',plist,pmap)
|
||||
|
16
src/Utils.py
16
src/Utils.py
@ -403,16 +403,20 @@ def search_for(name):
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def bold_label(label):
|
||||
text = unicode(label.get_text())
|
||||
label.set_text("<b>%s</b>" % text )
|
||||
label.set_use_markup(1)
|
||||
clist = label.get_children()
|
||||
text = unicode(clist[1].get_text())
|
||||
clist[0].show()
|
||||
clist[1].set_text("<b>%s</b>" % text )
|
||||
clist[1].set_use_markup(True)
|
||||
|
||||
def unbold_label(label):
|
||||
text = unicode(label.get_text())
|
||||
clist = label.get_children()
|
||||
text = unicode(clist[1].get_text())
|
||||
text = text.replace('<b>','')
|
||||
text = text.replace('</b>','')
|
||||
label.set_text(text)
|
||||
label.set_use_markup(0)
|
||||
clist[0].hide()
|
||||
clist[1].set_text(text)
|
||||
clist[1].set_use_markup(False)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<glade-interface>
|
||||
|
||||
<widget class="GtkDialog" id="editPerson">
|
||||
<widget class="GtkDialog" id="edit_person">
|
||||
<property name="has_focus">True</property>
|
||||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
@ -223,6 +223,7 @@
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">*</property>
|
||||
<property name="activates_default">False</property>
|
||||
<property name="width_chars">13</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
@ -851,7 +852,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox116">
|
||||
<widget class="GtkHBox" id="events_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
@ -874,7 +875,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="events_label">
|
||||
<widget class="GtkLabel" id="events_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Events</property>
|
||||
<property name="use_underline">False</property>
|
||||
@ -1050,7 +1051,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox108">
|
||||
<widget class="GtkHBox" id="names_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
@ -1073,7 +1074,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="names_label">
|
||||
<widget class="GtkLabel" id="names_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Names</property>
|
||||
<property name="use_underline">False</property>
|
||||
@ -1274,7 +1275,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox109">
|
||||
<widget class="GtkHBox" id="attr_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
@ -1297,7 +1298,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="attr_label">
|
||||
<widget class="GtkLabel" id="attr_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Attributes</property>
|
||||
<property name="use_underline">False</property>
|
||||
@ -1472,7 +1473,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox110">
|
||||
<widget class="GtkHBox" id="addr_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
@ -1495,7 +1496,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="addr_label">
|
||||
<widget class="GtkLabel" id="addr_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Addresses</property>
|
||||
<property name="use_underline">False</property>
|
||||
@ -1667,7 +1668,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox111">
|
||||
<widget class="GtkHBox" id="notes_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
@ -1690,7 +1691,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="notes_label">
|
||||
<widget class="GtkLabel" id="notes_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Notes</property>
|
||||
<property name="use_underline">False</property>
|
||||
@ -1859,7 +1860,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox112">
|
||||
<widget class="GtkHBox" id="sources_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
@ -1882,7 +1883,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="sources_label">
|
||||
<widget class="GtkLabel" id="sources_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Sources</property>
|
||||
<property name="use_underline">False</property>
|
||||
@ -1938,7 +1939,7 @@ Unknown</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="selection_mode">GTK_SELECTION_SINGLE</property>
|
||||
<property name="orientation">GTK_ORIENTATION_VERTICAL</property>
|
||||
<property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
@ -2087,7 +2088,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox113">
|
||||
<widget class="GtkHBox" id="gallery_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
@ -2110,7 +2111,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="gallery_label">
|
||||
<widget class="GtkLabel" id="gallery_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Gallery</property>
|
||||
<property name="use_underline">False</property>
|
||||
@ -2326,13 +2327,13 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox114">
|
||||
<widget class="GtkHBox" id="inet_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image2586">
|
||||
<widget class="GtkImage" id="image2589">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_size">4</property>
|
||||
<property name="icon_name">gtk-file</property>
|
||||
@ -2349,7 +2350,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="inet_label">
|
||||
<widget class="GtkLabel" id="inet_text">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Internet</property>
|
||||
<property name="use_underline">False</property>
|
||||
@ -3336,7 +3337,7 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox115">
|
||||
<widget class="GtkHBox" id="lds_tab">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
@ -3359,7 +3360,8 @@ Unknown</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="lds_tab">
|
||||
<widget class="GtkLabel" id="lds_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">LDS</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
|
3052
src/gramps.glade
3052
src/gramps.glade
File diff suppressed because it is too large
Load Diff
@ -743,20 +743,20 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
|
||||
self.redraw_histmenu()
|
||||
self.set_buttons(1)
|
||||
if self.hindex == 0:
|
||||
self.backbtn.set_sensitive(0)
|
||||
self.back.set_sensitive(0)
|
||||
self.backbtn.set_sensitive(False)
|
||||
self.back.set_sensitive(False)
|
||||
else:
|
||||
self.backbtn.set_sensitive(1)
|
||||
self.back.set_sensitive(1)
|
||||
self.fwdbtn.set_sensitive(1)
|
||||
self.forward.set_sensitive(1)
|
||||
self.backbtn.set_sensitive(True)
|
||||
self.back.set_sensitive(True)
|
||||
self.fwdbtn.set_sensitive(True)
|
||||
self.forward.set_sensitive(True)
|
||||
except:
|
||||
self.clear_history()
|
||||
else:
|
||||
self.backbtn.set_sensitive(0)
|
||||
self.back.set_sensitive(0)
|
||||
self.fwdbtn.set_sensitive(1)
|
||||
self.forward.set_sensitive(1)
|
||||
self.backbtn.set_sensitive(False)
|
||||
self.back.set_sensitive(False)
|
||||
self.fwdbtn.set_sensitive(True)
|
||||
self.forward.set_sensitive(True)
|
||||
self.goto_active_person()
|
||||
self.lock_history = False
|
||||
|
||||
@ -773,20 +773,20 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
|
||||
self.redraw_histmenu()
|
||||
self.set_buttons(1)
|
||||
if self.hindex == len(self.history)-1:
|
||||
self.fwdbtn.set_sensitive(0)
|
||||
self.forward.set_sensitive(0)
|
||||
self.fwdbtn.set_sensitive(False)
|
||||
self.forward.set_sensitive(False)
|
||||
else:
|
||||
self.fwdbtn.set_sensitive(1)
|
||||
self.forward.set_sensitive(1)
|
||||
self.backbtn.set_sensitive(1)
|
||||
self.back.set_sensitive(1)
|
||||
self.fwdbtn.set_sensitive(True)
|
||||
self.forward.set_sensitive(True)
|
||||
self.backbtn.set_sensitive(True)
|
||||
self.back.set_sensitive(True)
|
||||
except:
|
||||
self.clear_history()
|
||||
else:
|
||||
self.fwdbtn.set_sensitive(0)
|
||||
self.forward.set_sensitive(0)
|
||||
self.backbtn.set_sensitive(1)
|
||||
self.back.set_sensitive(1)
|
||||
self.fwdbtn.set_sensitive(False)
|
||||
self.forward.set_sensitive(False)
|
||||
self.backbtn.set_sensitive(True)
|
||||
self.back.set_sensitive(True)
|
||||
self.goto_active_person()
|
||||
self.lock_history = False
|
||||
|
||||
@ -848,10 +848,10 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
|
||||
def enable_sidebar(self,val):
|
||||
if val:
|
||||
self.sidebar.show()
|
||||
self.views.set_show_tabs(0)
|
||||
self.views.set_show_tabs(False)
|
||||
else:
|
||||
self.sidebar.hide()
|
||||
self.views.set_show_tabs(1)
|
||||
self.views.set_show_tabs(True)
|
||||
|
||||
def enable_filter(self,val):
|
||||
if val:
|
||||
@ -875,8 +875,8 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
|
||||
self.report_menu = self.gtop.get_widget("reports_menu")
|
||||
self.tools_menu = self.gtop.get_widget("tools_menu")
|
||||
|
||||
self.report_menu.set_sensitive(0)
|
||||
self.tools_menu.set_sensitive(0)
|
||||
self.report_menu.set_sensitive(False)
|
||||
self.tools_menu.set_sensitive(False)
|
||||
|
||||
error = PluginMgr.load_plugins(const.docgenDir)
|
||||
error |= PluginMgr.load_plugins(os.path.expanduser("~/.gramps/docgen"))
|
||||
|
Loading…
Reference in New Issue
Block a user