Report cleanup.
svn: r94
This commit is contained in:
parent
666722bb4b
commit
88ff9fd74f
@ -859,7 +859,7 @@
|
||||
<widget>
|
||||
<class>GtkFrame</class>
|
||||
<name>frame6</name>
|
||||
<label>Indentification</label>
|
||||
<label>Identification</label>
|
||||
<label_xalign>0</label_xalign>
|
||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||
<child>
|
||||
|
@ -79,13 +79,13 @@ class HtmlDoc(TextDoc):
|
||||
if top_add == 1:
|
||||
self.top.append(line)
|
||||
match = start.search(line)
|
||||
if match != None:
|
||||
if match:
|
||||
top_add = 0
|
||||
elif bottom_add == 0:
|
||||
match = stop.search(line)
|
||||
if match != None:
|
||||
bottom_add = 1
|
||||
self.bottom.append(line)
|
||||
elif bottom_add == 0:
|
||||
match = stop.search(line)
|
||||
if match != None:
|
||||
bottom_add = 1
|
||||
self.bottom.append(line)
|
||||
else:
|
||||
self.bottom.append(line)
|
||||
templateFile.close()
|
||||
|
@ -192,9 +192,9 @@ class StyleEditor:
|
||||
else:
|
||||
p.set_alignment(PARA_ALIGN_JUSTIFY)
|
||||
|
||||
p.set_right_margin(float(self.top.get_widget("rmargin").get_text()))
|
||||
p.set_left_margin(float(self.top.get_widget("lmargin").get_text()))
|
||||
p.set_padding(float(self.top.get_widget("pad").get_text()))
|
||||
p.set_right_margin(utils.txt2fl(self.top.get_widget("rmargin").get_text()))
|
||||
p.set_left_margin(utils.txt2fl(self.top.get_widget("lmargin").get_text()))
|
||||
p.set_padding(utils.txt2fl(self.top.get_widget("pad").get_text()))
|
||||
p.set_top_border(self.top.get_widget("tborder").get_active())
|
||||
p.set_left_border(self.top.get_widget("lborder").get_active())
|
||||
p.set_right_border(self.top.get_widget("rborder").get_active())
|
||||
|
@ -22,6 +22,7 @@ import string
|
||||
import os
|
||||
import xml.sax
|
||||
import xml.sax.saxutils
|
||||
import utils
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -424,10 +425,11 @@ class StyleSheetList:
|
||||
f.write('bold="%d" ' % font.get_bold())
|
||||
f.write('underline="%d" ' % font.get_bold())
|
||||
f.write('color="#%02x%02x%02x"/>\n' % font.get_color())
|
||||
f.write('<para rmargin="%.3f" ' % p.get_right_margin())
|
||||
f.write('lmargin="%.3f" ' % p.get_left_margin())
|
||||
f.write('first="%.3f" ' % p.get_first_indent())
|
||||
f.write('pad="%.3f" ' % p.get_padding())
|
||||
f.write('<para ')
|
||||
f.write('rmargin="%s" ' % utils.fl2txt("%.3f",p.get_right_margin()))
|
||||
f.write('lmargin="%.3f" ' % utils.fl2txt("%.3f",p.get_left_margin()))
|
||||
f.write('first="%.3f" ' % utils.fl2txt("%.3f",p.get_first_indent()))
|
||||
f.write('pad="%.3f" ' % utils.fl2txt("%.3f",p.get_padding()))
|
||||
f.write('bgcolor="#%02x%02x%02x" ' % p.get_background_color())
|
||||
f.write('align="%d" ' % p.get_alignment())
|
||||
f.write('tborder="%d" ' % p.get_top_border())
|
||||
@ -517,10 +519,10 @@ class SheetParser(xml.sax.handler.ContentHandler):
|
||||
self.f.set_underline(int(attrs['underline']))
|
||||
self.f.set_color(cnv2color(attrs['color']))
|
||||
elif tag == "para":
|
||||
self.p.set_right_margin(float(attrs['rmargin']))
|
||||
self.p.set_left_margin(float(attrs['lmargin']))
|
||||
self.p.set_first_indent(float(attrs['first']))
|
||||
self.p.set_padding(float(attrs['pad']))
|
||||
self.p.set_right_margin(utils.txt2fl(attrs['rmargin']))
|
||||
self.p.set_left_margin(utils.txt2fl(attrs['lmargin']))
|
||||
self.p.set_first_indent(utils.txt2fl(attrs['first']))
|
||||
self.p.set_padding(utils.txt2fl(attrs['pad']))
|
||||
self.p.set_alignment(int(attrs['align']))
|
||||
self.p.set_right_border(int(attrs['rborder']))
|
||||
self.p.set_left_border(int(attrs['lborder']))
|
||||
|
@ -172,7 +172,7 @@
|
||||
<class>GtkLabel</class>
|
||||
<child_name>CList:title</child_name>
|
||||
<name>label2</name>
|
||||
<label>label2</label>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
|
@ -71,9 +71,7 @@ progName = "gramps"
|
||||
version = "0.2.0"
|
||||
copyright = "(C) 2001 Donald N. Allingham"
|
||||
authors = ["Donald N. Allingham"]
|
||||
comments = _("Gramps (Genealogical Research and Analysis Management ") +\
|
||||
_("Programming System) is a personal genealogy program that ") +\
|
||||
_("can be extended by using the Python programming language.")
|
||||
comments = _("Gramps (Genealogical Research and Analysis Management Programming System) is a personal genealogy program that can be extended by using the Python programming language.")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -151,7 +149,7 @@ personalConstantEvents = {
|
||||
|
||||
personalConstantAttributes = {
|
||||
"Description" : "DSCR",
|
||||
"Indentification Number": "IDNO",
|
||||
"Identification Number": "IDNO",
|
||||
"Social Security Number": "SSN"
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,7 @@
|
||||
<handler>on_sources_activate</handler>
|
||||
<last_modification_time>Wed, 30 May 2001 01:59:42 GMT</last_modification_time>
|
||||
</signal>
|
||||
<label>Sources</label>
|
||||
<label>_Sources</label>
|
||||
<right_justify>False</right_justify>
|
||||
</widget>
|
||||
</widget>
|
||||
@ -1288,7 +1288,7 @@
|
||||
<class>GtkLabel</class>
|
||||
<child_name>Notebook:tab</child_name>
|
||||
<name>label199</name>
|
||||
<label>label199</label>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
@ -1309,7 +1309,7 @@
|
||||
<class>GtkLabel</class>
|
||||
<child_name>Notebook:tab</child_name>
|
||||
<name>label200</name>
|
||||
<label>label200</label>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
|
Binary file not shown.
@ -257,7 +257,7 @@ def on_save_clicked(obj):
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
def get_description():
|
||||
return _("Produces a graphical ancestral tree graph")
|
||||
return _("Produces a graphical ancestral tree")
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
@ -381,7 +381,7 @@ def mysort(first, second) :
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
def get_description():
|
||||
return _("Produces a graphical ancestral tree graph")
|
||||
return _("Displays an ancestral tree graph")
|
||||
|
||||
def get_name():
|
||||
return _("View/View an ancestor graph")
|
||||
|
@ -84,7 +84,7 @@ class DescendantReport:
|
||||
name = self.person.getPrimaryName().getRegularName()
|
||||
self.doc.write_text(_("Descendants of %s") % name)
|
||||
self.doc.end_paragraph()
|
||||
self.dump(1,self.person)
|
||||
self.dump(0,self.person)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
#
|
||||
@ -92,22 +92,24 @@ class DescendantReport:
|
||||
#
|
||||
#--------------------------------------------------------------------
|
||||
def dump(self,level,person):
|
||||
self.doc.start_paragraph("Level" + str(level))
|
||||
self.doc.write_text(str(level) + '. ')
|
||||
self.doc.write_text(person.getPrimaryName().getRegularName())
|
||||
|
||||
birth = person.getBirth().getDateObj().get_start_date().getYear()
|
||||
death = person.getDeath().getDateObj().get_start_date().getYear()
|
||||
if birth != -1 or death != -1:
|
||||
self.doc.write_text(' (')
|
||||
if birth != -1:
|
||||
self.doc.write_text('b. ' + str(birth))
|
||||
if death != -1:
|
||||
if level != 0:
|
||||
self.doc.start_paragraph("Level" + str(level))
|
||||
self.doc.write_text(str(level) + '. ')
|
||||
self.doc.write_text(person.getPrimaryName().getRegularName())
|
||||
|
||||
birth = person.getBirth().getDateObj().get_start_date().getYear()
|
||||
death = person.getDeath().getDateObj().get_start_date().getYear()
|
||||
if birth != -1 or death != -1:
|
||||
self.doc.write_text(' (')
|
||||
if birth != -1:
|
||||
self.doc.write_text(', ')
|
||||
self.doc.write_text('d. ' + str(death))
|
||||
self.doc.write_text(')')
|
||||
self.doc.end_paragraph()
|
||||
self.doc.write_text('b. ' + str(birth))
|
||||
if death != -1:
|
||||
if birth != -1:
|
||||
self.doc.write_text(', ')
|
||||
self.doc.write_text('d. ' + str(death))
|
||||
self.doc.write_text(')')
|
||||
self.doc.end_paragraph()
|
||||
|
||||
for family in person.getFamilyList():
|
||||
for child in family.getChildList():
|
||||
|
@ -428,7 +428,10 @@ def report(database,person):
|
||||
spouse = family.getMother()
|
||||
else:
|
||||
spouse = family.getFather()
|
||||
item = GtkMenuItem(spouse.getPrimaryName().getName())
|
||||
if spouse:
|
||||
item = GtkMenuItem(spouse.getPrimaryName().getName())
|
||||
else:
|
||||
item = GtkMenuItem("unknown")
|
||||
item.set_data("f",family)
|
||||
item.show()
|
||||
my_menu.append(item)
|
||||
@ -496,7 +499,7 @@ def on_save_clicked(obj):
|
||||
item = topDialog.get_widget("format").get_menu().get_active()
|
||||
format = item.get_data("name")
|
||||
|
||||
doc = FindDoc.make_text_doc(format,paper,orien,template)
|
||||
doc = FindDoc.make_text_doc(styles,format,paper,orien,template)
|
||||
|
||||
MyReport = FamilyGroup(db,family,outputName,doc)
|
||||
|
||||
|
@ -243,7 +243,7 @@ def dump_index(person_list,file):
|
||||
def get_description():
|
||||
return _("Generates relationship graphs, currently only in GraphViz format.") + \
|
||||
" " + \
|
||||
_("GraphViz (dot) will transform the graph into postscript, jpeg, png, vrml, svg, and many other formats.") + \
|
||||
_("GraphViz (dot) can transform the graph into postscript, jpeg, png, vrml, svg, and many other formats.") + \
|
||||
" " + \
|
||||
_("For more information or to get a copy of GraphViz, goto http://www.graphviz.org")
|
||||
|
||||
|
@ -215,6 +215,7 @@ def report(database,person):
|
||||
|
||||
name = person.getPrimaryName().getName()
|
||||
topDialog.get_widget("personName").set_text(name)
|
||||
topDialog.get_widget("prefix").get_text("ind")
|
||||
|
||||
top.show()
|
||||
|
||||
|
@ -333,6 +333,9 @@ def report(database,person):
|
||||
global glade_file
|
||||
global db
|
||||
global style_sheet_list
|
||||
|
||||
if person == None:
|
||||
return
|
||||
|
||||
active_person = person
|
||||
db = database
|
||||
|
@ -199,7 +199,7 @@
|
||||
<class>GtkRadioButton</class>
|
||||
<name>openoffice</name>
|
||||
<can_focus>True</can_focus>
|
||||
<label>OpenOffice </label>
|
||||
<label>OpenOffice</label>
|
||||
<active>True</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<group>format</group>
|
||||
|
@ -205,7 +205,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label6</name>
|
||||
<label>Maximum Generations </label>
|
||||
<label>Maximum Generations</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
|
@ -153,7 +153,7 @@
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text>ind</text>
|
||||
<text></text>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
|
@ -745,7 +745,7 @@
|
||||
<class>GtkLabel</class>
|
||||
<child_name>CList:title</child_name>
|
||||
<name>label51</name>
|
||||
<label>label51</label>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
@ -1399,7 +1399,7 @@
|
||||
<class>GtkLabel</class>
|
||||
<child_name>CList:title</child_name>
|
||||
<name>label50</name>
|
||||
<label>label48</label>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
@ -1497,7 +1497,7 @@
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label41</name>
|
||||
<label>Match Rating : </label>
|
||||
<label>Match Rating :</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
|
1527
gramps/src/po/sv.po
1527
gramps/src/po/sv.po
File diff suppressed because it is too large
Load Diff
@ -184,7 +184,7 @@
|
||||
<class>GtkLabel</class>
|
||||
<child_name>CList:title</child_name>
|
||||
<name>label2</name>
|
||||
<label>label2</label>
|
||||
<label></label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
|
@ -97,3 +97,34 @@ def destroy_passed_object(obj):
|
||||
while gtk.events_pending():
|
||||
gtk.mainiteration()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Get around python's interpretation of commas/periods in floating
|
||||
# point numbers
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import string
|
||||
|
||||
if string.find("%.3f" % 1.2, ",") == -1:
|
||||
_use_comma = 0
|
||||
else:
|
||||
_use_comma = 1
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def txt2fl(st):
|
||||
if _use_comma:
|
||||
return string.atof(string.replace(st,'.',','))
|
||||
else:
|
||||
return string.atof(string.replace(st,',','.'))
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def fl2txt(fmt,val):
|
||||
return string.replace(fmt % val, ',', '.')
|
||||
|
Loading…
Reference in New Issue
Block a user