From 1385c746fdbcba11cecd4b01a3cee24a74c35155 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 29 Dec 2006 03:58:26 +0000 Subject: [PATCH] 2006-12-28 Don Allingham * src/docgen/PdfDoc.py: convert image name to str from unicode due to a ReportLab bug. 2006-12-27 Don Allingham * configure.in: change version number to 2.2.5 svn: r7855 --- gramps2/ChangeLog | 7 +++++++ gramps2/configure.in | 6 +++--- gramps2/src/GrampsWidgets.py | 9 +++++++-- gramps2/src/docgen/PdfDoc.py | 6 +++--- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 36cb1599a..b2593faad 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,10 @@ +2006-12-28 Don Allingham + * src/docgen/PdfDoc.py: convert image name to str from unicode + due to a ReportLab bug. + +2006-12-27 Don Allingham + * configure.in: change version number to 2.2.5 + 2006-12-26 Zsolt Foldvari * src/GrampsWidgets.py: Add MaskedEntry, a widget to emulate the KiwiEntry from the Kiwi project. diff --git a/gramps2/configure.in b/gramps2/configure.in index ca13a72a3..ee8a65325 100644 --- a/gramps2/configure.in +++ b/gramps2/configure.in @@ -4,15 +4,15 @@ dnl Process this file with autoconf to produce a configure script. dnl May need to run automake && aclocal first AC_PREREQ(2.57) -AC_INIT(gramps, 2.2.4, [gramps-bugs@lists.sourceforge.net]) +AC_INIT(gramps, 2.2.5, [gramps-bugs@lists.sourceforge.net]) AC_CONFIG_SRCDIR(configure.in) AM_INIT_AUTOMAKE(1.6.3) AC_CONFIG_MACRO_DIR([m4]) GNOME_DOC_INIT -dnl RELEASE=0.SVN$(svnversion -n .) -RELEASE=1 +RELEASE=0.SVN$(svnversion -n .) +dnl RELEASE=1 VERSIONSTRING=$VERSION if test x"$RELEASE" != "x" diff --git a/gramps2/src/GrampsWidgets.py b/gramps2/src/GrampsWidgets.py index c94743d75..130fc4325 100644 --- a/gramps2/src/GrampsWidgets.py +++ b/gramps2/src/GrampsWidgets.py @@ -1769,6 +1769,10 @@ class MaskedEntry(gtk.Entry): def set_pixbuf(self, pixbuf): self._icon.set_pixbuf(pixbuf) + def set_stock(self, stock_name): + pixbuf = self.render_icon(stock_name, gtk.ICON_SIZE_MENU) + self._icon.set_pixbuf(pixbuf) + def update_background(self, color): self._icon.update_background(color) @@ -1794,8 +1798,9 @@ def main(args): widget = MaskedEntry() widget.set_mask('000.000.000.000') - pixbuf = gtk.gdk.pixbuf_new_from_file("images/stock_lock.png") - widget.set_pixbuf(pixbuf) +# pixbuf = gtk.gdk.pixbuf_new_from_file("images/stock_lock.png") +# widget.set_pixbuf(pixbuf) + widget.set_stock(gtk.STOCK_NO) widget.set_tooltip("Tooltip example") win.add(widget) diff --git a/gramps2/src/docgen/PdfDoc.py b/gramps2/src/docgen/PdfDoc.py index ab146553c..be6615135 100644 --- a/gramps2/src/docgen/PdfDoc.py +++ b/gramps2/src/docgen/PdfDoc.py @@ -354,7 +354,7 @@ class PdfDoc(BaseDoc.BaseDoc): def add_media_object(self,name,pos,x_cm,y_cm): try: - img = ImgManip.ImgManip(name) + img = ImgManip.ImgManip(nname) except: return @@ -375,12 +375,12 @@ class PdfDoc(BaseDoc.BaseDoc): act_height = y_cm act_width = x_cm/ratio - im = Image(enc(name),act_width*cm,act_height*cm) + im = Image(str(name),act_width*cm,act_height*cm) if pos in ['left','right','center']: im.hAlign = pos.upper() else: im.hAlign = 'LEFT' - + if self.in_table: self.cur_cell.append(Spacer(1,0.5*cm)) self.cur_cell.append(im)