* src/docgen/OpenSpreadSheet.py

(OpenSpreadSheet._write_meta_file): Properly reference creator string.
* src/plugins/EventCmp.py (DisplayChart.on_write_table): Set
document creator; write localized event names.
(DisplayChart.draw_clist_display): Display localized event names.
* src/plugins/ChangeTypes.py: Convert event names to English for
storage and comparison.


svn: r5936
This commit is contained in:
Alex Roitman 2006-02-14 18:50:46 +00:00
parent 4eedcb1b35
commit 8c50ca9c9c
4 changed files with 29 additions and 14 deletions

View File

@ -1,3 +1,12 @@
2006-02-14 Alex Roitman <shura@gramps-project.org>
* src/docgen/OpenSpreadSheet.py
(OpenSpreadSheet._write_meta_file): Properly reference creator string.
* src/plugins/EventCmp.py (DisplayChart.on_write_table): Set
document creator; write localized event names.
(DisplayChart.draw_clist_display): Display localized event names.
* src/plugins/ChangeTypes.py: Convert event names to English for
storage and comparison.
2006-02-13 Don Allingham <don@gramps-project.org>
* src/EditPerson.py: don't double add a place

View File

@ -451,13 +451,13 @@ class OpenSpreadSheet(SpreadSheetDoc):
self.f.write(const.progName + ' ' + const.version)
self.f.write('</meta:generator>\n')
self.f.write('<meta:initial-creator>')
self.f.write(name)
self.f.write(self.name)
self.f.write('</meta:initial-creator>\n')
self.f.write('<meta:creation-date>')
self.f.write(self.time)
self.f.write('</meta:creation-date>\n')
self.f.write('<dc:creator>')
self.f.write(name)
self.f.write(self.name)
self.f.write('</dc:creator>\n')
self.f.write('<dc:date>')
self.f.write(self.time)

View File

@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2005 Donald N. Allingham
# Copyright (C) 2000-2006 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -80,10 +80,11 @@ class ChangeTypes(Tool.Tool):
AutoComp.fill_combo(self.auto1,const.personalEvents)
AutoComp.fill_combo(self.auto2,const.personalEvents)
self.auto1.child.set_text(
self.options.handler.options_dict['fromtype'])
self.auto2.child.set_text(
self.options.handler.options_dict['totype'])
# Need to display localized event names
self.auto1.child.set_text(const.display_event(
self.options.handler.options_dict['fromtype']))
self.auto2.child.set_text(const.display_event(
self.options.handler.options_dict['totype']))
self.title = _('Change Event Types')
self.window = self.glade.get_widget('top')
@ -103,6 +104,7 @@ class ChangeTypes(Tool.Tool):
def run_tool(self,cli=False):
# Run tool and return results
# These are English names, no conversion needed
fromtype = self.options.handler.options_dict['fromtype']
totype = self.options.handler.options_dict['totype']
@ -162,10 +164,11 @@ class ChangeTypes(Tool.Tool):
self.window.present()
def on_apply_clicked(self,obj):
self.options.handler.options_dict['fromtype'] = unicode(
self.auto1.child.get_text())
self.options.handler.options_dict['totype'] = unicode(
self.auto2.child.get_text())
# Need to store English names for later comparison
self.options.handler.options_dict['fromtype'] = const.save_event(
unicode(self.auto1.child.get_text()))
self.options.handler.options_dict['totype'] = const.save_event(
unicode(self.auto2.child.get_text()))
modified,msg = self.run_tool(cli=False)
OkDialog(_('Change types'),msg,self.parent.topWindow)

View File

@ -311,8 +311,9 @@ class DisplayChart:
titles = []
index = 0
for v in self.event_titles:
titles.append((v,index,150))
for event_name in self.event_titles:
# Need to display localized event names
titles.append((const.display_event(event_name),index,150))
index = index + 1
self.list = ListModel.ListModel(self.eventlist,titles)
@ -435,10 +436,12 @@ class DisplayChart:
pstyle = BaseDoc.PaperStyle("junk",10,10)
doc = OpenSpreadSheet.OpenSpreadSheet(pstyle,BaseDoc.PAPER_PORTRAIT)
doc.creator(self.db.get_researcher().get_name())
spreadsheet = TableReport(name,doc)
spreadsheet.initialize(len(self.event_titles))
spreadsheet.write_table_head(self.event_titles)
spreadsheet.write_table_head([const.display_event(event_name)
for event_name in self.event_titles])
index = 0
for top in self.row_data: