Default GuiOptions to use active person.

svn: r9962
This commit is contained in:
Brian Matherly 2008-01-30 05:12:51 +00:00
parent bccd2fc07d
commit 6dbc6c3348
2 changed files with 10 additions and 11 deletions

View File

@ -1,3 +1,6 @@
2008-01-29 Brian Matherly <brian@gramps-project.org>
* src/PluginUtils/_GuiOptions.py: Default GuiOptions to use active person.
2008-01-29 Brian Matherly <brian@gramps-project.org>
* src/docgen.ODFDoc.py: escape characters in image names for ODF output.

View File

@ -395,11 +395,9 @@ class GuiPersonOption(gtk.HBox):
self.pack_start(pevt, False)
self.pack_end(person_button, False)
person = self.__db.get_person_from_gramps_id(self.__option.get_value())
person = self.__dbstate.get_active_person()
if not person:
person = self.__dbstate.get_active_person()
if not person:
person = self.__db.get_default_person()
person = self.__db.get_default_person()
self.__update_person(person)
tooltip.set_tip(pevt, self.__option.get_help())
@ -488,14 +486,12 @@ class GuiFamilyOption(gtk.HBox):
self.pack_start(pevt, False)
self.pack_end(family_button, False)
family = self.__db.get_family_from_gramps_id(self.__option.get_value())
if not family:
person = self.__dbstate.get_active_person()
person = self.__dbstate.get_active_person()
family_list = person.get_family_handle_list()
if not family_list:
person = self.__db.get_default_person()
family_list = person.get_family_handle_list()
if not family_list:
person = self.__db.get_default_person()
family_list = person.get_family_handle_list()
family = self.__db.get_family_from_handle(family_list[0])
family = self.__db.get_family_from_handle(family_list[0])
self.__update_family(family)
tooltip.set_tip(pevt, self.__option.get_help())