From d3cd682eaf0cc1565db3033ae79ba6aebaca6df8 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Wed, 3 Sep 2003 00:54:55 +0000 Subject: [PATCH] * src/gramps_main.py: Really fix start-up view when family view style is the default. Clean up the use of views. svn: r2084 --- ChangeLog | 4 ++++ src/gramps_main.py | 13 ++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 24863bed8..0c3415c40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-09-02 Alex Roitman + * src/gramps_main.py: Really fix start-up view when family + view style is the default. Clean up the use of views. + 2003-09-02 Tim Waugh * src/plugins/GraphViz.py: Fixed typo. * src/gramps_main.py: Fixed start-up view when family view style diff --git a/src/gramps_main.py b/src/gramps_main.py index ab69df1ad..acfea01ca 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -466,11 +466,14 @@ class Gramps: self.find_person = None self.find_source = None self.find_media = None + if GrampsCfg.defaultview == 0: - self.views.set_current_page(0) + self.views.set_current_page(PERSON_VIEW) + elif GrampsCfg.familyview == 0: + self.views.set_current_page(FAMILY_VIEW1) else: - self.views.set_current_page(2) - + self.views.set_current_page(FAMILY_VIEW2) + self.topWindow.show() def set_buttons(self,val): @@ -478,7 +481,7 @@ class Gramps: self.tools_menu.set_sensitive(val) self.report_button.set_sensitive(val) self.tool_button.set_sensitive(val) - if self.views.get_current_page() == 0: + if self.views.get_current_page() == PERSON_VIEW: self.remove_button.set_sensitive(val) self.edit_button.set_sensitive(val) @@ -1907,7 +1910,7 @@ class Gramps: self.db.buildPersonDisplay(epo.person.getId()) self.change_active_person(epo.person) self.redisplay_person_list(epo.person) - if self.views.get_current_page() == 1: + if self.views.get_current_page() in [FAMILY_VIEW1,FAMILY_VIEW2]: self.family_view.load_family() for p in plist: self.place_view.new_place_after_edit(p)