diff --git a/src/gen/lib/researcher.py b/src/gen/lib/researcher.py index 7277d5e52..436bf57f8 100644 --- a/src/gen/lib/researcher.py +++ b/src/gen/lib/researcher.py @@ -107,3 +107,9 @@ class Researcher(LocationBase): self.name = other_researcher.name self.addr = other_researcher.addr self.email = other_researcher.email + + def get(self): + return [getattr(self, value) for value in + ['name', 'addr', 'city', 'state', + 'country', 'postal', 'phone', 'email'] + ] diff --git a/src/plugins/tool/OwnerEditor.py b/src/plugins/tool/OwnerEditor.py index f4cd21cf7..e0778fea8 100644 --- a/src/plugins/tool/OwnerEditor.py +++ b/src/plugins/tool/OwnerEditor.py @@ -109,11 +109,12 @@ class OwnerEditor(Tool.Tool, ManagedWindow.ManagedWindow): "on_cancel_button_clicked": self.close, "on_help_button_clicked": self.on_help_button_clicked, "on_eventbox_button_press_event": self.on_button_press_event, - }) + "on_menu_activate": self.on_menu_activate, + }) # fetch the popup menu self.menu = topDialog.get_object("popup_menu") - topDialog.connect_signals({"on_menu_activate": self.on_menu_activate}) + #topDialog.connect_signals({"on_menu_activate": self.on_menu_activate}) # get current db owner and attach it to the entries of the window self.owner = self.db.get_researcher() @@ -158,7 +159,7 @@ class OwnerEditor(Tool.Tool, ManagedWindow.ManagedWindow): def on_menu_activate(self, menuitem): """Copies the owner information from/to the preferences""" if menuitem.name == 'copy_from_preferences_to_db': - self.owner.set(*GrampsCfg.get_researcher().get()) + self.owner.set_from(GrampsCfg.get_researcher()) for entry in self.entries: entry.update()