diff --git a/gramps/TODO b/gramps/TODO index 396d08b23..79168315c 100644 --- a/gramps/TODO +++ b/gramps/TODO @@ -27,9 +27,5 @@ Python 2.0 provides a zip interface, so this may need to hold off until the move is made to Python 2.0. * Sort all lists -* Implement a "Preferred Family" concept for each person. Currently, the - alternate family/main family is kind of awkward, since the main family - must now be the birth family. Many people would view an adopted family - as the main family. * Startup tips. * And a whole lot more.... diff --git a/gramps/example/gramps/data.gramps b/gramps/example/gramps/data.gramps index 84087ac0a..e2ce3daee 100644 Binary files a/gramps/example/gramps/data.gramps and b/gramps/example/gramps/data.gramps differ diff --git a/gramps/gramps.spec b/gramps/gramps.spec index 39f669958..af7e225ba 100644 --- a/gramps/gramps.spec +++ b/gramps/gramps.spec @@ -1,4 +1,4 @@ -%define ver 0.7.2 +%define ver 0.7.3 %define rel 1 %define prefix /usr @@ -55,6 +55,7 @@ rm -rf $RPM_BUILD_ROOT %{prefix}/share/locale/*/LC_MESSAGES/gramps.mo %{prefix}/share/gramps/*.py %{prefix}/share/gramps/data/*.xml +%{prefix}/share/gramps/data/templates/* %{prefix}/share/gramps/*.pyo %{prefix}/share/gramps/*.so %{prefix}/share/gramps/*.glade diff --git a/gramps/src/EditPerson.glade b/gramps/src/EditPerson.glade index a00c49f98..929f57a8d 100644 --- a/gramps/src/EditPerson.glade +++ b/gramps/src/EditPerson.glade @@ -9,7 +9,10 @@ pixmaps C True - True + False + False + False + False diff --git a/gramps/src/EditPerson.py b/gramps/src/EditPerson.py index 192d22fd4..d0f0af39e 100644 --- a/gramps/src/EditPerson.py +++ b/gramps/src/EditPerson.py @@ -1562,3 +1562,18 @@ def reorder_child_list(person, list): list.insert(target,person) return list + +if __name__ == "__main__": + import RelLib + import os + import intl + import locale + + intl.textdomain("gramps") + intl.bindtextdomain("gramps","locale") + locale.setlocale(locale.LC_NUMERIC,"C") + + d = RelLib.GrampsDB() + p = RelLib.Person() + EditPerson(p,d) + gtk.mainloop() diff --git a/gramps/src/GenericFilter.py b/gramps/src/GenericFilter.py index 5cbfe6a31..4d51590ca 100644 --- a/gramps/src/GenericFilter.py +++ b/gramps/src/GenericFilter.py @@ -42,6 +42,9 @@ import os from string import find,join,strip,replace import gtk +from latin_utf8 import utf8_to_latin +u2l = utf8_to_latin + #------------------------------------------------------------------------- # # GRAMPS modules @@ -741,30 +744,30 @@ class FilterParser(handler.ContentHandler): def startElement(self,tag,attrs): if tag == "filter": self.f = GenericFilter() - self.f.set_name(attrs['name']) + self.f.set_name(u2l(attrs['name'])) if attrs.has_key('function'): try: - if int(attrs['function']): + if int(u2l(attrs['function'])): op = 'or' else: op = 'and' except ValueError: - op = attrs['function'] + op = u2l(attrs['function']) self.f.set_logical_op(op) if attrs.has_key('comment'): - self.f.set_comment(attrs['comment']) + self.f.set_comment(u2l(attrs['comment'])) if attrs.has_key('invert'): try: - self.f.set_invert(int(attrs['invert'])) + self.f.set_invert(int(u2l(attrs['invert']))) except ValueError: pass self.gfilter_list.add(self.f) elif tag == "rule": - name = _(attrs['class']) + name = _(u2l(attrs['class'])) self.a = [] self.cname = tasks[name] elif tag == "arg": - self.a.append(attrs['value']) + self.a.append(u2l(attrs['value'])) def endElement(self,tag): if tag == "rule": diff --git a/gramps/src/Report.py b/gramps/src/Report.py index 1d6e99ef3..e70e67254 100644 --- a/gramps/src/Report.py +++ b/gramps/src/Report.py @@ -1029,7 +1029,7 @@ class TemplateParser(handler.ContentHandler): def startElement(self,tag,attrs): if tag == "template": - self.data[attrs['title']] = "%s/%s" % (self.path,attrs['file']) + self.data[attrs['title']] = attrs['file'] def characters(self, data): pass diff --git a/gramps/src/TarFile.py b/gramps/src/TarFile.py index 3f3c530e8..1ce088f10 100644 --- a/gramps/src/TarFile.py +++ b/gramps/src/TarFile.py @@ -18,6 +18,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # import gzip +import cStringIO +import string _BLKSIZE=512 nul = '\0' @@ -73,14 +75,45 @@ class TarFile: self.f.write('\0' * rem) self.f.close() - class ReadTarFile: def __init__(self,name,wd): self.name = name self.wd = wd self.f = gzip.open(name,"rb") self.pos = 0 - + + def extract_files(self): + map = {} + while 1: + buf = self.f.read(100) + if buf == '': + return + index = 0 + for b in buf: + if b != '\0': + index = index + 1 + else: + if index == 0: + return map + continue + filename = buf[0:index] + if filename == None: + return map + self.f.read(24) # modes + l = string.replace(self.f.read(12),chr(0),' ') + length = string.atoi(l,8) + self.f.read(12) + self.f.read(6) + self.f.read(111) + + self.f.read(64) + self.f.read(183) + foo = cStringIO.StringIO() + map[filename] = foo + foo.write(self.f.read(length)) + foo.reset() + self.f.read(_BLKSIZE-(length%_BLKSIZE)) + def extract(self): while 1: buf = self.f.read(100) @@ -115,4 +148,4 @@ class ReadTarFile: if __name__ == "__main__": a = ReadTarFile("out.gpkg",".") a.extract() - a.close() \ No newline at end of file + a.close() diff --git a/gramps/src/build_po b/gramps/src/build_po index 2828b34e3..b9aec0dde 100755 --- a/gramps/src/build_po +++ b/gramps/src/build_po @@ -4,5 +4,5 @@ then mv po/template.po po/template.po.bak fi -./get_strings -o po/template.po *.py */*.py *.glade */*.glade +./get_strings -o po/template.po *.py */*.py *.glade */*.glade diff --git a/gramps/src/data/Makefile.in b/gramps/src/data/Makefile.in index d59746c7e..a8b1644d8 100644 --- a/gramps/src/data/Makefile.in +++ b/gramps/src/data/Makefile.in @@ -12,7 +12,9 @@ all: install: ${INSTALL} -d ${data} + ${INSTALL} -d ${data}/templates ${INSTALL} gedcom.xml ${data} + ${INSTALL} templates/* ${data}/templates uninstall: diff --git a/gramps/src/data/templates/blue_edge.tpkg b/gramps/src/data/templates/blue_edge.tpkg new file mode 100644 index 000000000..3946012dc Binary files /dev/null and b/gramps/src/data/templates/blue_edge.tpkg differ diff --git a/gramps/src/data/templates/marble.tpkg b/gramps/src/data/templates/marble.tpkg new file mode 100644 index 000000000..78c4e8561 Binary files /dev/null and b/gramps/src/data/templates/marble.tpkg differ diff --git a/gramps/src/data/templates/pink_marble.tpkg b/gramps/src/data/templates/pink_marble.tpkg new file mode 100644 index 000000000..81d02d5bb Binary files /dev/null and b/gramps/src/data/templates/pink_marble.tpkg differ diff --git a/gramps/src/data/templates/sky_border.tpkg b/gramps/src/data/templates/sky_border.tpkg new file mode 100644 index 000000000..e647dd633 Binary files /dev/null and b/gramps/src/data/templates/sky_border.tpkg differ diff --git a/gramps/src/data/templates/templates.xml b/gramps/src/data/templates/templates.xml new file mode 100644 index 000000000..948d4891c --- /dev/null +++ b/gramps/src/data/templates/templates.xml @@ -0,0 +1,6 @@ + +