unknown parent label on FamilyViwe

svn: r6200
This commit is contained in:
Don Allingham 2006-03-23 18:50:43 +00:00
parent ab84fdd08c
commit fbe77f46af
2 changed files with 26 additions and 7 deletions

View File

@ -478,11 +478,19 @@ class FamilyView(PageView.PersonNavView):
self.attach.attach(label,_PLABEL_START,_PLABEL_STOP,self.row, self.attach.attach(label,_PLABEL_START,_PLABEL_STOP,self.row,
self.row+1, xoptions=gtk.FILL|gtk.SHRINK) self.row+1, xoptions=gtk.FILL|gtk.SHRINK)
link_label = GrampsWidgets.LinkLabel(self.get_name(handle,True), if handle:
self.button_press,handle) link_label = GrampsWidgets.LinkLabel(self.get_name(handle,True),
button = GrampsWidgets.IconButton(self.edit_button_press,handle) self.button_press,handle)
self.attach.attach(GrampsWidgets.LinkBox(link_label,button), button = GrampsWidgets.IconButton(self.edit_button_press,handle)
_PDATA_START,_PDATA_STOP,self.row,self.row+1) self.attach.attach(GrampsWidgets.LinkBox(link_label,button),
_PDATA_START,_PDATA_STOP,self.row,self.row+1)
else:
link_label = gtk.Label(_('Unknown'))
link_label.set_alignment(0,0.5)
link_label.show()
self.attach.attach(link_label,
_PDATA_START,_PDATA_STOP,self.row,self.row+1)
self.row += 1 self.row += 1
def write_child(self,title,handle): def write_child(self,title,handle):

View File

@ -1505,6 +1505,17 @@ class RepoEmbedList(EmbeddedList):
def column_order(self): def column_order(self):
return ((1,0),(1,1),(1,2),(1,3)) return ((1,0),(1,1),(1,2),(1,3))
def handle_extra_type(self, objtype, obj):
from Editors import EditRepoRef
try:
ref = RelLib.RepoRef()
repo = self.dbstate.db.get_repository_from_handle(obj)
EditRepoRef.EditRepoRef(
self.dbstate,self.uistate,self.track,
repo, ref, self.obj, self.add_callback)
except Errors.WindowActiveError:
pass
def add_button_clicked(self,obj): def add_button_clicked(self,obj):
from Editors import EditRepoRef from Editors import EditRepoRef
@ -1524,13 +1535,13 @@ class RepoEmbedList(EmbeddedList):
self.rebuild() self.rebuild()
def edit_button_clicked(self,obj): def edit_button_clicked(self,obj):
from Editors import EditRepositoryRef from Editors import EditRepoRef
ref = self.get_selected() ref = self.get_selected()
if ref: if ref:
repo = self.dbstate.db.get_repository_from_handle(ref.ref) repo = self.dbstate.db.get_repository_from_handle(ref.ref)
try: try:
Editors.EditRepositoryRef( Editors.EditRepoRef(
self.dbstate, self.uistate, self.track, repo, self.dbstate, self.uistate, self.track, repo,
ref, self.edit_callback) ref, self.edit_callback)
except Errors.WindowActiveError: except Errors.WindowActiveError: