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> 2005-08-17 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
* src/ScratchPad.py: fix some issues with new window management and dbstate * src/ScratchPad.py: fix some issues with new window management and dbstate
* src/scratchpad.glade: moved from src/plugins * src/scratchpad.glade: moved from src/plugins

View File

@ -122,33 +122,30 @@ class RepositoryView(PageView.ListView):
def remove(self,obj): def remove(self,obj):
db = self.dbstate.db db = self.dbstate.db
# for event_handle in self.selected_handles(): mlist = []
# person_list = [ handle for handle in self.selection.selected_foreach(self.blist,mlist)
# 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) for repos_handle in mlist:
# ans = EditRepository.DelRepositoryQuery(event,db, source_list = [ src_handle for src_handle \
# person_list,family_list) 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: repository = db.get_repository_from_handle(repos_handle)
# 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.')
# msg = "%s %s" % (msg,Utils.data_recover_msg) ans = EditRepository.DelRepositoryQuery(repository,db,source_list)
# descr = event.get_description()
# if descr == "": if len(source_list) > 0:
# descr = event.get_gramps_id() 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): def edit(self,obj):
mlist = [] mlist = []