From 586511a63e25c8e597fd8355a3b2428e5e3fce91 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sun, 1 Feb 2004 00:44:31 +0000 Subject: [PATCH] * src/plugins/AncestorChart2.py: Change the tile when changing the center person. * src/plugins/SimpleBookTitle.py: Correct window title. svn: r2734 --- gramps2/ChangeLog | 3 +++ gramps2/src/plugins/AncestorChart2.py | 23 +++++++++++++++++++---- gramps2/src/plugins/SimpleBookTitle.py | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 81566e678..497b9fee8 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -4,6 +4,9 @@ * src/Report.py: Mark translatable string. * src/Witness.py: Mark translatable string. * src/plugins/FamilyGroup.py: Mark translatable string. + * src/plugins/AncestorChart2.py: Change the tile when changing + the center person. + * src/plugins/SimpleBookTitle.py: Correct window title. 2004-01-31 Egyeki Gergely * src/po/hu.po: Updating translation for 1.0-RC diff --git a/gramps2/src/plugins/AncestorChart2.py b/gramps2/src/plugins/AncestorChart2.py index 3a3b67a4b..28631f0c0 100644 --- a/gramps2/src/plugins/AncestorChart2.py +++ b/gramps2/src/plugins/AncestorChart2.py @@ -558,7 +558,7 @@ class AncestorChartBareDialog(Report.BareReportDialog): if self.options[4] is not None: self.the_title = self.options[4] else: - self.the_title = self.get_the_title() + self.the_title = self.get_the_title(self.person) self.new_person = None self.generations_spinbox.set_value(self.max_gen) @@ -576,7 +576,7 @@ class AncestorChartBareDialog(Report.BareReportDialog): #------------------------------------------------------------------------ def add_user_options(self): self.title=gtk.Entry() - self.title.set_text(self.get_the_title()) + self.title.set_text(self.get_the_title(self.person)) self.title.show() self.add_option(_('Title'),self.title) self.compress = gtk.CheckButton(_('Co_mpress chart')) @@ -588,9 +588,9 @@ class AncestorChartBareDialog(Report.BareReportDialog): """The window title for this dialog""" return "%s - GRAMPS Book" % (_("Ancestor Chart")) - def get_the_title(self): + def get_the_title(self,person): """The header line at the top of the dialog contents.""" - return _("Ancestor Chart for %s") % self.person.getPrimaryName().getName() + return _("Ancestor Chart for %s") % person.getPrimaryName().getName() def get_header(self,name): """The header line at the top of the dialog contents""" @@ -618,6 +618,21 @@ class AncestorChartBareDialog(Report.BareReportDialog): self.do_compress = self.compress.get_active() self.the_title = self.title.get_text() + def on_center_person_change_clicked(self,obj): + import SelectPerson + sel_person = SelectPerson.SelectPerson(self.db,_('Select Person')) + new_person = sel_person.run() + if new_person: + self.new_person = new_person + + self.the_title = self.get_the_title(self.new_person) + self.title.set_text(self.the_title) + + new_name = new_person.getPrimaryName().getRegularName() + if new_name: + self.person_label.set_text( "%s" % new_name ) + self.person_label.set_use_markup(gtk.TRUE) + def on_cancel(self, obj): pass diff --git a/gramps2/src/plugins/SimpleBookTitle.py b/gramps2/src/plugins/SimpleBookTitle.py index 297acd1a9..af67ca23b 100644 --- a/gramps2/src/plugins/SimpleBookTitle.py +++ b/gramps2/src/plugins/SimpleBookTitle.py @@ -275,7 +275,7 @@ class SimpleBookTitleDialog(Report.BareReportDialog): def get_title(self): """The window title for this dialog""" - return "%s - GRAMPS Book" % (_("Simple Book Title")) + return "%s - GRAMPS Book" % (_("Title Page")) def get_header(self, name): """The header line at the top of the dialog contents"""