* src/DataViews/_RepositoryView.py (edit, on_double_click): Catch

exception.
	* src/GrampsWidgets.py (PlaceEntry.add_del_clicked) 
	(PlaceEntry.share_clicked): Catch exception.


svn: r6716
This commit is contained in:
Alex Roitman 2006-05-18 23:02:47 +00:00
parent 94364fc81a
commit 624138a2a4
3 changed files with 25 additions and 13 deletions

View File

@ -1,4 +1,8 @@
2006-05-18 Alex Roitman <shura@gramps-project.org>
* src/DataViews/_RepositoryView.py (edit, on_double_click): Catch
exception.
* src/GrampsWidgets.py (PlaceEntry.add_del_clicked)
(PlaceEntry.share_clicked): Catch exception.
* src/GrampsDb/_DbUtils.py (db_copy): Copy bookmarks and gender stats.
* data/grampsxml.dtd: Update for new bookmarks.
* data/grampsxml.rng: Update for new bookmarks.

View File

@ -38,7 +38,7 @@ import DisplayModels
import const
import Utils
import Bookmarks
import Errors
from Editors import EditRepository, DelRepositoryQuery
from DdTargets import DdTargets
@ -159,7 +159,10 @@ class RepositoryView(PageView.ListView):
def on_double_click(self,obj,event):
handle = self.first_selected()
repos = self.dbstate.db.get_repository_from_handle(handle)
EditRepository(self.dbstate, self.uistate,[],repos)
try:
EditRepository(self.dbstate, self.uistate,[],repos)
except Errors.WindowActiveError:
pass
def add(self,obj):
EditRepository(self.dbstate, self.uistate,[],RelLib.Repository())
@ -197,5 +200,8 @@ class RepositoryView(PageView.ListView):
for handle in mlist:
repos = self.dbstate.db.get_repository_from_handle(handle)
EditRepository(self.dbstate, self.uistate, [], repos)
try:
EditRepository(self.dbstate, self.uistate, [], repos)
except Errors.WindowActiveError:
pass

View File

@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2005 Donald N. Allingham
# Copyright (C) 2000-2006 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -36,6 +36,7 @@ import AutoComp
import DateHandler
import DateEdit
import const
import Errors
_lock_path = os.path.join(const.image_dir, 'stock_lock.png')
_lock_open_path = os.path.join(const.image_dir, 'stock_lock-open.png')
@ -523,8 +524,11 @@ class PlaceEntry:
from Editors import EditPlace
place = Place()
EditPlace(self.dbstate, self.uistate, self.track,
place, self.place_added)
try:
EditPlace(self.dbstate, self.uistate, self.track,
place, self.place_added)
except Errors.WindowActiveError:
pass
def place_added(self, data):
self.set_val(data.handle)
@ -536,8 +540,11 @@ class PlaceEntry:
from Editors import EditPlace
place = self.db.get_place_from_handle(self.get_val())
EditPlace(self.dbstate, self.uistate, self.track, place,
self.after_edit)
try:
EditPlace(self.dbstate, self.uistate, self.track, place,
self.after_edit)
except Errors.WindowActiveError:
pass
else:
from Selectors import selector_factory
cls = selector_factory('Place')
@ -570,8 +577,3 @@ class PlaceEntry:
image.set_from_stock(gtk.STOCK_INDEX,gtk.ICON_SIZE_BUTTON)
image.show()
self.share.add(image)