diff --git a/gramps/src/AddSpouse.py b/gramps/src/AddSpouse.py index 61088f1f3..f5345bf24 100644 --- a/gramps/src/AddSpouse.py +++ b/gramps/src/AddSpouse.py @@ -82,7 +82,9 @@ class AddSpouse: self.spouse_list = self.glade.get_widget("spouseList") self.relation_def = self.glade.get_widget("reldef") self.top = self.glade.get_widget("spouseDialog") + self.ok = self.glade.get_widget('spouse_ok') + self.ok.set_sensitive(0) self.name_list = self.db.getPersonMap().values() self.name_list.sort(sort.by_last_name) self.rel_combo.set_popdown_strings(const.familyRelations) @@ -94,11 +96,19 @@ class AddSpouse: "on_new_spouse_clicked" : self.new_spouse_clicked, "on_rel_type_changed" : self.relation_type_changed, "on_combo_insert_text" : Utils.combo_insert_text, + "on_select_row" : self.select_row, + "on_unselect_row" : self.unselect_row, "destroy_passed_object" : Utils.destroy_passed_object }) self.relation_type.set_text(_("Married")) + def select_row(self,obj,a,b,c): + self.ok.set_sensitive(1) + + def unselect_row(self,obj,a,b,c): + self.ok.set_sensitive(0) + def new_spouse_clicked(self,obj): """ Called when the spouse to be added does not exist, and needs diff --git a/gramps/src/gramps.glade b/gramps/src/gramps.glade index f2663c544..449bdeb38 100644 --- a/gramps/src/gramps.glade +++ b/gramps/src/gramps.glade @@ -4594,7 +4594,7 @@ GtkButton - spouseExistingPerson + spouse_ok True True @@ -4680,8 +4680,13 @@ True select_row - on_spouseList_select_row - Sun, 19 Nov 2000 00:44:36 GMT + on_select_row + Fri, 29 Mar 2002 13:44:27 GMT + + + unselect_row + on_unselect_row + Fri, 29 Mar 2002 13:44:33 GMT 2 256,80