diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index dd3fcde08..49289b019 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,8 @@ 2006-05-18 Alex Roitman + * 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. diff --git a/gramps2/src/DataViews/_RepositoryView.py b/gramps2/src/DataViews/_RepositoryView.py index e78662eb7..ffd588189 100644 --- a/gramps2/src/DataViews/_RepositoryView.py +++ b/gramps2/src/DataViews/_RepositoryView.py @@ -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 diff --git a/gramps2/src/GrampsWidgets.py b/gramps2/src/GrampsWidgets.py index 9d91f39d7..c9f9994d5 100644 --- a/gramps2/src/GrampsWidgets.py +++ b/gramps2/src/GrampsWidgets.py @@ -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) - - - - -