initial values in gconf for first time startup

svn: r1532
This commit is contained in:
Don Allingham 2003-05-15 00:25:26 +00:00
parent 4bc85824bd
commit b3de8dd49b
2 changed files with 19 additions and 12 deletions

View File

@ -1,5 +1,5 @@
%define ver 0.9.1 %define ver 0.9.1
%define rel pre1 %define rel rc1
%define prefix /usr %define prefix /usr
Summary: Genealogical Research and Analysis Management Programming System. Summary: Genealogical Research and Analysis Management Programming System.
@ -57,8 +57,7 @@ rm -rf $RPM_BUILD_ROOT
%{prefix}/bin/gramps %{prefix}/bin/gramps
%{_datadir}/gramps/doc/gramps-manual/C/* %{_datadir}/gramps/gnome/help/gramps/C/*
%{_datadir}/gnome/apps/Applications/gramps.desktop %{_datadir}/gnome/apps/Applications/gramps.desktop
%{_datadir}/pixmaps/gramps.png %{_datadir}/pixmaps/gramps.png
%{_datadir}/locale/*/LC_MESSAGES/gramps.mo %{_datadir}/locale/*/LC_MESSAGES/gramps.mo
@ -81,10 +80,11 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/gramps/data/gedcom.xml %{_datadir}/gramps/data/gedcom.xml
%{_datadir}/gramps/data/templates/*.tpkg %{_datadir}/gramps/data/templates/*.tpkg
%{_datadir}/gramps/data/templates/*.xml %{_datadir}/gramps/data/templates/*.xml
%{_datadir}/gramps/example/*
%{_datadir}/omf/gramps
%{prefix}/man/man1/gramps.1* %{prefix}/man/man1/gramps.1*
%{_datadir}/omf/gramps
%post %post
if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update -q -o %{_datadir}/omf/gramps; fi if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update -q -o %{_datadir}/omf/gramps; fi

View File

@ -102,6 +102,13 @@ class StartupDialog:
'contribute.\n\nPlease enjoy using GRAMPS.')) 'contribute.\n\nPlease enjoy using GRAMPS.'))
return p return p
def get_string(self,key):
val = self.client.get_string(key)
if val == None:
return ""
else:
return val
def complete(self,obj,obj2): def complete(self,obj,obj2):
self.client.set_string('/apps/gramps/researcher-name',self.name.get_text()) self.client.set_string('/apps/gramps/researcher-name',self.name.get_text())
self.client.set_string('/apps/gramps/researcher-addr',self.addr.get_text()) self.client.set_string('/apps/gramps/researcher-addr',self.addr.get_text())
@ -159,14 +166,14 @@ class StartupDialog:
box.add(table) box.add(table)
box.show_all() box.show_all()
self.name.set_text(self.client.get_string('/apps/gramps/researcher-name')) self.name.set_text(self.get_string('/apps/gramps/researcher-name'))
self.addr.set_text(self.client.get_string('/apps/gramps/researcher-addr')) self.addr.set_text(self.get_string('/apps/gramps/researcher-addr'))
self.city.set_text(self.client.get_string('/apps/gramps/researcher-city')) self.city.set_text(self.get_string('/apps/gramps/researcher-city'))
self.state.set_text(self.client.get_string('/apps/gramps/researcher-state')) self.state.set_text(self.get_string('/apps/gramps/researcher-state'))
self.postal.set_text(self.client.get_string('/apps/gramps/researcher-postal')) self.postal.set_text(self.get_string('/apps/gramps/researcher-postal'))
self.country.set_text(self.client.get_string('/apps/gramps/researcher-country')) self.country.set_text(self.get_string('/apps/gramps/researcher-country'))
self.phone.set_text(self.client.get_string('/apps/gramps/researcher-phone')) self.phone.set_text(self.get_string('/apps/gramps/researcher-phone'))
self.email.set_text(self.client.get_string('/apps/gramps/researcher-email')) self.email.set_text(self.get_string('/apps/gramps/researcher-email'))
return p return p