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:
Richard Taylor 2005-08-17 14:24:34 +00:00
parent acc123ca17
commit d29c69cca4
2 changed files with 24 additions and 24 deletions

View File

@ -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

View File

@ -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) ]
# event = db.get_event_from_handle(event_handle)
mlist = []
self.selection.selected_foreach(self.blist,mlist)
# ans = EditRepository.DelRepositoryQuery(event,db,
# person_list,family_list)
for repos_handle in mlist:
# 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.')
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)]
repository = db.get_repository_from_handle(repos_handle)
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)
# msg = "%s %s" % (msg,Utils.data_recover_msg)
# descr = event.get_description()
# if descr == "":
# descr = event.get_gramps_id()
# QuestionDialog(_('Delete %s?') % descr, msg,
# _('_Delete Repository'),ans.query_response)
def edit(self,obj):
mlist = []