From 9dbbf2b512c3240d28e635b21d3c8f58c6b3efaa Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 14 Dec 2005 01:23:23 +0000 Subject: [PATCH] * src/EditPerson.py: fix after merge * src/GrampsDbBase.py: fix after merge * src/edit_person.glade: fix after merge svn: r5545 --- gramps2/ChangeLog | 5 ++ gramps2/src/EditPerson.py | 99 +++++++++++++++++------------------ gramps2/src/GrampsDbBase.py | 6 ++- gramps2/src/edit_person.glade | 3 +- 4 files changed, 59 insertions(+), 54 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 0e10c3bdb..3b52026a7 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,8 @@ +2005-12-13 Don Allingham + * src/EditPerson.py: fix after merge + * src/GrampsDbBase.py: fix after merge + * src/edit_person.glade: fix after merge + 2005-12-12 Alex Roitman * various: merge changes made in gramps20 up until R2_0_9 tag. diff --git a/gramps2/src/EditPerson.py b/gramps2/src/EditPerson.py index e733b8afe..57674b530 100644 --- a/gramps2/src/EditPerson.py +++ b/gramps2/src/EditPerson.py @@ -236,7 +236,7 @@ class EditPerson(DisplayState.ManagedWindow): self.addr_postal = self.top.get_widget("postal") self.addr_phone = self.top.get_widget("phone") self.event_list = self.top.get_widget("eventList") - self.edit_person = self.top.get_widget("editPerson") + self.edit_person = self.top.get_widget("edit_person") self.name_list = self.top.get_widget("nameList") self.alt_given_field = self.top.get_widget("alt_given") self.alt_last_field = self.top.get_widget("alt_last") @@ -250,7 +250,7 @@ class EditPerson(DisplayState.ManagedWindow): self.suffix.set_editable(mod) self.prefix = self.top.get_widget("prefix") self.prefix.set_editable(mod) - self.given = self.top.get_widget("givenName") + self.given = self.top.get_widget("given_name") self.given.set_editable(mod) # self.nick = self.top.get_widget("nickname") # self.nick.set_editable(mod) @@ -269,15 +269,15 @@ class EditPerson(DisplayState.ManagedWindow): self.slist = self.top.get_widget("slist") self.general_label = self.top.get_widget("general_label") - self.names_label = self.top.get_widget("names_text") - self.events_label = self.top.get_widget("events_text") - self.attr_label = self.top.get_widget("attr_text") - self.addr_label = self.top.get_widget("addr_text") - self.notes_label = self.top.get_widget("notes_text") - self.sources_label = self.top.get_widget("sources_text") - self.inet_label = self.top.get_widget("inet_text") - self.gallery_label = self.top.get_widget("gallery_text") - self.lds_tab = self.top.get_widget("lds_text") + self.names_label = self.top.get_widget("names_label") + self.events_label = self.top.get_widget("events_label") + self.attr_label = self.top.get_widget("attr_label") + self.addr_label = self.top.get_widget("addr_label") + self.notes_label = self.top.get_widget("notes_label") + self.sources_label = self.top.get_widget("sources_label") + self.inet_label = self.top.get_widget("inet_label") + self.gallery_label = self.top.get_widget("gallery_label") + self.lds_tab = self.top.get_widget("lds_tab") self.person_photo = self.top.get_widget("personPix") self.eventbox = self.top.get_widget("eventbox1") self.prefix_label = self.top.get_widget('prefix_label') @@ -392,45 +392,46 @@ class EditPerson(DisplayState.ManagedWindow): self.ad_drag_begin, self.ad_drag_data_received) - self.gladeif.connect("editPerson", "delete_event", self.on_delete_event) + self.gladeif.connect("edit_person", "delete_event", self.on_delete_event) self.gladeif.connect("button15", "clicked", self.on_cancel_edit) self.gladeif.connect("ok", "clicked", self.on_apply_person_clicked) self.gladeif.connect("button134", "clicked", self.on_help_clicked) self.gladeif.connect("notebook", "switch_page", self.on_switch_page) - self.gladeif.connect("genderMale", "toggled", self.on_gender_activate) - self.gladeif.connect("genderFemale", "toggled", self.on_gender_activate) - self.gladeif.connect("genderUnknown", "toggled", self.on_gender_activate) - self.gladeif.connect("givenName", "focus_out_event", self.on_given_focus_out_event) +# self.gladeif.connect("genderMale", "toggled", self.on_gender_activate) +# self.gladeif.connect("genderFemale", "toggled", self.on_gender_activate) +# self.gladeif.connect("genderUnknown", "toggled", self.on_gender_activate) + self.gladeif.connect("given_name", "focus_out_event", self.on_given_focus_out_event) self.gladeif.connect("button177", "clicked", self.on_edit_name_clicked) - self.gladeif.connect("button99", "clicked", self.on_edit_birth_clicked) - self.gladeif.connect("button126", "clicked", self.on_edit_death_clicked) - self.gladeif.connect("add_aka", "clicked", self.on_add_aka_clicked) - self.gladeif.connect("aka_edit", "clicked", self.on_aka_update_clicked) - self.gladeif.connect("aka_delete", "clicked", self.on_aka_delete_clicked) - self.gladeif.connect("event_add", "clicked" , self.on_event_add_clicked) - self.gladeif.connect("event_edit_btn", "clicked" ,self.on_event_update_clicked) - self.gladeif.connect("event_del", "clicked", self.on_event_delete_clicked) - self.gladeif.connect("attr_add", "clicked" , self.on_add_attr_clicked) - self.gladeif.connect("attr_edit_btn", "clicked", self.on_update_attr_clicked) - self.gladeif.connect("attr_del", "clicked", self.on_delete_attr_clicked) - self.gladeif.connect("addr_add", "clicked", self.on_add_addr_clicked) - self.gladeif.connect("addr_edit_btn", "clicked", self.on_update_addr_clicked) - self.gladeif.connect("addr_del", "clicked", self.on_delete_addr_clicked) - self.gladeif.connect("media_add", "clicked", self.gallery.on_add_media_clicked) - self.gladeif.connect("media_sel", "clicked", self.gallery.on_select_media_clicked) - self.gladeif.connect("image_edit_btn", "clicked", self.gallery.on_edit_media_clicked) - self.gladeif.connect("media_del", "clicked", self.gallery.on_delete_media_clicked) - self.gladeif.connect("add_url", "clicked", self.on_add_url_clicked) - self.gladeif.connect("edit_url", "clicked", self.on_update_url_clicked,) - self.gladeif.connect("web_go", "clicked", self.on_web_go_clicked) - self.gladeif.connect("delete_url", "clicked", self.on_delete_url_clicked) - self.gladeif.connect("button131", "clicked", self.on_ldsbap_source_clicked,) - self.gladeif.connect("button128", "clicked", self.on_ldsbap_note_clicked) - self.gladeif.connect("button132", "clicked", self.on_ldsendow_source_clicked) - self.gladeif.connect("button129", "clicked", self.on_ldsendow_note_clicked) - self.gladeif.connect("button133", "clicked", self.on_ldsseal_source_clicked) - self.gladeif.connect("button130", "clicked", self.on_ldsseal_note_clicked) - +# self.gladeif.connect("button99", "clicked", self.on_edit_birth_clicked) +# self.gladeif.connect("button126", "clicked", self.on_edit_death_clicked) +# self.gladeif.connect("aka_add", "clicked", self.on_add_aka_clicked) +# self.gladeif.connect("aka_edit", "clicked", self.on_aka_update_clicked) +# self.gladeif.connect("aka_delete", "clicked", self.on_aka_delete_clicked) +# self.gladeif.connect("event_add", "clicked" , self.on_event_add_clicked) +# self.gladeif.connect("event_edit_btn", "clicked" ,self.on_event_update_clicked) +# self.gladeif.connect("event_del", "clicked", self.on_event_delete_clicked) +# self.gladeif.connect("attr_add", "clicked" , self.on_add_attr_clicked) +# self.gladeif.connect("attr_edit_btn", "clicked", self.on_update_attr_clicked) +# self.gladeif.connect("attr_del", "clicked", self.on_delete_attr_clicked) +# self.gladeif.connect("addr_add", "clicked", self.on_add_addr_clicked) +# self.gladeif.connect("addr_edit_btn", "clicked", self.on_update_addr_clicked) +# self.gladeif.connect("addr_del", "clicked", self.on_delete_addr_clicked) +# self.gladeif.connect("media_add", "clicked", self.gallery.on_add_media_clicked) +# self.gladeif.connect("media_sel", "clicked", self.gallery.on_select_media_clicked) +# self.gladeif.connect("image_edit_btn", "clicked", self.gallery.on_edit_media_clicked) +# self.gladeif.connect("media_del", "clicked", self.gallery.on_delete_media_clicked) +# self.gladeif.connect("add_url", "clicked", self.on_add_url_clicked) +# self.gladeif.connect("edit_url", "clicked", self.on_update_url_clicked,) +# self.gladeif.connect("web_go", "clicked", self.on_web_go_clicked) +# self.gladeif.connect("delete_url", "clicked", self.on_delete_url_clicked) +# self.gladeif.connect("button131", "clicked", self.on_ldsbap_source_clicked,) +# self.gladeif.connect("button128", "clicked", self.on_ldsbap_note_clicked) +# self.gladeif.connect("button132", "clicked", self.on_ldsendow_source_clicked) +# self.gladeif.connect("button129", "clicked", self.on_ldsendow_note_clicked) +# self.gladeif.connect("button133", "clicked", self.on_ldsseal_source_clicked) +# self.gladeif.connect("button130", "clicked", self.on_ldsseal_note_clicked) + + self.sourcetab = Sources.SourceTab( self.srcreflist, self, self.top, self.window, self.slist, self.top.get_widget('add_src'), self.top.get_widget('edit_src'), @@ -452,8 +453,9 @@ class EditPerson(DisplayState.ManagedWindow): "event_add", "attr_add", "attr_del", "addr_add", "addr_del", "media_add", "media_sel", "media_del", "add_url", "delete_url", "add_src", "del_src" ]: - self.top.get_widget(i).set_sensitive(not self.db.readonly) - + widget = self.top.get_widget(i) + if widget: + widget.set_sensitive(not self.db.readonly) self.window.show() def set_list_dnd(self,obj, get, begin, receive): @@ -1455,9 +1457,6 @@ class EditPerson(DisplayState.ManagedWindow): def write_primary_name(self): # initial values - name = '%s' % escape(self.nd.display(self.person)) - self.top.get_widget("activepersonTitle").set_text( name) - self.top.get_widget("activepersonTitle").set_use_markup(True) self.suffix.set_text(self.pname.get_suffix()) if self.use_patronymic: self.prefix.set_text(self.pname.get_patronymic()) diff --git a/gramps2/src/GrampsDbBase.py b/gramps2/src/GrampsDbBase.py index d25fb1a62..2e2afe31b 100644 --- a/gramps2/src/GrampsDbBase.py +++ b/gramps2/src/GrampsDbBase.py @@ -384,11 +384,13 @@ class GrampsDbBase(GrampsDBCallback.GrampsDBCallback): transaction, change_time) def commit_personal_event(self,event,transaction,change_time=None): - self.individual_event_names.add(event.name) + if event.type[0] == Event.CUSTOM: + self.individual_event_names.add(event.type[1]) self.commit_event(event,transaction,change_time) def commit_family_event(self,event,transaction,change_time=None): - self.family_event_names.add(event.name) + if event.type[0] == Event.CUSTOM: + self.family_event_names.add(event.type[1]) self.commit_event(event,transaction,change_time) def commit_event(self,event,transaction,change_time=None): diff --git a/gramps2/src/edit_person.glade b/gramps2/src/edit_person.glade index 155336e86..3f785f7b3 100644 --- a/gramps2/src/edit_person.glade +++ b/gramps2/src/edit_person.glade @@ -138,7 +138,6 @@ 0.5 0 0 - givenName PANGO_ELLIPSIZE_NONE -1 False @@ -508,7 +507,7 @@ Unknown 6 - + True The person's given name True