2005-08-17 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
* src/RepositoryView.py: remove method now works again. svn: r5094
This commit is contained in:
parent
36745efde0
commit
096d11cfb7
@ -1,3 +1,6 @@
|
||||
2005-08-17 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
|
||||
* src/RepositoryView.py: remove method now works again.
|
||||
|
||||
2005-08-17 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
|
||||
* src/ScratchPad.py: fix some issues with new window management and dbstate
|
||||
* src/scratchpad.glade: moved from src/plugins
|
||||
|
@ -122,33 +122,30 @@ class RepositoryView(PageView.ListView):
|
||||
|
||||
def remove(self,obj):
|
||||
db = self.dbstate.db
|
||||
# for event_handle in self.selected_handles():
|
||||
# person_list = [ handle for handle in
|
||||
# db.get_person_handles(False)
|
||||
# if db.get_person_from_handle(handle).has_handle_reference('Repository',event_handle) ]
|
||||
# family_list = [ handle for handle in
|
||||
# db.get_family_handles()
|
||||
# if db.get_family_from_handle(handle).has_handle_reference('Repository',event_handle) ]
|
||||
mlist = []
|
||||
self.selection.selected_foreach(self.blist,mlist)
|
||||
|
||||
# event = db.get_event_from_handle(event_handle)
|
||||
for repos_handle in mlist:
|
||||
|
||||
# ans = EditRepository.DelRepositoryQuery(event,db,
|
||||
# person_list,family_list)
|
||||
source_list = [ src_handle for src_handle \
|
||||
in db.get_source_handles() \
|
||||
if db.get_source_from_handle(src_handle).has_repo_reference(repos_handle)]
|
||||
|
||||
# if len(person_list) + len(family_list) > 0:
|
||||
# msg = _('This place is currently being used. Deleting it '
|
||||
# 'will remove it from the database and from all '
|
||||
# 'people and families that reference it.')
|
||||
# else:
|
||||
# msg = _('Deleting place will remove it from the database.')
|
||||
repository = db.get_repository_from_handle(repos_handle)
|
||||
|
||||
# msg = "%s %s" % (msg,Utils.data_recover_msg)
|
||||
# descr = event.get_description()
|
||||
# if descr == "":
|
||||
# descr = event.get_gramps_id()
|
||||
ans = EditRepository.DelRepositoryQuery(repository,db,source_list)
|
||||
|
||||
if len(source_list) > 0:
|
||||
msg = _('This repository is currently being used. Deleting it '
|
||||
'will remove it from the database and from all '
|
||||
'sources that reference it.')
|
||||
else:
|
||||
msg = _('Deleting repository will remove it from the database.')
|
||||
|
||||
msg = "%s %s" % (msg,Utils.data_recover_msg)
|
||||
QuestionDialog(_('Delete %s?') % repository.get_name(), msg,
|
||||
_('_Delete Repository'),ans.query_response)
|
||||
|
||||
# QuestionDialog(_('Delete %s?') % descr, msg,
|
||||
# _('_Delete Repository'),ans.query_response)
|
||||
|
||||
def edit(self,obj):
|
||||
mlist = []
|
||||
|
Loading…
Reference in New Issue
Block a user