From ebe0d065e68a78ea19788e063e205b798da7c98a Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Wed, 9 Nov 2005 22:23:55 +0000 Subject: [PATCH] * src/Report.py: Minor tweaks for file selection. * src/docgen//OpenOfficeDoc.py: Correct output for spacing. svn: r5385 --- gramps2/ChangeLog | 2 ++ gramps2/src/Report.py | 4 ++-- gramps2/src/docgen/OpenOfficeDoc.py | 33 +++++++++++++++++++---------- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index c51ddcbbd..4aac39d36 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -7,6 +7,8 @@ * src/BaseDoc.py: Support space above/below paragraph. * src/StyleEditor.py: Support space above/below paragraph. * src/gramps.glade: Support space above/below paragraph. + * src/Report.py: Minor tweaks for file selection. + * src/docgen//OpenOfficeDoc.py: Correct output for spacing. 2005-11-09 Martin Hawlisch * src/DbPrompter.py (DbPrompter): Use Combo to list multiple rcecent files diff --git a/gramps2/src/Report.py b/gramps2/src/Report.py index 4171800dd..1ae066810 100644 --- a/gramps2/src/Report.py +++ b/gramps2/src/Report.py @@ -69,7 +69,7 @@ class FileEntry(gtk.HBox): gtk.STOCK_OPEN, gtk.RESPONSE_OK)) - f.set_current_name(self.entry.get_text()) + f.set_current_name(os.path.basename(self.entry.get_text())) f.set_current_folder(self.spath) status = f.run() if status == gtk.RESPONSE_OK: @@ -84,7 +84,7 @@ class FileEntry(gtk.HBox): else: self.spath = os.getcwd() self.defname = path - self.entry.set_text(self.defname) + self.entry.set_text(os.path.join(self.spath,self.defname)) def gtk_entry(self): return self.entry diff --git a/gramps2/src/docgen/OpenOfficeDoc.py b/gramps2/src/docgen/OpenOfficeDoc.py index 19f33620a..d7202174c 100644 --- a/gramps2/src/docgen/OpenOfficeDoc.py +++ b/gramps2/src/docgen/OpenOfficeDoc.py @@ -219,7 +219,8 @@ class OpenOfficeDoc(BaseDoc.BaseDoc): else: self.cntnt.write('style:font-name="Times New Roman" ') self.cntnt.write('fo:font-size="%.3fpt" ' % font.get_size()) - self.cntnt.write('style:font-size-asian="%.3fpt" ' % font.get_size()) + self.cntnt.write('style:font-size-asian="%.3fpt" ' + % font.get_size()) color = font.get_color() self.cntnt.write('fo:color="#%02x%02x%02x" ' % color) if font.get_bold(): @@ -229,11 +230,16 @@ class OpenOfficeDoc(BaseDoc.BaseDoc): if font.get_underline(): self.cntnt.write('style:text-underline="single" ') self.cntnt.write('style:text-underline-color="font-color" ') - self.cntnt.write('fo:text-indent="%.2fcm" ' % style.get_first_indent()) - self.cntnt.write('fo:margin-right="%.2fcm" ' % style.get_right_margin()) - self.cntnt.write('fo:margin-left="%.2fcm" ' % style.get_left_margin()) - self.cntnt.write('fo:margin-top="0cm" ') - self.cntnt.write('fo:margin-bottom="0.212cm"') + self.cntnt.write('fo:text-indent="%.2fcm" ' + % style.get_first_indent()) + self.cntnt.write('fo:margin-right="%.2fcm" ' + % style.get_right_margin()) + self.cntnt.write('fo:margin-left="%.2fcm" ' + % style.get_left_margin()) + self.cntnt.write('fo:margin-top="%.2fcm" ' + % style.get_top_margin()) + self.cntnt.write('fo:margin-bottom="%.2fcm"' + % style.get_bottom_margin()) self.cntnt.write('/>\n') self.cntnt.write('\n') @@ -596,11 +602,16 @@ class OpenOfficeDoc(BaseDoc.BaseDoc): if font.get_underline(): self.sfile.write('style:text-underline="single" ') self.sfile.write('style:text-underline-color="font-color" ') - self.sfile.write('fo:text-indent="%.2fcm" ' % style.get_first_indent()) - self.sfile.write('fo:margin-right="%.2fcm" ' % style.get_right_margin()) - self.sfile.write('fo:margin-left="%.2fcm" ' % style.get_left_margin()) - self.sfile.write('fo:margin-top="0cm" ') - self.sfile.write('fo:margin-bottom="0.212cm"') + self.sfile.write('fo:text-indent="%.2fcm" ' + % style.get_first_indent()) + self.sfile.write('fo:margin-right="%.2fcm" ' + % style.get_right_margin()) + self.sfile.write('fo:margin-left="%.2fcm" ' + % style.get_left_margin()) + self.sfile.write('fo:margin-top="%.2fcm" ' + % style.get_top_margin()) + self.sfile.write('fo:margin-bottom="%.2fcm"' + % style.get_bottom_margin()) self.sfile.write('/>\n') self.sfile.write('\n')