diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 1edab8197..997aea11e 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,5 +1,6 @@ 2006-08-24 Alex Roitman * src/plugins/ChangeTypes.py (run_tool): Properly set the new type. + (on_apply_clicked): Properly save entered types, including custom. 2006-08-23 Alex Roitman * src/DataViews/_PersonView.py (person_removed): Properly create diff --git a/gramps2/src/plugins/ChangeTypes.py b/gramps2/src/plugins/ChangeTypes.py index fb5e9f633..c9de1ee4c 100644 --- a/gramps2/src/plugins/ChangeTypes.py +++ b/gramps2/src/plugins/ChangeTypes.py @@ -82,8 +82,7 @@ class ChangeTypes(Tool.BatchTool, ManagedWindow.ManagedWindow): self.auto1 = self.glade.get_widget("original") self.auto2 = self.glade.get_widget("new") - event_names = [item[1] for item in EventType._DATAMAP - if item[0] > 0 ] + event_names = [item[1] for item in EventType._DATAMAP if item[0] > 0 ] event_names.sort(locale.strcoll) AutoComp.fill_combo(self.auto1,event_names) AutoComp.fill_combo(self.auto2,event_names) @@ -151,10 +150,13 @@ class ChangeTypes(Tool.BatchTool, ManagedWindow.ManagedWindow): def on_apply_clicked(self,obj): # Need to store English names for later comparison - self.options.handler.options_dict['fromtype'] = EventType._I2EMAP[ - EventType._S2IMAP[self.auto1.child.get_text()]] - self.options.handler.options_dict['totype'] = EventType._I2EMAP[ - EventType._S2IMAP[self.auto2.child.get_text()]] + the_type = EventType() + + the_type.set(self.auto1.child.get_text()) + self.options.handler.options_dict['fromtype'] = the_type.xml_str() + + the_type.set(self.auto2.child.get_text()) + self.options.handler.options_dict['totype'] = the_type.xml_str() modified,msg = self.run_tool(cli=False) OkDialog(_('Change types'),msg,self.window)