From 08e17293a72839c73cd18f3a4b7c5bea064a7100 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 25 Feb 2005 17:29:39 +0000 Subject: [PATCH] * src/EditPerson.py (on_event_update_clicked): Pass callback. * src/EventEdit.py (__init__): Typo. svn: r4095 --- gramps2/ChangeLog | 3 +++ gramps2/src/EditPerson.py | 2 +- gramps2/src/EventEdit.py | 17 ++++++++--------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 98fc8d6d5..8edadd9ec 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -11,6 +11,9 @@ * src/NameEdit.py (__init__): Compare displayed name with empty string, (update_group_as): Only query grouping for existing name. + * src/EditPerson.py (on_event_update_clicked): Pass callback. + * src/EventEdit.py (__init__): Typo. + 2005-02-24 Alex Roitman * src/MediaView.py (on_select_row): Add garbage collection call. diff --git a/gramps2/src/EditPerson.py b/gramps2/src/EditPerson.py index 31e85e5a8..acb40f1f6 100644 --- a/gramps2/src/EditPerson.py +++ b/gramps2/src/EditPerson.py @@ -1658,7 +1658,7 @@ class EditPerson: event = self.etree.get_object(node) EventEdit.EventEditor(self,pname,const.personalEvents, const.personal_events,event,None,0, - noedit=self.db.readonly) + self.event_edit_callback,noedit=self.db.readonly) def on_event_select_row(self,obj): store,node = obj.get_selected() diff --git a/gramps2/src/EventEdit.py b/gramps2/src/EventEdit.py index 95b7f6ce8..d3cc66655 100644 --- a/gramps2/src/EventEdit.py +++ b/gramps2/src/EventEdit.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2004 Donald N. Allingham +# Copyright (C) 2000-2005 Donald N. Allingham # # 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 @@ -25,7 +25,6 @@ # Python modules # #------------------------------------------------------------------------- -from string import strip from gettext import gettext as _ #------------------------------------------------------------------------- @@ -153,7 +152,7 @@ class EventEditor: self.witnesses_label = self.top.get_widget("witnessesEvent") self.top.get_widget('ok').set_sensitive(not noedit) - if read_only or not noedit: + if read_only or noedit: self.event_menu.set_sensitive(False) self.date_field.grab_focus() @@ -203,11 +202,11 @@ class EventEditor: self.note_field.get_buffer().set_text(event.get_note()) if event.get_note(): - self.note_field.get_buffer().set_text(event.get_note()) + self.note_field.get_buffer().set_text(event.get_note()) Utils.bold_label(self.notes_label) - if event.get_note_format() == 1: + if event.get_note_format() == 1: self.preform.set_active(1) - else: + else: self.flowed.set_active(1) if event.get_media_list(): Utils.bold_label(self.gallery_label) @@ -218,8 +217,8 @@ class EventEditor: self.place_field.set_text(def_placename) self.date_check = DateEdit.DateEdit(self.date, self.date_field, - self.top.get_widget("date_stat"), - self.window) + self.top.get_widget("date_stat"), + self.window) if not event: event = RelLib.Event() @@ -298,7 +297,7 @@ class EventEditor: gnome.help_display('gramps-manual','gramps-edit-complete') def get_place(self,field): - text = strip(unicode(field.get_text())) + text = unicode(field.get_text()).strip() if text: if self.pmap.has_key(text): return self.parent.db.get_event_from_handle(self.pmap[text])