From fa120b94684ebe896a151e9705e78471a561cbc2 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sun, 14 May 2006 18:17:10 +0000 Subject: [PATCH] * src/plugins/Summary.py: Set titles properly. svn: r6655 --- ChangeLog | 1 + src/plugins/CountAncestors.py | 12 ++++++++---- src/plugins/Summary.py | 7 ++++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 247769cfd..3084c6fa0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ 2006-05-14 Alex Roitman + * 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. diff --git a/src/plugins/CountAncestors.py b/src/plugins/CountAncestors.py index 6540ecbf3..ab2eb1989 100644 --- a/src/plugins/CountAncestors.py +++ b/src/plugins/CountAncestors.py @@ -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() diff --git a/src/plugins/Summary.py b/src/plugins/Summary.py index 2a499a00e..bb0276305 100644 --- a/src/plugins/Summary.py +++ b/src/plugins/Summary.py @@ -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")