* src/EditPerson.py: fix focus_out_event signal handling
* src/DisplayTabs.py: provide double click/edit button handling for back references. svn: r6018
This commit is contained in:
parent
57c56a270a
commit
d251bbe7c1
@ -1,3 +1,8 @@
|
||||
2006-03-01 Don Allingham <don@gramps-project.org>
|
||||
* src/EditPerson.py: fix focus_out_event signal handling
|
||||
* src/DisplayTabs.py: provide double click/edit button handling
|
||||
for back references.
|
||||
|
||||
2006-02-28 Alex Roitman <shura@gramps-project.org>
|
||||
* src/Exporter.py (Exporter): Callback support, busy cursor.
|
||||
* src/ViewManager.py (ViewManager): Move progress bar handling
|
||||
|
@ -712,10 +712,55 @@ class BackRefList(EmbeddedList):
|
||||
def column_order(self):
|
||||
return ((1,0),(1,1),(1,2))
|
||||
|
||||
def find_node(self):
|
||||
(model,node) = self.selection.get_selected()
|
||||
try:
|
||||
return (model.get_value(node,0),model.get_value(node,3))
|
||||
except:
|
||||
return (None,None)
|
||||
|
||||
def edit_button_clicked(self,obj):
|
||||
ref = self.get_selected()
|
||||
if ref:
|
||||
print ref
|
||||
(reftype, ref) = self.find_node()
|
||||
if reftype == 'Person':
|
||||
try:
|
||||
import EditPerson
|
||||
|
||||
person = self.dbstate.db.get_person_from_handle(ref)
|
||||
EditPerson.EditPerson(self.dbstate, self.uistate, [], person)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
elif reftype == 'Family':
|
||||
try:
|
||||
import EditFamily
|
||||
|
||||
family = self.dbstate.db.get_family_from_handle(ref)
|
||||
EditFamily.EditFamily(self.dbstate, self.uistate, [], family)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
elif reftype == 'Source':
|
||||
try:
|
||||
import EditFamily
|
||||
|
||||
source = self.dbstate.db.get_source_from_handle(ref)
|
||||
EditSource.EditSource(self.dbstate, self.uistate, [], source)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
elif reftype == 'Place':
|
||||
try:
|
||||
import EditPlace
|
||||
|
||||
place = self.dbstate.db.get_place_from_handle(ref)
|
||||
EditPlace.EditPlace(self.dbstate,self.uistate,[],place)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
elif reftype == 'Media':
|
||||
try:
|
||||
import EditMedia
|
||||
|
||||
obj = self.dbstate.db.get_object_from_handle(ref)
|
||||
EditMedia.EditMedia(self.dbstate,self.uistate, [], obj)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
class SourceBackRefList(BackRefList):
|
||||
|
||||
|
@ -114,8 +114,7 @@ class EditPerson(EditPrimary.EditPrimary):
|
||||
self.define_ok_button(self.top.get_widget("ok"), self.save)
|
||||
self.define_help_button(self.top.get_widget("button134"),'adv-pers')
|
||||
|
||||
# self.top.get_widget("given_name").connect("focus_out_event",
|
||||
# self.given_focus_out_event)
|
||||
self.given.connect("focus_out_event",self.given_focus_out_event)
|
||||
self.top.get_widget("button177").connect("clicked", self.edit_name_clicked)
|
||||
|
||||
self.eventbox.connect('button-press-event',self.image_button_press)
|
||||
@ -342,9 +341,11 @@ class EditPerson(EditPrimary.EditPrimary):
|
||||
|
||||
def given_focus_out_event (self, entry, event):
|
||||
if not self.should_guess_gender:
|
||||
return
|
||||
return False
|
||||
|
||||
self.gender.force(self.db.genderStats.guess_gender(self.given.get_value()))
|
||||
gender = self.given.get_value()
|
||||
self.gender.force(self.db.genderStats.guess_gender())
|
||||
return False
|
||||
|
||||
def load_photo(self,photo):
|
||||
"""loads, scales, and displays the person's main photo"""
|
||||
|
Loading…
Reference in New Issue
Block a user