7309: Jump to Gramps ID functionality added to *fanchart*

This commit is contained in:
SNoiraud
2016-12-05 14:22:56 +01:00
parent 3646f2a86c
commit 8c7b0f8585
3 changed files with 42 additions and 0 deletions

View File

@@ -104,9 +104,23 @@ class FanChart2WayView(fanchart2way.FanChart2WayGrampsGUI, NavigationView):
self.additional_uis.append(self.additional_ui())
self.allfonts = [x for x in enumerate(SystemFonts().get_system_fonts())]
self.func_list.update({
'<PRIMARY>J' : self.jump,
})
def navigation_type(self):
return 'Person'
def get_handle_from_gramps_id(self, gid):
"""
returns the handle of the specified object
"""
obj = self.dbstate.db.get_person_from_gramps_id(gid)
if obj:
return obj.get_handle()
else:
return None
def build_widget(self):
self.set_fan(fanchart2way.FanChart2WayWidget(self.dbstate, self.uistate,
self.on_popup))

View File

@@ -99,9 +99,23 @@ class FanChartDescView(fanchartdesc.FanChartDescGrampsGUI, NavigationView):
self.additional_uis.append(self.additional_ui())
self.allfonts = [x for x in enumerate(SystemFonts().get_system_fonts())]
self.func_list.update({
'<PRIMARY>J' : self.jump,
})
def navigation_type(self):
return 'Person'
def get_handle_from_gramps_id(self, gid):
"""
returns the handle of the specified object
"""
obj = self.dbstate.db.get_person_from_gramps_id(gid)
if obj:
return obj.get_handle()
else:
return None
def build_widget(self):
self.set_fan(fanchartdesc.FanChartDescWidget(self.dbstate, self.uistate,
self.on_popup))

View File

@@ -96,9 +96,23 @@ class FanChartView(fanchart.FanChartGrampsGUI, NavigationView):
self.additional_uis.append(self.additional_ui())
self.allfonts = [x for x in enumerate(SystemFonts().get_system_fonts())]
self.func_list.update({
'<PRIMARY>J' : self.jump,
})
def navigation_type(self):
return 'Person'
def get_handle_from_gramps_id(self, gid):
"""
returns the handle of the specified object
"""
obj = self.dbstate.db.get_person_from_gramps_id(gid)
if obj:
return obj.get_handle()
else:
return None
def build_widget(self):
self.set_fan(fanchart.FanChartWidget(self.dbstate, self.uistate, self.on_popup))
self.scrolledwindow = Gtk.ScrolledWindow(hadjustment=None,