* src/WriteGedcom.py (get_option_box): Make filters inclusive.

* src/plugins/merge.glade: Switch button order to comply with HIG.
* src/mergedata.glade: Switch button order to comply with HIG.
* src/plugins/RelGraph.py (get_default_basename): Add function.
* src/plugins/AncestorReport.py (write_report): Translate
string properly.
* src/EventEdit.py (update_event): Use transtable.
* src/EditPerson.py (on_event_add_clicked, on_edit_birth_clicked,
on_edit_death_clicked, on_event_update_clicked):
Pass TransTable to the event editor.
* src/Marriage.py (on_add_clicked, on_event_update_clicked):
Pass TransTable to the event editor.
* src/plugins/FtmStyleAncestors.py,
src/plugins/FtmStyleDescendants.py:
Remove extra space between vars in "%(.*_place)s %(.*_notes)s"
* src/plugins/verify.glade: Translate button label.
* src/plugins/IndivSummary.py: Proper handling of translation.
* src/docgen/OpenOfficeDoc.py (pt2cm): Add function;
(draw_text): Convert points to cm for the box width;
 Use self.string_width() method.
* src/BaseDoc.py (string_width): Add a method to compute width.
* src/docgen/LPRDoc.py (string_width): Override method.
* src/docgen/PdfDoc.py: Use self.string_width() method.
* src/docgen/SvgDrawDoc.py: Use self.string_width() method.
* src/plugins/AncestorChart2.py: Use self.doc.string_width() method.
* src/plugins/AncestorChart.py: Use self.doc.string_width() method.
* src/plugins/DesGraph.py: Use self.doc.string_width() method.
* src/plugins/FanChart.py: Use self.doc.string_width() method.
* src/plugins/TimeLine.py: Use self.doc.string_width() method.
* src/plugins/eval.glade: HIG compliance.


svn: r3453
This commit is contained in:
Alex Roitman
2004-08-20 21:26:51 +00:00
parent 0dd92d0a5c
commit fe4427adf8
24 changed files with 135 additions and 82 deletions

View File

@@ -45,7 +45,6 @@ import gtk
import BaseDoc
import Report
import Errors
import FontScale
from QuestionDialog import ErrorDialog
from SubstKeywords import SubstKeywords
from gettext import gettext as _
@@ -107,7 +106,8 @@ class AncestorChart:
self.font = self.doc.style_list["AC-Normal"].get_font()
for line in self.text[index]:
self.box_width = max(self.box_width,FontScale.string_width(self.font,line))
this_box_width = self.doc.string_width(self.font,line)
self.box_width = max(self.box_width,this_box_width)
self.lines = max(self.lines,len(self.text[index]))

View File

@@ -42,7 +42,6 @@ import gtk
import BaseDoc
import Report
import Errors
import FontScale
from QuestionDialog import ErrorDialog
from SubstKeywords import SubstKeywords
from gettext import gettext as _
@@ -221,7 +220,8 @@ class AncestorChart:
self.text[index].append(subst.replace(line))
for line in self.text[index]:
self.box_width = max(self.box_width,FontScale.string_width(self.font,line))
this_box_width = self.doc.string_width(self.font,line)
self.box_width = max(self.box_width,this_box_width)
self.lines = max(self.lines,len(self.text[index]))

View File

@@ -226,7 +226,7 @@ class AncestorReport(Report.Report):
t = _(", and was buried in the year %s.") % \
date.get_date()
else:
t = _(" and was buried in %s." % place)
t = _(" and was buried in %s.") % place
self.doc.write_text(t)
else:
self.doc.write_text(".")

View File

@@ -42,7 +42,6 @@ import gtk
#
#------------------------------------------------------------------------
import GraphLayout
import FontScale
import Report
import BaseDoc
import Errors
@@ -109,7 +108,7 @@ class DescendantReport:
self.font = self.doc.style_list["DG-Normal"].get_font()
for line in self.text[p_id]:
new_width = FontScale.string_width(self.font,line)
new_width = self.doc.string_width(self.font,line)
self.box_width = max(self.box_width,new_width)
self.lines = max(self.lines,len(self.text[p_id]))

View File

@@ -38,7 +38,6 @@ import Errors
import Calendar
from QuestionDialog import ErrorDialog
from FontScale import string_width
from SubstKeywords import SubstKeywords
from gettext import gettext as _
@@ -160,7 +159,7 @@ class FanChart:
self.font = self.doc.style_list["FC-Normal"].get_font()
for line in self.text[index-1]:
self.box_width = max(self.box_width,string_width(self.font,line))
self.box_width = max(self.box_width,self.doc.string_width(self.font,line))
self.lines = max(self.lines,len(self.text[index-1]))

View File

@@ -172,7 +172,7 @@ class FtmAncestorReport(Report.Report):
else:
if dplace:
self.doc.write_text(_("%(male_name)s%(endnotes)s was born %(birth_date)s "
"in %(birth_place)s %(birth_endnotes)s, "
"in %(birth_place)s%(birth_endnotes)s, "
"and died in %(death_place)s%(death_endnotes)s.") % {
'male_name' : '', 'endnotes' : self.endnotes(pri_name),
'birth_date' : bdate, 'birth_place' : bplace,
@@ -321,7 +321,7 @@ class FtmAncestorReport(Report.Report):
})
else:
self.doc.write_text(_("%(female_name)s%(endnotes)s was born %(birth_date)s "
"in %(birth_place)s %(birth_endnotes)s.") % {
"in %(birth_place)s%(birth_endnotes)s.") % {
'female_name' : '', 'endnotes' : self.endnotes(pri_name),
'birth_endnotes' : self.endnotes(birth),
'birth_date' : bdate, 'birth_place' : bplace,

View File

@@ -196,7 +196,7 @@ class FtmDescendantReport(Report.Report):
else:
if dplace:
self.doc.write_text(_("%(male_name)s%(endnotes)s was born %(birth_date)s "
"in %(birth_place)s %(birth_endnotes)s, "
"in %(birth_place)s%(birth_endnotes)s, "
"and died in %(death_place)s%(death_endnotes)s.") % {
'male_name' : '', 'endnotes' : self.endnotes(pri_name),
'birth_date' : bdate, 'birth_place' : bplace,
@@ -345,7 +345,7 @@ class FtmDescendantReport(Report.Report):
})
else:
self.doc.write_text(_("%(female_name)s%(endnotes)s was born %(birth_date)s "
"in %(birth_place)s %(birth_endnotes)s.") % {
"in %(birth_place)s%(birth_endnotes)s.") % {
'female_name' : '', 'endnotes' : self.endnotes(pri_name),
'birth_endnotes' : self.endnotes(birth),
'birth_date' : bdate, 'birth_place' : bplace,
@@ -1124,7 +1124,7 @@ class FtmDescendantReport(Report.Report):
else:
if dplace:
self.doc.write_text(_("%(male_name)s%(endnotes)s was born %(birth_date)s "
"in %(birth_place)s %(birth_endnotes)s, "
"in %(birth_place)s%(birth_endnotes)s, "
"and died in %(death_place)s%(death_endnotes)s.") % {
'male_name' : _('He'), 'endnotes' : '',
'birth_date' : bdate, 'birth_place' : bplace,
@@ -1273,7 +1273,7 @@ class FtmDescendantReport(Report.Report):
})
else:
self.doc.write_text(_("%(female_name)s%(endnotes)s was born %(birth_date)s "
"in %(birth_place)s %(birth_endnotes)s.") % {
"in %(birth_place)s%(birth_endnotes)s.") % {
'female_name' : _('She'), 'endnotes' : '',
'birth_endnotes' : self.endnotes(birth),
'birth_date' : bdate, 'birth_place' : bplace,

View File

@@ -128,12 +128,14 @@ class IndivSummary(Report.Report):
if not place:
return
else:
val = place + ". " + description
text = '%s. %s' % (place,description)
else:
if not place:
val = date + ". " + description
text = '%s. %s' % (date,description)
else:
val = date + " in " + place + ". " + description
text = _('%(date)s in %(place)s.') % { 'date' : date,
'place' : place }
text = '%s %s' % (text,description)
self.d.start_row()
self.d.start_cell("IVS-NormalCell")
@@ -144,7 +146,7 @@ class IndivSummary(Report.Report):
self.d.start_cell("IVS-NormalCell")
self.d.start_paragraph("IVS-Normal")
self.d.write_text(val)
self.d.write_text(text)
self.d.end_paragraph()
self.d.end_cell()
self.d.end_row()

View File

@@ -111,7 +111,13 @@ class RelGraphDialog(Report.ReportDialog):
report_options = {}
def __init__(self,database,person):
Report.ReportDialog.__init__(self,database,person,self.report_options)
print "here"
Report.ReportDialog.__init__(self,database,person,self.report_options)
def get_default_basename(self):
"""What should the default name be?
"""
return "relationship_graph.dot"
def get_title(self):
"""The window title for this dialog"""

View File

@@ -49,7 +49,6 @@ import BaseDoc
import GenericFilter
import Errors
import Date
import FontScale
import Sort
from QuestionDialog import ErrorDialog
@@ -323,7 +322,7 @@ class TimeLine:
for p_id in self.plist:
p = self.db.get_person_from_handle(p_id)
n = p.get_primary_name().get_name()
size = max(FontScale.string_width(font,n),size)
size = max(self.d.string_width(font,n),size)
return pt2cm(size)

View File

@@ -271,19 +271,6 @@
</widget>
</child>
<child>
<widget class="GtkButton" id="button2">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-execute</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_apply_clicked" last_modification_time="Sun, 11 May 2003 21:01:26 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="button3">
<property name="visible">True</property>
@@ -296,6 +283,19 @@
<signal name="clicked" handler="on_close_clicked" last_modification_time="Sun, 11 May 2003 21:01:38 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="button2">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-execute</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_apply_clicked" last_modification_time="Sun, 11 May 2003 21:01:26 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>

View File

@@ -125,20 +125,6 @@
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
<widget class="GtkButton" id="button7">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Merge</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">0</property>
<signal name="clicked" handler="on_do_merge_clicked"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="button9">
<property name="visible">True</property>
@@ -152,6 +138,20 @@
<signal name="clicked" handler="destroy_passed_object" object="mergelist"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="button7">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Merge</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">0</property>
<signal name="clicked" handler="on_do_merge_clicked"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>

View File

@@ -839,8 +839,8 @@
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-ok</property>
<property name="use_stock">True</property>
<property name="label" translatable="yes">_Run</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_verify_ok_clicked" object="verify_settings"/>