svn: r2480
This commit is contained in:
Don Allingham 2003-12-09 06:02:36 +00:00
parent 1ef8e7a9e1
commit 857a7cb777
9 changed files with 352 additions and 134 deletions

View File

@ -4,8 +4,11 @@
* src/AddrEdit.py: Add phone number
* src/EditPlace.py: Add phone number and postal code
* src/LocEdit.py: Add phone number and postal code
* src/edit_person.glade: Add address fields
* src/dialog.glade: Add address and phone fields
* src/edit_person.glade: Add postal code fields
* src/dialog.glade: Add postal code and phone fields
* src/places.glade: Add postal code
* src/WriteXML.py: Add support for new place and postal code fields
* src/GrampsParser.py: Add support for new place and postal code fields
2003-12-08 Richard Bos <radoeka@xs4all.nl>
* configure.in: catch the SUSE usage of "gnome.gconf" instead of

View File

@ -134,7 +134,7 @@ target_alias = @target_alias@
SUBDIRS = src doc example
EXTRA_DIST = autogen.sh gramps.spec.in COPYING-DOCS FAQ
EXTRA_DIST = autogen.sh gramps.spec.in gramps.spec COPYING-DOCS FAQ
bin_SCRIPTS = gramps
@ -382,9 +382,6 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
@ -557,9 +554,6 @@ uninstall-info: uninstall-info-recursive
gramps: gramps.sh
cp gramps.sh gramps
dist-hook: gramps.spec
cp gramps.spec $(distdir)
.PHONY: pycheck trans
pycheck:

7
gramps2/configure vendored
View File

@ -1635,7 +1635,7 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
RELEASE=0.CVS$(head -c 10 ${srcdir}/ChangeLog | tr -d '-')
RELEASE=1
VERSIONSTRING=$VERSION
if test x"$RELEASE" != "x"
@ -1764,7 +1764,7 @@ echo "${ECHO_T}no" >&6
fi
LANGUAGES="hu zh_CN cs da_DK de es fr it nb nl no pl pt_BR ro ru sv"
LANGUAGES="hu zh_CN cs da_DK de es fr it nb nl no pl pt_BR ro ru sv eo"
DISTLANGS=
@ -3227,6 +3227,9 @@ $pygtk_require
try:
import gconf
out("YES")
except ImportError:
import gnome.gconf
out("YES")
except ImportError:
out("NO")
EOF

View File

@ -200,6 +200,8 @@ entities = legal.xml\
mainwin.xml\
usage.xml\
custom.xml\
faq.xml\
keybind.xml\
filtref.xml\
cmdline.xml
@ -393,6 +395,14 @@ $(docname).xml: $(entities)
cd $(srcdir); \
cp $(entities) $$ourdir
.PHONY: distclean-hook
distclean: distclean-hook
distclean-hook:
if [ $(top_srcdir) != $(top_builddir) ]; \
then \
rm -f $(entities); \
fi
app-dist-hook:
if test "$(figdir)"; then \
$(mkinstalldirs) $(distdir)/$(figdir); \

View File

@ -1,5 +1,5 @@
%define ver 0.98.0
%define rel 0.CVS20031126
%define rel 1
%define prefix /usr
%define localstatedir /var/lib
# Ensure that internal RPM macros for configure & makeinstall
@ -11,7 +11,7 @@ Summary: Genealogical Research and Analysis Management Programming System.
Name: gramps
Version: %ver
Release: %rel
Copyright: GPL
License: GPL
Group: Applications/Genealogy
Source: http://download.sourceforge.net/gramps/gramps-%{ver}.tar.gz
BuildRoot: /var/tmp/%{name}-%{version}-root
@ -70,7 +70,7 @@ rm -rf $RPM_BUILD_ROOT
%files -f gramps.lang
%defattr(-, root, root)
%doc README COPYING TODO INSTALL COPYING-DOCS
%doc AUTHORS COPYING COPYING-DOCS ChangeLog FAQ INSTALL NEWS README TODO
%doc %{_mandir}/man1/*
%{prefix}/bin/gramps
@ -89,6 +89,10 @@ if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi
if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi
%changelog
* Tue Dec 2 2003 Tim Waugh <twaugh@redhat.com>
- More docs.
- Change Copyright: to License:.
* Fri Sep 19 2003 Tim Waugh <twaugh@redhat.com>
- Own %%{_datadir/gramps directory.
- Ship %%{_libdir}/gramps.

View File

@ -146,6 +146,7 @@ class EditPerson:
self.addr_state = self.get_widget("state")
self.addr_country = self.get_widget("country")
self.addr_postal = self.get_widget("postal")
self.addr_phone = self.get_widget("phone")
self.event_list = self.get_widget("eventList")
self.edit_person = self.get_widget("editPerson")
self.name_list = self.get_widget("nameList")
@ -1205,6 +1206,7 @@ class EditPerson:
self.addr_state.set_text(addr.getState())
self.addr_country.set_text(addr.getCountry())
self.addr_postal.set_text(addr.getPostal())
self.addr_phone.set_text(addr.getPhone())
if len(addr.getSourceRefList()) > 0:
psrc = addr.getSourceRefList()[0]
self.addr_conf_field.set_text(const.confidence[psrc.getConfidence()])
@ -1221,6 +1223,7 @@ class EditPerson:
self.addr_state.set_text('')
self.addr_country.set_text('')
self.addr_postal.set_text('')
self.addr_phone.set_text('')
self.addr_conf_field.set_text('')
self.addr_src_field.set_text('')
self.addr_delete_btn.set_sensitive(0)

View File

@ -124,6 +124,7 @@ class GrampsParser:
"created" : (self.start_created, None),
"ref" : (None, self.stop_ref),
"database" : (None, None),
"phone" : (None, self.stop_phone),
"date" : (None, self.stop_date),
"cause" : (None, self.stop_cause),
"description": (None, self.stop_description),
@ -256,6 +257,10 @@ class GrampsParser:
take up quite a bit of time"""
loc = RelLib.Location()
if attrs.has_key('phone'):
loc.phone = attrs['phone']
if attrs.has_key('postal'):
loc.postal = attrs['postal']
if attrs.has_key('city'):
loc.city = attrs['city']
if attrs.has_key('parish'):
@ -736,6 +741,9 @@ class GrampsParser:
date.set(tag)
self.source_ref.setDate(date)
def stop_phone(self,tag):
self.address.setPhone(tag)
def stop_street(self,tag):
self.address.setStreet(tag)

View File

@ -255,6 +255,7 @@ class XmlWriter:
self.write_line("state",address.getState(),4)
self.write_line("country",address.getCountry(),4)
self.write_line("postal",address.getPostal(),4)
self.write_line("phone",address.getPhone(),4)
if address.getNote() != "":
self.write_note("note",address.getNote(),4)
for s in address.getSourceRefList():
@ -604,6 +605,8 @@ class XmlWriter:
state = self.fix(loc.get_state())
country = self.fix(loc.get_country())
county = self.fix(loc.get_county())
zip = self.fix(loc.get_postal_code())
phone = self.fix(loc.get_phone())
if not city and not state and not parish and not county and not country:
return
@ -619,6 +622,10 @@ class XmlWriter:
self.g.write(' state="%s"' % state)
if country:
self.g.write(' country="%s"' % country)
if zip:
self.g.write(' postal="%s"' % zip)
if phone:
self.g.write(' phone="%s"' % phone)
self.g.write('/>\n')
def write_attribute_list(self, list, indent=3):

View File

@ -119,7 +119,7 @@
<widget class="GtkTable" id="table19">
<property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">9</property>
<property name="n_rows">11</property>
<property name="n_columns">4</property>
<property name="homogeneous">False</property>
<property name="row_spacing">6</property>
@ -258,8 +258,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -286,8 +286,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="top_attach">9</property>
<property name="bottom_attach">10</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -314,8 +314,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="top_attach">10</property>
<property name="bottom_attach">11</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -471,8 +471,8 @@
<packing>
<property name="left_attach">2</property>
<property name="right_attach">4</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="y_options"></property>
</packing>
</child>
@ -492,8 +492,8 @@
<packing>
<property name="left_attach">2</property>
<property name="right_attach">4</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="top_attach">9</property>
<property name="bottom_attach">10</property>
<property name="y_options"></property>
</packing>
</child>
@ -513,8 +513,8 @@
<packing>
<property name="left_attach">2</property>
<property name="right_attach">4</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="top_attach">10</property>
<property name="bottom_attach">11</property>
<property name="y_options"></property>
</packing>
</child>
@ -542,6 +542,98 @@
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label290">
<property name="visible">True</property>
<property name="label" translatable="yes">_ZIP/Postal code:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">postal</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="postal">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">4</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label291">
<property name="visible">True</property>
<property name="label" translatable="yes">P_hone:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">phone</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="phone">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">4</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="tab_expand">False</property>
@ -579,7 +671,7 @@
<property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">6</property>
<property name="n_columns">3</property>
<property name="n_columns">5</property>
<property name="homogeneous">False</property>
<property name="row_spacing">3</property>
<property name="column_spacing">12</property>
@ -632,32 +724,6 @@
</packing>
</child>
<child>
<widget class="GtkLabel" id="loc_county">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_padding">3</property>
<property name="y_padding">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label270">
<property name="visible">True</property>
@ -706,6 +772,131 @@
</packing>
</child>
<child>
<widget class="GtkLabel" id="label280">
<property name="visible">True</property>
<property name="label" translatable="yes">Church parish:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="loc_city">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">5</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_padding">3</property>
<property name="y_padding">3</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="loc_parish">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">5</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_padding">3</property>
<property name="y_padding">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="loc_county">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">5</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_padding">3</property>
<property name="y_padding">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label292">
<property name="visible">True</property>
<property name="label" translatable="yes">Zip/Postal code:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="loc_state">
<property name="visible">True</property>
@ -727,6 +918,52 @@
<property name="bottom_attach">5</property>
<property name="x_padding">3</property>
<property name="y_padding">3</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="loc_postal">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">4</property>
<property name="right_attach">5</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label286">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Other names&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">5</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -759,7 +996,31 @@
</child>
<child>
<widget class="GtkLabel" id="loc_city">
<widget class="GtkLabel" id="loc_phone_label">
<property name="visible">True</property>
<property name="label" translatable="yes">Phone:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="loc_phone">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
@ -773,85 +1034,10 @@
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_padding">3</property>
<property name="y_padding">3</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label280">
<property name="visible">True</property>
<property name="label" translatable="yes">Church parish:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="loc_parish">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_padding">3</property>
<property name="y_padding">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label286">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Other names&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">3</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
<property name="left_attach">4</property>
<property name="right_attach">5</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>