* src/gramps_main.py: Enable context menu for an empty people view.
* src/FamilyView.py: Cleanups for the case of empty database. svn: r2063
This commit is contained in:
parent
2d8a0a60a8
commit
32a3796ae1
@ -1,3 +1,7 @@
|
||||
2003-08-30 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||
* src/gramps_main.py: Enable context menu for an empty people view.
|
||||
* src/FamilyView.py: Cleanups for the case of empty database.
|
||||
|
||||
2003-08-29 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||
* src/plugins/DesGraph.py: Change from TextDoc and DrawDoc to BaseDoc.
|
||||
* src/plugins/FanChart.py: Likewise. Enable Book item functionality.
|
||||
|
@ -188,7 +188,7 @@ class FamilyView:
|
||||
def edit_active_person(self,obj,event):
|
||||
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
||||
self.parent.load_person(self.person)
|
||||
elif event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
|
||||
elif event.type == gtk.gdk.BUTTON_PRESS and event.button == 3 and self.person:
|
||||
self.build_ap_menu()
|
||||
|
||||
def build_ap_menu(self):
|
||||
@ -865,6 +865,8 @@ class FamilyView:
|
||||
self.parent_editor(self.selected_spouse,self.sp_selection)
|
||||
|
||||
def edit_ap_parents(self,obj,event):
|
||||
if self.person == None:
|
||||
return
|
||||
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
||||
self.parent_editor(self.person,self.ap_selection)
|
||||
elif event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
|
||||
@ -884,7 +886,7 @@ class FamilyView:
|
||||
def edit_sp_parents(self,obj,event):
|
||||
if self.selected_spouse == None:
|
||||
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
|
||||
self.build_sp_parents_nosel_menu()
|
||||
self.build_nav_menu()
|
||||
return
|
||||
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
||||
self.parent_editor(self.selected_spouse,self.sp_selection)
|
||||
|
@ -329,6 +329,7 @@ class Gramps:
|
||||
self.person_tree = self.pl_page[0]
|
||||
self.person_list = self.pl_page[0].tree
|
||||
self.person_model = self.pl_page[0].model
|
||||
self.person_list.connect('button-press-event',self.on_plist_button_press)
|
||||
|
||||
self.default_list = self.pl_page[-1]
|
||||
|
||||
@ -628,6 +629,7 @@ class Gramps:
|
||||
|
||||
back_sensitivity = self.hindex > 0
|
||||
fwd_sensitivity = self.hindex + 1 < len(self.history)
|
||||
sel_sensitivity = 1
|
||||
entries = [
|
||||
(gtk.STOCK_GO_BACK,self.back_clicked,back_sensitivity),
|
||||
(gtk.STOCK_GO_FORWARD,self.fwd_clicked,fwd_sensitivity),
|
||||
@ -635,8 +637,8 @@ class Gramps:
|
||||
(_("Add Bookmark"),self.on_add_bookmark_activate,1),
|
||||
(None,None,0),
|
||||
(gtk.STOCK_ADD, self.add_button_clicked,1),
|
||||
(gtk.STOCK_REMOVE, self.remove_button_clicked,1),
|
||||
(_("Edit"), self.edit_button_clicked,1),
|
||||
(gtk.STOCK_REMOVE, self.remove_button_clicked,sel_sensitivity),
|
||||
(_("Edit"), self.edit_button_clicked,sel_sensitivity),
|
||||
]
|
||||
|
||||
menu = gtk.Menu()
|
||||
|
Loading…
Reference in New Issue
Block a user