* src/SourceView.py: fix multiple selection problem.
svn: r4285
This commit is contained in:
parent
52b0549e99
commit
fc01bc440d
@ -1,3 +1,6 @@
|
|||||||
|
2005-04-02 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/SourceView.py: fix multiple selection problem.
|
||||||
|
|
||||||
2005-04-02 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
2005-04-02 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
* src/EditPerson.py: Remove unneeded arguments.
|
* src/EditPerson.py: Remove unneeded arguments.
|
||||||
* src/Marriage.py: Remove unneeded arguments.
|
* src/Marriage.py: Remove unneeded arguments.
|
||||||
|
@ -171,28 +171,27 @@ class SourceView:
|
|||||||
self.topWindow)
|
self.topWindow)
|
||||||
|
|
||||||
def on_delete_clicked(self,obj):
|
def on_delete_clicked(self,obj):
|
||||||
store,node = self.selection.get_selected()
|
mlist = []
|
||||||
if not node:
|
self.selection.selected_foreach(self.blist,mlist)
|
||||||
return
|
|
||||||
|
|
||||||
handle = 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)
|
||||||
|
|
||||||
the_lists = Utils.get_source_referents(handle,self.parent.db)
|
the_lists = Utils.get_source_referents(handle,self.parent.db)
|
||||||
ans = EditSource.DelSrcQuery(source,self.parent.db,the_lists,
|
ans = EditSource.DelSrcQuery(source,self.parent.db,the_lists,
|
||||||
self.model.delete_row_by_handle)
|
self.model.delete_row_by_handle)
|
||||||
|
|
||||||
if filter(None,the_lists): # quick test for non-emptiness
|
if filter(None,the_lists): # quick test for non-emptiness
|
||||||
msg = _('This source is currently being used. Deleting it '
|
msg = _('This source is currently being used. Deleting it '
|
||||||
'will remove it from the database and from all '
|
'will remove it from the database and from all '
|
||||||
'records that reference it.')
|
'records that reference it.')
|
||||||
else:
|
else:
|
||||||
msg = _('Deleting source will remove it from the database.')
|
msg = _('Deleting source will remove it from the database.')
|
||||||
|
|
||||||
msg = "%s %s" % (msg,Utils.data_recover_msg)
|
msg = "%s %s" % (msg,Utils.data_recover_msg)
|
||||||
QuestionDialog(_('Delete %s?') % source.get_title(), msg,
|
QuestionDialog(_('Delete %s?') % source.get_title(), msg,
|
||||||
_('_Delete Source'),ans.query_response,
|
_('_Delete Source'),ans.query_response,
|
||||||
self.topWindow)
|
self.topWindow)
|
||||||
|
|
||||||
def on_edit_clicked(self,obj):
|
def on_edit_clicked(self,obj):
|
||||||
list_store, node = self.selection.get_selected()
|
list_store, node = self.selection.get_selected()
|
||||||
|
Loading…
Reference in New Issue
Block a user