diff --git a/ChangeLog b/ChangeLog index 3fb873eff..2cff9fefd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-01-17 Raphael Ackermann + * src/ScratchPad.py: remove tooltip for events as it crashes. + * src/Utils.py: cleanup + 2008-01-17 Benny Malengier * src/plugins/WriteCD.py: check if gnome is the desktop, #1599 diff --git a/src/ScratchPad.py b/src/ScratchPad.py index e39932f9f..0dd634cf0 100644 --- a/src/ScratchPad.py +++ b/src/ScratchPad.py @@ -235,27 +235,31 @@ class ScratchPadEvent(ScratchPadWrapper): def tooltip(self): global escape - s = "%s\n\n"\ - "\t%s:\t%s\n"\ - "\t%s:\t%s\n"\ - "\t%s:\t%s\n"\ - "\t%s:\t%s\n"\ - "\t%s:\t%s\n" % ( - _("Event"), - _("Type"),escape(Utils.format_personal_event(self._obj.get_name())), - _("Date"),escape(DateHander.get_date(self._obj)), - _("Place"),escape(place_title(self._db,self._obj)), - _("Cause"),escape(self._obj.get_cause()), - _("Description"), escape(self._obj.get_description())) - if len(self._obj.get_source_references()) > 0: - psrc_ref = self._obj.get_source_references()[0] - psrc_id = psrc_ref.get_reference_handle() - psrc = self._db.get_source_from_handle(psrc_id) - s += "\n%s\n\n"\ - "\t%s:\t%s\n" % ( - _("Primary source"), - _("Name"), - escape(short(psrc.get_title()))) + # there are several errors in the below which all cause gramps to + # crash + +# s = "%s\n\n"\ +# "\t%s:\t%s\n"\ +# "\t%s:\t%s\n"\ +# "\t%s:\t%s\n"\ +# "\t%s:\t%s\n"\ +# "\t%s:\t%s\n" % ( +# _("Event"), +# _("Type"),escape(Utils.format_personal_event(self._obj.get_name())), +# _("Date"),escape(DateHander.get_date(self._obj)), +# _("Place"),escape(place_title(self._db,self._obj)), +# _("Cause"),escape(self._obj.get_cause()), +# _("Description"), escape(self._obj.get_description())) +# if len(self._obj.get_source_references()) > 0: +# psrc_ref = self._obj.get_source_references()[0] +# psrc_id = psrc_ref.get_reference_handle() +# psrc = self._db.get_source_from_handle(psrc_id) +# s += "\n%s\n\n"\ +# "\t%s:\t%s\n" % ( +# _("Primary source"), +# _("Name"), +# escape(short(psrc.get_title()))) + s = "" return s def is_valid(self): diff --git a/src/Utils.py b/src/Utils.py index 100d6d169..56d1b3fc3 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -83,6 +83,7 @@ gender = { gen.lib.Person.FEMALE : _("female"), gen.lib.Person.UNKNOWN : _("unknown"), } + def format_gender( type): return gender.get(type[0], _("Invalid"))