* src/Date.py: Added "set_year" function
* src/Utils.py: qualifiy Date calls, eliminate string module usage * src/edit_sm.png: new image * src/Makefile.am: install edit_sm.png * src/gramps_main.py: update relationship calculator on database change * src/Ancestors.py: initialize born_info svn: r3687
This commit is contained in:
parent
1e3f6b0675
commit
99b057f3c6
@ -1,3 +1,13 @@
|
||||
2004-10-28 Don Allingham <dallingham@users.sourceforge.net>
|
||||
* src/Date.py: Added "set_year" function
|
||||
* src/Utils.py: qualifiy Date calls, eliminate string
|
||||
module usage
|
||||
* src/edit_sm.png: new image
|
||||
* src/Makefile.am: install edit_sm.png
|
||||
* src/gramps_main.py: update relationship calculator
|
||||
on database change
|
||||
* src/Ancestors.py: initialize born_info
|
||||
|
||||
2004-10-28 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||
* src/plugins/DetDescendantReport.py: New Date usage.
|
||||
|
||||
|
@ -29,37 +29,37 @@ import gtk
|
||||
import gobject
|
||||
|
||||
def fill_combo(combo,data_list):
|
||||
store = gtk.ListStore(gobject.TYPE_STRING)
|
||||
store = gtk.ListStore(gobject.TYPE_STRING)
|
||||
|
||||
for data in data_list:
|
||||
store.append(row=[data])
|
||||
|
||||
combo.set_model(store)
|
||||
combo.set_text_column(0)
|
||||
completion = gtk.EntryCompletion()
|
||||
completion.set_model(store)
|
||||
completion.set_minimum_key_length(1)
|
||||
completion.set_text_column(0)
|
||||
combo.child.set_completion(completion)
|
||||
for data in data_list:
|
||||
store.append(row=[data])
|
||||
|
||||
combo.set_model(store)
|
||||
combo.set_text_column(0)
|
||||
completion = gtk.EntryCompletion()
|
||||
completion.set_model(store)
|
||||
completion.set_minimum_key_length(1)
|
||||
completion.set_text_column(0)
|
||||
combo.child.set_completion(completion)
|
||||
|
||||
def fill_entry(entry,data_list):
|
||||
store = gtk.ListStore(gobject.TYPE_STRING)
|
||||
for data in data_list:
|
||||
store.append(row=[data])
|
||||
store = gtk.ListStore(gobject.TYPE_STRING)
|
||||
for data in data_list:
|
||||
store.append(row=[data])
|
||||
|
||||
completion = gtk.EntryCompletion()
|
||||
completion.set_model(store)
|
||||
completion.set_minimum_key_length(1)
|
||||
completion.set_text_column(0)
|
||||
entry.set_completion(completion)
|
||||
completion = gtk.EntryCompletion()
|
||||
completion.set_model(store)
|
||||
completion.set_minimum_key_length(1)
|
||||
completion.set_text_column(0)
|
||||
entry.set_completion(completion)
|
||||
|
||||
def fill_option_text(combobox,data):
|
||||
store = gtk.ListStore(gobject.TYPE_STRING)
|
||||
for item in data:
|
||||
store.append(row=[item])
|
||||
combobox.set_model(store)
|
||||
combobox.set_active(0)
|
||||
store = gtk.ListStore(gobject.TYPE_STRING)
|
||||
for item in data:
|
||||
store.append(row=[item])
|
||||
combobox.set_model(store)
|
||||
combobox.set_active(0)
|
||||
|
||||
def get_option(combobox):
|
||||
store = combobox.get_model()
|
||||
return store.get_value(combobox.get_active_iter(),0)
|
||||
store = combobox.get_model()
|
||||
return store.get_value(combobox.get_active_iter(),0)
|
||||
|
@ -317,6 +317,11 @@ class Date:
|
||||
"""
|
||||
return self._get_low_item(_POS_YR)
|
||||
|
||||
def set_year(self,year):
|
||||
"""
|
||||
"""
|
||||
self.dateval = self.dateval[0:2] + (year,) + self.dateval[3:]
|
||||
|
||||
def get_year_valid(self):
|
||||
return self._get_low_item_valid(_POS_YR)
|
||||
|
||||
|
@ -122,6 +122,7 @@ GRAPHICS = \
|
||||
bad.png\
|
||||
caution.png\
|
||||
edit.png\
|
||||
edit_sm.png \
|
||||
family48.png\
|
||||
good.png\
|
||||
home.png\
|
||||
@ -154,4 +155,4 @@ pycheck:
|
||||
|
||||
docs:
|
||||
epydoc -o doc --url http://gramps.sourceforge.net --name GRAMPS --html $(docfiles)
|
||||
epydoc --pdf $(docfiles)
|
||||
epydoc --pdf $(docfiles)
|
||||
|
@ -25,7 +25,6 @@
|
||||
# Standard python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import string
|
||||
import os
|
||||
import locale
|
||||
|
||||
@ -43,7 +42,6 @@ import gnome
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import RelImage
|
||||
import GrampsMime
|
||||
import Date
|
||||
|
||||
@ -257,7 +255,7 @@ def view_photo(photo):
|
||||
except:
|
||||
return
|
||||
|
||||
args = string.split(prog)
|
||||
args = prog.split()
|
||||
args.append(photo.get_path())
|
||||
|
||||
if os.fork() == 0:
|
||||
@ -269,10 +267,10 @@ def view_photo(photo):
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def strip_id(text):
|
||||
index = string.rfind(text,'[')
|
||||
index = text.rfind('[')
|
||||
if (index > 0):
|
||||
text = text[:index]
|
||||
text = string.rstrip(text)
|
||||
text = text.rstrip()
|
||||
return text
|
||||
|
||||
def nautilus_icon(icon,mime_type):
|
||||
@ -502,8 +500,8 @@ def bold_label(label):
|
||||
|
||||
def unbold_label(label):
|
||||
text = unicode(label.get_text())
|
||||
text = string.replace(text,'<b>','')
|
||||
text = string.replace(text,'</b>','')
|
||||
text = text.replace('<b>','')
|
||||
text = text.replace('</b>','')
|
||||
label.set_text(text)
|
||||
label.set_use_markup(0)
|
||||
|
||||
@ -564,15 +562,17 @@ def probably_alive(person,db):
|
||||
child_birth = db.get_event_from_handle(child.birth_handle)
|
||||
dobj = child_birth.get_date_object()
|
||||
if dobj.get_start_date() != Date.EMPTY:
|
||||
d = Date(dobj)
|
||||
d.set_year(d.get_year() - years)
|
||||
d = Date.Date(dobj)
|
||||
val = d.get_start_date()
|
||||
val = (val[0],val[1],d.get_year() - years,val[3])
|
||||
d.set_year(val)
|
||||
if not not_too_old (d):
|
||||
return True
|
||||
|
||||
if child.death_handle:
|
||||
child_death = db.get_event_from_handle(child.death_handle)
|
||||
dobj = child_death.get_date_object()
|
||||
if dobj.get_start_date != Date.EMPTY:
|
||||
if dobj.get_start_date() != Date.EMPTY:
|
||||
if not not_too_old (dobj):
|
||||
return True
|
||||
|
||||
@ -627,7 +627,7 @@ def probably_alive(person,db):
|
||||
if sp_birth_handle:
|
||||
spouse_birth = db.get_event_from_handle(sp_birth_handle)
|
||||
if not spouse_birth.get_date().is_empty():
|
||||
d = Date(spouse_birth.get_date_object())
|
||||
d = Date.Date(spouse_birth.get_date_object())
|
||||
d.set_year(d.get_year() + max_age_difference)
|
||||
if not not_too_old (d):
|
||||
return False
|
||||
@ -635,7 +635,7 @@ def probably_alive(person,db):
|
||||
if sp_death_handle:
|
||||
spouse_death = db.get_event_from_handle(sp_death_handle)
|
||||
if spouse_death.get_date() != "":
|
||||
d = Date(spouse_death.get_date_object())
|
||||
d = Date.Date(spouse_death.get_date_object())
|
||||
d.set_year (d.get_year() - min_generation)
|
||||
if not not_too_old (d):
|
||||
return False
|
||||
|
BIN
gramps2/src/edit_sm.png
Normal file
BIN
gramps2/src/edit_sm.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
@ -1329,6 +1329,7 @@ class Gramps:
|
||||
(name,plist) = self.relationship.get_relationship(
|
||||
default_person,
|
||||
self.active_person)
|
||||
|
||||
if name:
|
||||
if plist == None:
|
||||
return name
|
||||
@ -1510,6 +1511,7 @@ class Gramps:
|
||||
self.place_view.change_db(self.db)
|
||||
self.source_view.change_db(self.db)
|
||||
self.media_view.change_db(self.db)
|
||||
self.relationship = self.RelClass(self.db)
|
||||
|
||||
self.change_active_person(self.find_initial_person())
|
||||
self.statusbar.set_progress_percentage(0.0)
|
||||
|
@ -513,6 +513,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
||||
|
||||
def long_born_died (self, person):
|
||||
ret = ''
|
||||
born_info = None
|
||||
birth_handle = person.get_birth_handle ()
|
||||
if birth_handle:
|
||||
birth = self.database.get_event_from_handle(birth_handle)
|
||||
|
Loading…
Reference in New Issue
Block a user