* src/SourceView.py (button_press,build_context_menu): Work with
multiple selections. svn: r4346
This commit is contained in:
parent
62ba24fd6b
commit
c5e45f59df
@ -1,6 +1,9 @@
|
|||||||
2005-04-11 Alex Roitman <shura@gramps-project.org>
|
2005-04-11 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/MergeData.py (on_merge_places_clicked): Commit event.
|
* 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>
|
2005-04-11 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
* src/PedView.py (load_canvas): Catch bug of not existing family
|
* src/PedView.py (load_canvas): Catch bug of not existing family
|
||||||
|
|
||||||
|
@ -144,11 +144,13 @@ class SourceView:
|
|||||||
def build_context_menu(self,event):
|
def build_context_menu(self,event):
|
||||||
"""Builds the menu with editing operations on the source's list"""
|
"""Builds the menu with editing operations on the source's list"""
|
||||||
|
|
||||||
store,node = self.selection.get_selected()
|
mlist = []
|
||||||
if node:
|
self.selection.selected_foreach(self.blist,mlist)
|
||||||
|
if mlist:
|
||||||
sel_sensitivity = 1
|
sel_sensitivity = 1
|
||||||
else:
|
else:
|
||||||
sel_sensitivity = 0
|
sel_sensitivity = 0
|
||||||
|
|
||||||
entries = [
|
entries = [
|
||||||
(gtk.STOCK_ADD, self.on_add_clicked,1),
|
(gtk.STOCK_ADD, self.on_add_clicked,1),
|
||||||
(gtk.STOCK_REMOVE, self.on_delete_clicked,sel_sensitivity),
|
(gtk.STOCK_REMOVE, self.on_delete_clicked,sel_sensitivity),
|
||||||
@ -193,9 +195,10 @@ class SourceView:
|
|||||||
self.topWindow)
|
self.topWindow)
|
||||||
|
|
||||||
def on_edit_clicked(self,obj):
|
def on_edit_clicked(self,obj):
|
||||||
list_store, node = self.selection.get_selected()
|
mlist = []
|
||||||
if node:
|
self.selection.selected_foreach(self.blist,mlist)
|
||||||
handle = list_store.get_value(node,_HANDLE_COL)
|
|
||||||
|
for handle in mlist:
|
||||||
source = self.parent.db.get_source_from_handle(handle)
|
source = self.parent.db.get_source_from_handle(handle)
|
||||||
EditSource.EditSource(source, self.parent.db, self.parent,
|
EditSource.EditSource(source, self.parent.db, self.parent,
|
||||||
self.topWindow)
|
self.topWindow)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user