diff --git a/gramps2/example/gramps/data.gramps b/gramps2/example/gramps/data.gramps
index 8a29c2c71..d70cc9cda 100644
Binary files a/gramps2/example/gramps/data.gramps and b/gramps2/example/gramps/data.gramps differ
diff --git a/gramps2/src/GrampsCfg.py b/gramps2/src/GrampsCfg.py
index 3c7214249..b9fa2940e 100644
--- a/gramps2/src/GrampsCfg.py
+++ b/gramps2/src/GrampsCfg.py
@@ -211,7 +211,8 @@ def loadConfig(call):
global mediaref
global globalprop
global localprop
-
+ global capitalize
+
_callback = call
lastfile = get_string("/apps/gramps/last-file")
uselds = get_bool("/apps/gramps/use-lds")
@@ -459,7 +460,7 @@ class ConfigCheckbox(ConfigWidget):
class ConfigFile(ConfigWidget):
def get_widgets(self):
- self.w = gnome.ui.GnomeFileEntry(self.tag)
+ self.w = gnome.ui.FileEntry(self.tag)
lbl = gtk.Label(self.l)
self.w.show()
lbl.show()
diff --git a/gramps2/src/ImageSelect.py b/gramps2/src/ImageSelect.py
index 3bd39db47..5cb49b3e6 100644
--- a/gramps2/src/ImageSelect.py
+++ b/gramps2/src/ImageSelect.py
@@ -328,12 +328,22 @@ class Gallery(ImageSelect):
if x != self.cx or y != self.cy:
grp.move(self.cx-x,self.cy-y)
else:
+ import gobject
+
name = Utils.thumb_path(self.db.getSavePath(),object)
description = object.getDescription()
if len(description) > 20:
description = "%s..." % description[0:20]
- image = gtk.gdk.pixbuf_new_from_file(name)
+ try:
+ image = gtk.gdk.pixbuf_new_from_file(name)
+ except gobject.GError,msg:
+ ErrorDialog(str(msg))
+ image = gtk.gdk.pixbuf_new_from_file(const.icon)
+ except:
+ ErrorDialog(_("Thumbnail %s could not be found") % name)
+ image = gtk.gdk.pixbuf_new_from_file(const.icon)
+
x = image.get_width()
y = image.get_height()
diff --git a/gramps2/src/MediaView.py b/gramps2/src/MediaView.py
index 36428e7f5..50e42f420 100644
--- a/gramps2/src/MediaView.py
+++ b/gramps2/src/MediaView.py
@@ -136,7 +136,8 @@ class MediaView:
if pexists and os.path.exists(thumb_path):
self.preview.set_from_pixbuf(gtk.gdk.pixbuf_new_from_file(thumb_path))
else:
- self.preview.set_from_pixbuf(Utils.find_icon(type))
+ icon_image = gtk.gdk.pixbuf_new_from_file(Utils.find_icon(type))
+ self.preview.set_from_pixbuf(icon_image)
if not pexists:
fexists = 0
diff --git a/gramps2/src/ansel_utf8.py b/gramps2/src/ansel_utf8.py
index 051b20476..9b6b9b717 100644
--- a/gramps2/src/ansel_utf8.py
+++ b/gramps2/src/ansel_utf8.py
@@ -278,6 +278,7 @@ _utoa = {
def ansel_to_utf8(s):
"""Converts an ANSEL encoded string to UTF8"""
+ print s
buff = cStringIO.StringIO()
while s:
c0 = ord(s[0])
@@ -285,18 +286,25 @@ def ansel_to_utf8(s):
head = u' '
s = s[1:]
elif c0 > 127:
- if _twobyte.has_key(s[0:2]):
- head = _twobyte[s[0:2]]
+ l2 = s[0:2]
+ l1 = s[0]
+ print "----------------------"
+ if _twobyte.has_key(l2):
+ head = _twobyte[l2]
s = s[2:]
- elif _onebyte.has_key(s[0]):
- head = _onebyte[s[0]]
+ print "two"
+ elif _onebyte.has_key(l1):
+ head = _onebyte[l1]
s = s[1:]
+ print "**8 one",l1,ord(l1),"*",_onebyte[l1],
else:
head = u'\xff\xfd'
s = s[1:]
+ print "barf"
else:
head = s[0]
s = s[1:]
+ print head,c0
buff.write(head)
ans = buff.getvalue()
buff.close()
diff --git a/gramps2/src/const.py b/gramps2/src/const.py
index 53f3bf159..67099d4a8 100644
--- a/gramps2/src/const.py
+++ b/gramps2/src/const.py
@@ -100,7 +100,7 @@ startup = 1
#-------------------------------------------------------------------------
progName = "GRAMPS"
version = "0.9.0-rc5"
-copyright = "© 2001-2003 Donald N. Allingham"
+copyright = unicode("© 2001-2003 Donald N. Allingham","iso-8859-1")
authors = ["Donald N. Allingham", "David Hampton","Donald A. Peterson"]
comments = _("GRAMPS (Genealogical Research and Analysis "
"Management Programming System) is a personal "
@@ -130,8 +130,8 @@ childRelations = {
_("Birth") : "Birth",
_("Adopted") : "Adopted",
_("Stepchild") : "Stepchild",
- _("Foster") : "Foster",
_("Sponsored") : "Sponsored",
+ _("Foster") : "Foster",
_("None") : "None",
_("Unknown") : "Unknown",
_("Other") : "Other",
diff --git a/gramps2/src/const.py.in b/gramps2/src/const.py.in
index 4fba743dc..83be277d6 100644
--- a/gramps2/src/const.py.in
+++ b/gramps2/src/const.py.in
@@ -100,7 +100,7 @@ startup = 1
#-------------------------------------------------------------------------
progName = "GRAMPS"
version = "@VERSIONSTRING@"
-copyright = "© 2001-2003 Donald N. Allingham"
+copyright = unicode("© 2001-2003 Donald N. Allingham","iso-8859-1")
authors = ["Donald N. Allingham", "David Hampton","Donald A. Peterson"]
comments = _("GRAMPS (Genealogical Research and Analysis "
"Management Programming System) is a personal "
diff --git a/gramps2/src/docgen/PSDrawDoc.py b/gramps2/src/docgen/PSDrawDoc.py
index c84c9b091..4c37427fc 100644
--- a/gramps2/src/docgen/PSDrawDoc.py
+++ b/gramps2/src/docgen/PSDrawDoc.py
@@ -26,6 +26,8 @@ from intl import gettext as _
import TextDoc
import DrawDoc
+def pt2cm(val):
+ return (float(val)/72.0)*2.54
class PSDrawDoc(DrawDoc.DrawDoc):
@@ -111,18 +113,45 @@ class PSDrawDoc(DrawDoc.DrawDoc):
self.f.write('%%PageTrailer\n')
def draw_text(self,style,text,x1,y1):
- x1 = x1 + self.lmargin
- y1 = y1 + self.tmargin
-
stype = self.draw_styles[style]
para_name = stype.get_paragraph_style()
p = self.style_list[para_name]
+
+ x1 = x1 + self.lmargin
+ y1 = y1 + self.tmargin + pt2cm(p.get_font().get_size())
+
self.f.write('gsave\n')
self.f.write('%f cm %f cm moveto\n' % self.translate(x1,y1))
self.f.write(self.fontdef(p))
self.f.write('(%s) show\n' % text)
self.f.write('grestore\n')
+ def draw_path(self,style,path,fill):
+ stype = self.draw_styles[style]
+ self.f.write('gsave\n')
+ self.f.write('newpath\n')
+ self.f.write('%d setlinewidth\n' % stype.get_line_width())
+ if stype.get_line_style() == DrawDoc.SOLID:
+ self.f.write('[] 0 setdash\n')
+ else:
+ self.f.write('[2 4] 0 setdash\n')
+
+ point = path[0]
+ x1 = point[0]+self.lmargin
+ y1 = point[1]+self.tmargin
+ self.f.write('%f cm %f cm moveto\n' % self.translate(x1,y1))
+
+ for point in path[1:]:
+ x1 = point[0]+self.lmargin
+ y1 = point[1]+self.tmargin
+ self.f.write('%f cm %f cm lineto\n' % self.translate(x1,y1))
+ self.f.write('closepath\n')
+ if fill:
+ self.f.write('fill\n')
+ else:
+ self.f.write('stroke\n')
+ self.f.write('grestore\n')
+
def draw_line(self,style,x1,y1,x2,y2):
x1 = x1 + self.lmargin
x2 = x2 + self.lmargin
diff --git a/gramps2/src/edit_person.glade b/gramps2/src/edit_person.glade
index d56921e86..e270c291f 100644
--- a/gramps2/src/edit_person.glade
+++ b/gramps2/src/edit_person.glade
@@ -1461,7 +1461,7 @@
True
- 6
+ 7
6
False
0
@@ -1532,8 +1532,8 @@
0
1
- 2
- 3
+ 3
+ 4
fill
@@ -1604,8 +1604,8 @@
1
2
- 2
- 3
+ 3
+ 4
fill
@@ -1628,8 +1628,8 @@
1
2
- 5
- 6
+ 6
+ 7
fill
@@ -1652,8 +1652,8 @@
1
2
- 3
- 4
+ 4
+ 5
fill
@@ -1676,8 +1676,8 @@
0
1
- 3
- 4
+ 4
+ 5
fill
@@ -1700,8 +1700,8 @@
0
1
- 4
- 5
+ 5
+ 6
fill
@@ -1724,8 +1724,8 @@
1
2
- 4
- 5
+ 5
+ 6
fill
@@ -1748,8 +1748,8 @@
0
1
- 5
- 6
+ 6
+ 7
fill
@@ -1761,7 +1761,7 @@
False
False
- GTK_JUSTIFY_CENTER
+ GTK_JUSTIFY_LEFT
False
False
0
@@ -1786,7 +1786,7 @@
False
False
- GTK_JUSTIFY_CENTER
+ GTK_JUSTIFY_LEFT
False
False
0
@@ -1812,33 +1812,7 @@
False
False
- GTK_JUSTIFY_CENTER
- False
- False
- 0
- 0.5
- 0
- 0
-
-
- 2
- 6
- 2
- 3
- 3
- 3
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_CENTER
+ GTK_JUSTIFY_LEFT
False
False
0
@@ -1859,12 +1833,12 @@
-
+
True
False
False
- GTK_JUSTIFY_CENTER
+ GTK_JUSTIFY_LEFT
False
False
0
@@ -1884,6 +1858,32 @@
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+
+
+ 2
+ 6
+ 5
+ 6
+ 3
+ 3
+ fill
+
+
+
+
True
@@ -1901,8 +1901,8 @@
3
4
- 5
- 6
+ 6
+ 7
fill
@@ -1925,8 +1925,8 @@
4
5
- 5
- 6
+ 6
+ 7
@@ -1938,7 +1938,7 @@
False
False
- GTK_JUSTIFY_CENTER
+ GTK_JUSTIFY_LEFT
False
False
0
@@ -1949,8 +1949,8 @@
2
3
- 5
- 6
+ 6
+ 7
3
3
@@ -1963,7 +1963,7 @@
False
False
- GTK_JUSTIFY_CENTER
+ GTK_JUSTIFY_LEFT
False
False
0
@@ -1974,8 +1974,82 @@
5
6
- 5
- 6
+ 6
+ 7
+
+
+
+
+
+
+ True
+ Surname Prefix
+ False
+ False
+ GTK_JUSTIFY_CENTER
+ False
+ False
+ 1
+ 0.5
+ 5
+ 3
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ :
+ False
+ False
+ GTK_JUSTIFY_CENTER
+ False
+ False
+ 0
+ 0.5
+ 0
+ 3
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+
+
+ 2
+ 6
+ 2
+ 3
+ 3
+ 3
+ fill
diff --git a/gramps2/src/plugins/DescendReport.py b/gramps2/src/plugins/DescendReport.py
index 86f9cbe35..eb6ce81ea 100644
--- a/gramps2/src/plugins/DescendReport.py
+++ b/gramps2/src/plugins/DescendReport.py
@@ -176,7 +176,7 @@ class DescendantReportDialog(Report.TextReportDialog):
#
#------------------------------------------------------------------------
def report(database,person):
- DescendantReportDialog(person,database)
+ DescendantReportDialog(database,person)
#------------------------------------------------------------------------
#
diff --git a/gramps2/src/plugins/ReadNative.py b/gramps2/src/plugins/ReadNative.py
index b09917d03..88db60f12 100644
--- a/gramps2/src/plugins/ReadNative.py
+++ b/gramps2/src/plugins/ReadNative.py
@@ -47,9 +47,12 @@ class ReadNative:
self.top = gtk.FileSelection("%s - GRAMPS" % _("Import from GRAMPS"))
self.top.hide_fileop_buttons()
self.top.ok_button.connect('clicked', self.on_ok_clicked)
- self.top.cancel_button.connect_object('clicked', Utils.destroy_passed_object,self.top)
+ self.top.cancel_button.connect('clicked', self.close_window)
self.top.show()
+ def close_window(self,obj):
+ self.top.destroy()
+
def show_display(self):
self.window = gtk.Window()
self.window.set_title(_("Import from GRAMPS"))