* src/EventEdit.py: disable OK button if event type is an empty string

* src/gramps_main.py: fix merge callback


svn: r4226
This commit is contained in:
Don Allingham 2005-03-23 22:01:22 +00:00
parent 4f52248015
commit d1a0912d50
2 changed files with 12 additions and 4 deletions

View File

@ -154,7 +154,9 @@ class EventEditor:
self.preform.set_sensitive(not noedit) self.preform.set_sensitive(not noedit)
self.gallery_label = self.top.get_widget("galleryEvent") self.gallery_label = self.top.get_widget("galleryEvent")
self.witnesses_label = self.top.get_widget("witnessesEvent") self.witnesses_label = self.top.get_widget("witnessesEvent")
self.top.get_widget('ok').set_sensitive(not noedit) self.ok = self.top.get_widget('ok')
self.ok.set_sensitive(not noedit)
if read_only or noedit: if read_only or noedit:
self.event_menu.set_sensitive(False) self.event_menu.set_sensitive(False)
@ -244,10 +246,18 @@ class EventEditor:
self.top.get_widget('sel_obj').set_sensitive(not noedit) self.top.get_widget('sel_obj').set_sensitive(not noedit)
self.top.get_widget('add_obj').set_sensitive(not noedit) self.top.get_widget('add_obj').set_sensitive(not noedit)
if not noedit:
self.event_menu.connect('changed',self.menu_changed)
self.menu_changed(self.event_menu)
self.window.set_transient_for(self.parent.window) self.window.set_transient_for(self.parent.window)
self.add_itself_to_menu() self.add_itself_to_menu()
self.window.show() self.window.show()
def menu_changed(self,obj):
text = not obj.get_active_text()
self.ok.set_sensitive(not text)
def on_delete_event(self,obj,b): def on_delete_event(self,obj,b):
self.gallery.close() self.gallery.close()
self.close_child_windows() self.close_child_windows()

View File

@ -1431,12 +1431,10 @@ class Gramps:
self.enable_interface() self.enable_interface()
def merge_update(self,p1,p2,old_id): def merge_update(self,p1,p2,old_id):
self.people_view.remove_from_person_list(p1,old_id)
self.people_view.remove_from_person_list(p2) self.people_view.remove_from_person_list(p2)
self.people_view.remove_from_history(p1,old_id)
self.people_view.remove_from_history(p2) self.people_view.remove_from_history(p2)
self.redraw_histmenu() self.redraw_histmenu()
self.people_view.redisplay_person_list(p1) self.people_view.build_tree()
self.update_display(0) self.update_display(0)
def goto_active_person(self): def goto_active_person(self):