* src/plugins/Summary.py: Set titles properly.

svn: r6655
This commit is contained in:
Alex Roitman 2006-05-14 18:17:10 +00:00
parent 6c0f00de89
commit fa120b9468
3 changed files with 13 additions and 7 deletions

View File

@ -1,4 +1,5 @@
2006-05-14 Alex Roitman <shura@gramps-project.org>
* src/plugins/Summary.py: Set titles properly.
* src/plugins/CountAncestors.py: Add window title, remove extra text.
* src/Filters/Rules/Person/_HasNoteRegexp.py: Import re module.

View File

@ -47,6 +47,7 @@ import gtk.glade
#------------------------------------------------------------------------
import Utils
from PluginUtils import Report, register_report
from ManagedWindow import set_titles
#------------------------------------------------------------------------
#
@ -69,7 +70,13 @@ class CountAncestors:
total_theoretical = 0
thisgen.add(person.get_handle())
title = _("Number of ancestors of \"%s\" by generation") % person.get_primary_name().get_name()
title_text = _('Ancestors of "%s"') \
% person.get_primary_name().get_name()
top = topDialog.get_widget("summary")
title = topDialog.get_widget("title")
set_titles(top,title,title_text)
thisgensize = 1
gen = 0
while thisgensize > 0:
@ -108,10 +115,7 @@ class CountAncestors:
text += _("Total ancestors in generations 2 to %d is %d. (%3.2f%%)\n") % (gen,allgen,percent)
top = topDialog.get_widget("summary")
top.set_title(_("Number of ancestors report"))
textwindow = topDialog.get_widget("textwindow")
topDialog.get_widget("title").set_text(title)
textwindow.get_buffer().set_text(text)
top.show()

View File

@ -47,6 +47,7 @@ import Utils
import RelLib
from PluginUtils import Report, register_report
import DateHandler
from ManagedWindow import set_titles
#------------------------------------------------------------------------
#
@ -151,9 +152,9 @@ class SummaryReport:
"destroy_passed_object" : Utils.destroy_passed_object,
})
Utils.set_titles(topDialog.get_widget('summary'),
topDialog.get_widget('title'),
_('Database summary'))
set_titles(topDialog.get_widget('summary'),
topDialog.get_widget('title'),
_('Database summary'))
top = topDialog.get_widget("summary")