* src/gramps_main.py (load_selected_people): Only invoke Edit person

dialog if the active person is selection in the current alpha- page;
(change_alpha_page): Enable person-centered buttons only if the
selection is visible in the current page;
(build_people_context_menu): Enable Add bookmark and Edit/Remove only
if the selection is visible in the current page.


svn: r2068
This commit is contained in:
Alex Roitman 2003-08-31 05:12:30 +00:00
parent c2b86fbed5
commit aef12f25bf
2 changed files with 20 additions and 4 deletions

View File

@ -1,6 +1,12 @@
2003-08-30 Alex Roitman <shura@alex.neuro.umn.edu>
* src/docgen/PdfDoc.py (page_break): Minor cleanup;
(end_page): Was defined twice -- remove the first occurence.
* src/gramps_main.py (load_selected_people): Only invoke Edit person
dialog if the active person is selection in the current alpha- page;
(change_alpha_page): Enable person-centered buttons only if the
selection is visible in the current page;
(build_people_context_menu): Enable Add bookmark and Edit/Remove only
if the selection is visible in the current page.
2003-08-30 Don Allingham <dallingham@users.sourceforge.net>
* src/docgen/PdfDoc.py: Support drawing functions.

View File

@ -629,12 +629,16 @@ class Gramps:
back_sensitivity = self.hindex > 0
fwd_sensitivity = self.hindex + 1 < len(self.history)
sel_sensitivity = 1
mlist = self.person_tree.get_selected_objects()
if mlist:
sel_sensitivity = 1
else:
sel_sensitivity = 0
entries = [
(gtk.STOCK_GO_BACK,self.back_clicked,back_sensitivity),
(gtk.STOCK_GO_FORWARD,self.fwd_clicked,fwd_sensitivity),
(gtk.STOCK_HOME,self.on_home_clicked,1),
(_("Add Bookmark"),self.on_add_bookmark_activate,1),
(_("Add Bookmark"),self.on_add_bookmark_activate,sel_sensitivity),
(None,None,0),
(gtk.STOCK_ADD, self.add_button_clicked,1),
(gtk.STOCK_REMOVE, self.remove_button_clicked,sel_sensitivity),
@ -665,7 +669,12 @@ class Gramps:
self.model_used[self.person_tree] = 1
self.apply_filter(self.person_tree)
self.person_list.connect('button-press-event',self.on_plist_button_press)
mlist = self.person_tree.get_selected_objects()
if mlist:
self.set_buttons(1)
else:
self.set_buttons(0)
def edit_button_clicked(self,obj):
cpage = self.views.get_current_page()
if cpage == PERSON_VIEW:
@ -1512,7 +1521,8 @@ class Gramps:
def load_selected_people(self,obj):
"""Display the selected people in the EditPerson display"""
if self.active_person:
mlist = self.person_tree.get_selected_objects()
if mlist and self.active_person == self.db.getPerson(mlist[0]):
self.load_person(self.active_person)
def load_active_person(self,obj):