diff --git a/src/DataViews/_FamilyView.py b/src/DataViews/_FamilyView.py index 8d0001108..2d5f6de71 100644 --- a/src/DataViews/_FamilyView.py +++ b/src/DataViews/_FamilyView.py @@ -478,11 +478,19 @@ class FamilyView(PageView.PersonNavView): self.attach.attach(label,_PLABEL_START,_PLABEL_STOP,self.row, self.row+1, xoptions=gtk.FILL|gtk.SHRINK) - link_label = GrampsWidgets.LinkLabel(self.get_name(handle,True), - self.button_press,handle) - button = GrampsWidgets.IconButton(self.edit_button_press,handle) - self.attach.attach(GrampsWidgets.LinkBox(link_label,button), - _PDATA_START,_PDATA_STOP,self.row,self.row+1) + if handle: + link_label = GrampsWidgets.LinkLabel(self.get_name(handle,True), + self.button_press,handle) + button = GrampsWidgets.IconButton(self.edit_button_press,handle) + 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 def write_child(self,title,handle): diff --git a/src/DisplayTabs.py b/src/DisplayTabs.py index c3a82ceae..14c4271ee 100644 --- a/src/DisplayTabs.py +++ b/src/DisplayTabs.py @@ -1505,6 +1505,17 @@ class RepoEmbedList(EmbeddedList): def column_order(self): 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): from Editors import EditRepoRef @@ -1524,13 +1535,13 @@ class RepoEmbedList(EmbeddedList): self.rebuild() def edit_button_clicked(self,obj): - from Editors import EditRepositoryRef + from Editors import EditRepoRef ref = self.get_selected() if ref: repo = self.dbstate.db.get_repository_from_handle(ref.ref) try: - Editors.EditRepositoryRef( + Editors.EditRepoRef( self.dbstate, self.uistate, self.track, repo, ref, self.edit_callback) except Errors.WindowActiveError: