From 2aaca6aac7bf35afa73fe23a3a4beb582c0988cc Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Fri, 30 Aug 2013 18:09:48 +0000 Subject: [PATCH] 6874: Use shorter names in add gramplet list. Remove old attributes gramplet. svn: r22959 --- gramps/gui/widgets/grampletpane.py | 3 +- gramps/plugins/gramplet/attributesgramplet.py | 56 ------------------- gramps/plugins/gramplet/gramplet.gpr.py | 17 ------ po/POTFILES.in | 1 - 4 files changed, 2 insertions(+), 75 deletions(-) delete mode 100644 gramps/plugins/gramplet/attributesgramplet.py diff --git a/gramps/gui/widgets/grampletpane.py b/gramps/gui/widgets/grampletpane.py index d80c10797..2ba5f4c55 100644 --- a/gramps/gui/widgets/grampletpane.py +++ b/gramps/gui/widgets/grampletpane.py @@ -112,7 +112,8 @@ def GET_AVAILABLE_GRAMPLETS(name): return None def GET_GRAMPLET_LIST(nav_type, skip): - return [(gplug.name, gplug.id) for gplug in PLUGMAN.get_reg_gramplets() + return [(gplug.gramplet_title, gplug.id) + for gplug in PLUGMAN.get_reg_gramplets() if gplug.navtypes == [] or nav_type in gplug.navtypes and gplug.name not in skip] diff --git a/gramps/plugins/gramplet/attributesgramplet.py b/gramps/plugins/gramplet/attributesgramplet.py deleted file mode 100644 index 67975d8f6..000000000 --- a/gramps/plugins/gramplet/attributesgramplet.py +++ /dev/null @@ -1,56 +0,0 @@ -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2009 Douglas S. Blank -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# $Id$ -# - -from gramps.gen.plug import Gramplet -from gramps.gen.display.name import displayer as name_displayer -from gramps.gen.const import GRAMPS_LOCALE as glocale -_ = glocale.translation.gettext - -class AttributesGramplet(Gramplet): - """ - Displays attributes of a person. - """ - def init(self): - self.set_text(_("No Family Tree loaded.")) - self.set_use_markup(True) - self.no_wrap() - - def db_changed(self): - self.dbstate.db.connect('person-edit', self.update) - self.update() - - def active_changed(self, handle): - self.update() - - def main(self): # return false finishes - self.set_text("") - active_handle = self.get_active('Person') - active_person = self.dbstate.db.get_person_from_handle(active_handle) - if not active_person: - return - name = name_displayer.display(active_person) - self.render_text(_("Active person: %s") % name) - self.append_text("\n\n") - for attr in active_person.attribute_list: - # # text, type, data - self.link(str(attr.type), 'Attribute', str(attr.type)) - self.append_text(": %s\n" % attr.get_value()) - self.append_text("\n", scroll_to="begin") diff --git a/gramps/plugins/gramplet/gramplet.gpr.py b/gramps/plugins/gramplet/gramplet.gpr.py index b3edcaa8b..ce4d8abad 100644 --- a/gramps/plugins/gramplet/gramplet.gpr.py +++ b/gramps/plugins/gramplet/gramplet.gpr.py @@ -66,23 +66,6 @@ register(GRAMPLET, gramps_target_version="4.1", ) -register(GRAMPLET, - id="Attributes", - name=_("Attributes"), - description = _("Gramplet showing active person's attributes"), - status = STABLE, - fname="attributesgramplet.py", - height=150, - expand=True, - gramplet = 'AttributesGramplet', - gramplet_title=_("Attributes"), - detached_width = 325, - detached_height = 250, - version="1.0.0", - gramps_target_version="4.1", - navtypes=["Person"], - ) - register(GRAMPLET, id="Calendar", name=_("Calendar"), diff --git a/po/POTFILES.in b/po/POTFILES.in index 69a597762..d29a17fb8 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -528,7 +528,6 @@ gramps/plugins/export/exportxml.py gramps/plugins/gramplet/ageondategramplet.py gramps/plugins/gramplet/agestats.py gramps/plugins/gramplet/attributes.py -gramps/plugins/gramplet/attributesgramplet.py gramps/plugins/gramplet/backlinks.py gramps/plugins/gramplet/calendargramplet.py gramps/plugins/gramplet/children.py