From 0765641c125098005e035ead2628705b45400d9e Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 16 Nov 2006 04:47:34 +0000 Subject: [PATCH] * src/Editors/_EditPerson.py: save previous window size * data/gramps.schemas.in: default transactions to off, previous editperson window size * src/Config/_GrampsConfigKeys.py: default transaction to off, previous editperson window size svn: r7632 --- ChangeLog | 5 +++-- data/gramps.schemas.in | 24 ++++++++++++++++++++++++ src/Config/_GrampsConfigKeys.py | 8 ++++++-- src/Editors/_EditPerson.py | 8 ++++++++ 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef5d122a6..546436eea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2006-11-15 Don Allingham - * data/gramps.schemas.in: default transactions to off - * src/Config/_GrampsConfigKeys.py: default transaction to off + * src/Editors/_EditPerson.py: save previous window size + * data/gramps.schemas.in: default transactions to off, previous editperson window size + * src/Config/_GrampsConfigKeys.py: default transaction to off, previous editperson window size * src/Editors/_EditFamily.py: remove dead code * src/plugins/DetDescendantReport.py: remove dead code diff --git a/data/gramps.schemas.in b/data/gramps.schemas.in index ae636a7e0..f551404a6 100644 --- a/data/gramps.schemas.in +++ b/data/gramps.schemas.in @@ -285,6 +285,30 @@ + + /schemas/apps/gramps/interface/person-height + /apps/gramps/interface/person-height + gramps + int + 550 + + Height of the person editor interface. + Specifies the height of the person editor interface. + + + + + /schemas/apps/gramps/interface/person-width + /apps/gramps/interface/person-width + gramps + int + 750 + + Width of the person editor interface. + Specifies the width of the person editor interface. + + + /schemas/apps/gramps/interface/filter /apps/gramps/interface/filter diff --git a/src/Config/_GrampsConfigKeys.py b/src/Config/_GrampsConfigKeys.py index 457140adc..8dff0e3b5 100644 --- a/src/Config/_GrampsConfigKeys.py +++ b/src/Config/_GrampsConfigKeys.py @@ -41,8 +41,10 @@ DATE_FORMAT = ('preferences','date-format', 1) DONT_ASK = ('interface','dont-ask', 0) HEIGHT = ('interface','height', 1) WIDTH = ('interface','width', 1) -FAMILY_HEIGHT = ('interface','family_height', 1) -FAMILY_WIDTH = ('interface','family_width', 1) +FAMILY_HEIGHT = ('interface','family-height', 1) +FAMILY_WIDTH = ('interface','family-width', 1) +PERSON_HEIGHT = ('interface','person-height', 1) +PERSON_WIDTH = ('interface','person-width', 1) FILTER = ('interface','filter', 0) FPREFIX = ('preferences','fprefix', 2) EPREFIX = ('preferences','eprefix', 2) @@ -107,6 +109,8 @@ default_value = { WIDTH : 775, FAMILY_HEIGHT : 500, FAMILY_WIDTH : 700, + PERSON_HEIGHT : 550, + PERSON_WIDTH : 750, FILTER : False, FPREFIX : 'F%04d', EPREFIX : 'E%04d', diff --git a/src/Editors/_EditPerson.py b/src/Editors/_EditPerson.py index e3c9273a3..e73456487 100644 --- a/src/Editors/_EditPerson.py +++ b/src/Editors/_EditPerson.py @@ -126,6 +126,9 @@ class EditPerson(EditPrimary): title = _('Edit Person') + ' (%s)' % name self.set_window(self.top.get_widget("edit_person"), None, title) + width = Config.get(Config.PERSON_WIDTH) + height = Config.get(Config.PERSON_HEIGHT) + self.window.set_default_size(width, height) self.obj_photo = self.top.get_widget("personPix") self.eventbox = self.top.get_widget("eventbox1") @@ -698,6 +701,11 @@ class EditPerson(EditPrimary): child_ref_list.insert(target, ref) return child_ref_list + def _cleanup_on_exit(self): + (width, height) = self.window.get_size() + Config.set(Config.PERSON_WIDTH, width) + Config.set(Config.PERSON_HEIGHT, height) + Config.sync() class GenderDialog(gtk.MessageDialog):