* src/SourceView.py (button_press,build_context_menu): Work with

multiple selections.


svn: r4346
This commit is contained in:
Alex Roitman 2005-04-11 14:47:02 +00:00
parent 2837586ceb
commit d30ac900fe
2 changed files with 11 additions and 5 deletions

View File

@ -1,6 +1,9 @@
2005-04-11 Alex Roitman <shura@gramps-project.org>
* src/MergeData.py (on_merge_places_clicked): Commit event.
* src/SourceView.py (button_press,build_context_menu): Work with
multiple selections.
2005-04-11 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/PedView.py (load_canvas): Catch bug of not existing family

View File

@ -144,11 +144,13 @@ class SourceView:
def build_context_menu(self,event):
"""Builds the menu with editing operations on the source's list"""
store,node = self.selection.get_selected()
if node:
mlist = []
self.selection.selected_foreach(self.blist,mlist)
if mlist:
sel_sensitivity = 1
else:
sel_sensitivity = 0
entries = [
(gtk.STOCK_ADD, self.on_add_clicked,1),
(gtk.STOCK_REMOVE, self.on_delete_clicked,sel_sensitivity),
@ -193,9 +195,10 @@ class SourceView:
self.topWindow)
def on_edit_clicked(self,obj):
list_store, node = self.selection.get_selected()
if node:
handle = list_store.get_value(node,_HANDLE_COL)
mlist = []
self.selection.selected_foreach(self.blist,mlist)
for handle in mlist:
source = self.parent.db.get_source_from_handle(handle)
EditSource.EditSource(source, self.parent.db, self.parent,
self.topWindow)