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>
|
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
|
||||||
|
@ -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)
|
|
||||||
|
|
||||||
# ans = EditRepository.DelRepositoryQuery(event,db,
|
for repos_handle in mlist:
|
||||||
# person_list,family_list)
|
|
||||||
|
|
||||||
# if len(person_list) + len(family_list) > 0:
|
source_list = [ src_handle for src_handle \
|
||||||
# msg = _('This place is currently being used. Deleting it '
|
in db.get_source_handles() \
|
||||||
# 'will remove it from the database and from all '
|
if db.get_source_from_handle(src_handle).has_repo_reference(repos_handle)]
|
||||||
# 'people and families that reference it.')
|
|
||||||
# else:
|
repository = db.get_repository_from_handle(repos_handle)
|
||||||
# msg = _('Deleting place will remove it from the database.')
|
|
||||||
|
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):
|
def edit(self,obj):
|
||||||
mlist = []
|
mlist = []
|
||||||
|
Loading…
Reference in New Issue
Block a user