* 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> 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/plugins/CountAncestors.py: Add window title, remove extra text.
* src/Filters/Rules/Person/_HasNoteRegexp.py: Import re module. * src/Filters/Rules/Person/_HasNoteRegexp.py: Import re module.

View File

@ -47,6 +47,7 @@ import gtk.glade
#------------------------------------------------------------------------ #------------------------------------------------------------------------
import Utils import Utils
from PluginUtils import Report, register_report from PluginUtils import Report, register_report
from ManagedWindow import set_titles
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #
@ -69,7 +70,13 @@ class CountAncestors:
total_theoretical = 0 total_theoretical = 0
thisgen.add(person.get_handle()) 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 thisgensize = 1
gen = 0 gen = 0
while thisgensize > 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) 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") textwindow = topDialog.get_widget("textwindow")
topDialog.get_widget("title").set_text(title)
textwindow.get_buffer().set_text(text) textwindow.get_buffer().set_text(text)
top.show() top.show()

View File

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