7309: Jump to Gramps ID functionality added to *fanchart*
This commit is contained in:
@@ -104,9 +104,23 @@ class FanChart2WayView(fanchart2way.FanChart2WayGrampsGUI, NavigationView):
|
|||||||
self.additional_uis.append(self.additional_ui())
|
self.additional_uis.append(self.additional_ui())
|
||||||
self.allfonts = [x for x in enumerate(SystemFonts().get_system_fonts())]
|
self.allfonts = [x for x in enumerate(SystemFonts().get_system_fonts())]
|
||||||
|
|
||||||
|
self.func_list.update({
|
||||||
|
'<PRIMARY>J' : self.jump,
|
||||||
|
})
|
||||||
|
|
||||||
def navigation_type(self):
|
def navigation_type(self):
|
||||||
return 'Person'
|
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):
|
def build_widget(self):
|
||||||
self.set_fan(fanchart2way.FanChart2WayWidget(self.dbstate, self.uistate,
|
self.set_fan(fanchart2way.FanChart2WayWidget(self.dbstate, self.uistate,
|
||||||
self.on_popup))
|
self.on_popup))
|
||||||
|
@@ -99,9 +99,23 @@ class FanChartDescView(fanchartdesc.FanChartDescGrampsGUI, NavigationView):
|
|||||||
self.additional_uis.append(self.additional_ui())
|
self.additional_uis.append(self.additional_ui())
|
||||||
self.allfonts = [x for x in enumerate(SystemFonts().get_system_fonts())]
|
self.allfonts = [x for x in enumerate(SystemFonts().get_system_fonts())]
|
||||||
|
|
||||||
|
self.func_list.update({
|
||||||
|
'<PRIMARY>J' : self.jump,
|
||||||
|
})
|
||||||
|
|
||||||
def navigation_type(self):
|
def navigation_type(self):
|
||||||
return 'Person'
|
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):
|
def build_widget(self):
|
||||||
self.set_fan(fanchartdesc.FanChartDescWidget(self.dbstate, self.uistate,
|
self.set_fan(fanchartdesc.FanChartDescWidget(self.dbstate, self.uistate,
|
||||||
self.on_popup))
|
self.on_popup))
|
||||||
|
@@ -96,9 +96,23 @@ class FanChartView(fanchart.FanChartGrampsGUI, NavigationView):
|
|||||||
self.additional_uis.append(self.additional_ui())
|
self.additional_uis.append(self.additional_ui())
|
||||||
self.allfonts = [x for x in enumerate(SystemFonts().get_system_fonts())]
|
self.allfonts = [x for x in enumerate(SystemFonts().get_system_fonts())]
|
||||||
|
|
||||||
|
self.func_list.update({
|
||||||
|
'<PRIMARY>J' : self.jump,
|
||||||
|
})
|
||||||
|
|
||||||
def navigation_type(self):
|
def navigation_type(self):
|
||||||
return 'Person'
|
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):
|
def build_widget(self):
|
||||||
self.set_fan(fanchart.FanChartWidget(self.dbstate, self.uistate, self.on_popup))
|
self.set_fan(fanchart.FanChartWidget(self.dbstate, self.uistate, self.on_popup))
|
||||||
self.scrolledwindow = Gtk.ScrolledWindow(hadjustment=None,
|
self.scrolledwindow = Gtk.ScrolledWindow(hadjustment=None,
|
||||||
|
Reference in New Issue
Block a user