From f856636a5f19c33736e4343f1cc1e80592ec6aba Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 11 Jun 2003 03:01:46 +0000 Subject: [PATCH] * src/docgen/PdfDrawDoc.py: Support for rotated text and wedges * src/docgen/PSDrawDoc.py: Support for rotated text and wedges * src/StartupDialog.py: Attempt to seed the researcher name from the name entry in the passwd file svn: r1693 --- src/StartupDialog.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/StartupDialog.py b/src/StartupDialog.py index 6ae4efef0..91dd2835f 100644 --- a/src/StartupDialog.py +++ b/src/StartupDialog.py @@ -166,7 +166,17 @@ class StartupDialog: box.add(table) box.show_all() - self.name.set_text(self.get_string('/apps/gramps/researcher-name')) + name = self.get_string('/apps/gramps/researcher-name') + if name.strip() == "": + import pwd + import os + + try: + name = pwd.getpwnam(os.environ['USER'])[4] + except: + name = "" + + self.name.set_text(name) self.addr.set_text(self.get_string('/apps/gramps/researcher-addr')) self.city.set_text(self.get_string('/apps/gramps/researcher-city')) self.state.set_text(self.get_string('/apps/gramps/researcher-state'))