From 829705de7642e1a8c13f8c6cfa0b3af49645f20d Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Thu, 4 Feb 2010 19:04:35 +0000 Subject: [PATCH] Add main participant to title svn: r14214 --- src/gui/editors/editevent.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/gui/editors/editevent.py b/src/gui/editors/editevent.py index d702f3553..405c257f3 100644 --- a/src/gui/editors/editevent.py +++ b/src/gui/editors/editevent.py @@ -51,6 +51,7 @@ from displaytabs import (SourceEmbedList, NoteTab, GalleryTab, EventBackRefList, AttrEmbedList) from gui.widgets import (MonitoredEntry, PrivacyButton, MonitoredDataType, MonitoredDate) +from Utils import get_participant_from_event #------------------------------------------------------------------------- # @@ -82,10 +83,15 @@ class EditEvent(EditPrimary): return gen.lib.Event() def get_menu_title(self): - if self.obj.get_handle(): - event_name = self.obj.get_description() - if not event_name: - event_name = str(self.obj.get_type()) + handle = self.obj.get_handle() + if handle: + who = get_participant_from_event(self.db, handle) + desc = self.obj.get_description() + event_name = self.obj.get_type() + if desc: + event_name = '%s - %s' % (event_name, desc) + if who: + event_name = '%s - %s' % (event_name, who) dialog_title = _('Event: %s') % event_name else: dialog_title = _('New Event')