* src/gramps_main.py (change_active_person): Cleanup with

enabling/disabling add/edit/remove buttons in different views upon the
active person change.


svn: r2041
This commit is contained in:
Alex Roitman 2003-08-25 05:03:36 +00:00
parent 666428c576
commit fb10339133
2 changed files with 12 additions and 10 deletions

View File

@ -16,6 +16,9 @@
build_child_menu, build_spouse_menu, build_parents_menu,
build_sp_parents_menu, edit_parents, edit_sp_parents):
Add navigation portion to all context menus.
* src/gramps_main.py (change_active_person): Cleanup with
enabling/disabling add/edit/remove buttons in different views upon the
active person change.
2003-08-23 Don Allingham <dallingham@users.sourceforge.net>
* src/BaseDoc.py: New base clase for TextDoc/DrawDoc combination

View File

@ -372,9 +372,7 @@ class Gramps:
self.source_view = SourceView.SourceView(self.db,self.gtop,self.update_display)
self.media_view = MediaView.MediaView(self.db,self.gtop,self.update_display)
self.addbtn = self.gtop.get_widget('addbtn')
self.removebtn = self.gtop.get_widget('removebtn')
self.editbtn = self.gtop.get_widget('editbtn')
self.add_button = self.gtop.get_widget('addbtn')
self.backbtn = self.gtop.get_widget('back_btn')
self.fwdbtn = self.gtop.get_widget('fwd_btn')
self.back = self.gtop.get_widget('back')
@ -685,9 +683,9 @@ class Gramps:
self.media_view.on_delete_clicked(obj)
def enable_buttons(self,val):
self.addbtn.set_sensitive(val)
self.removebtn.set_sensitive(val)
self.editbtn.set_sensitive(val)
self.add_button.set_sensitive(val)
self.remove_button.set_sensitive(val)
self.edit_button.set_sensitive(val)
def row_changed(self,obj):
mlist = self.person_tree.get_selected_objects()
@ -1646,6 +1644,7 @@ class Gramps:
self.backbtn.set_sensitive(0)
self.back.set_sensitive(0)
if self.views.get_current_page == 1:
if person:
self.set_buttons(1)
else: