* 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:
parent
94364fc81a
commit
624138a2a4
@ -1,4 +1,8 @@
|
|||||||
2006-05-18 Alex Roitman <shura@gramps-project.org>
|
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.
|
* src/GrampsDb/_DbUtils.py (db_copy): Copy bookmarks and gender stats.
|
||||||
* data/grampsxml.dtd: Update for new bookmarks.
|
* data/grampsxml.dtd: Update for new bookmarks.
|
||||||
* data/grampsxml.rng: Update for new bookmarks.
|
* data/grampsxml.rng: Update for new bookmarks.
|
||||||
|
@ -38,7 +38,7 @@ import DisplayModels
|
|||||||
import const
|
import const
|
||||||
import Utils
|
import Utils
|
||||||
import Bookmarks
|
import Bookmarks
|
||||||
|
import Errors
|
||||||
from Editors import EditRepository, DelRepositoryQuery
|
from Editors import EditRepository, DelRepositoryQuery
|
||||||
from DdTargets import DdTargets
|
from DdTargets import DdTargets
|
||||||
|
|
||||||
@ -159,7 +159,10 @@ class RepositoryView(PageView.ListView):
|
|||||||
def on_double_click(self,obj,event):
|
def on_double_click(self,obj,event):
|
||||||
handle = self.first_selected()
|
handle = self.first_selected()
|
||||||
repos = self.dbstate.db.get_repository_from_handle(handle)
|
repos = self.dbstate.db.get_repository_from_handle(handle)
|
||||||
|
try:
|
||||||
EditRepository(self.dbstate, self.uistate,[],repos)
|
EditRepository(self.dbstate, self.uistate,[],repos)
|
||||||
|
except Errors.WindowActiveError:
|
||||||
|
pass
|
||||||
|
|
||||||
def add(self,obj):
|
def add(self,obj):
|
||||||
EditRepository(self.dbstate, self.uistate,[],RelLib.Repository())
|
EditRepository(self.dbstate, self.uistate,[],RelLib.Repository())
|
||||||
@ -197,5 +200,8 @@ class RepositoryView(PageView.ListView):
|
|||||||
|
|
||||||
for handle in mlist:
|
for handle in mlist:
|
||||||
repos = self.dbstate.db.get_repository_from_handle(handle)
|
repos = self.dbstate.db.get_repository_from_handle(handle)
|
||||||
|
try:
|
||||||
EditRepository(self.dbstate, self.uistate, [], repos)
|
EditRepository(self.dbstate, self.uistate, [], repos)
|
||||||
|
except Errors.WindowActiveError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -36,6 +36,7 @@ import AutoComp
|
|||||||
import DateHandler
|
import DateHandler
|
||||||
import DateEdit
|
import DateEdit
|
||||||
import const
|
import const
|
||||||
|
import Errors
|
||||||
|
|
||||||
_lock_path = os.path.join(const.image_dir, 'stock_lock.png')
|
_lock_path = os.path.join(const.image_dir, 'stock_lock.png')
|
||||||
_lock_open_path = os.path.join(const.image_dir, 'stock_lock-open.png')
|
_lock_open_path = os.path.join(const.image_dir, 'stock_lock-open.png')
|
||||||
@ -523,8 +524,11 @@ class PlaceEntry:
|
|||||||
from Editors import EditPlace
|
from Editors import EditPlace
|
||||||
|
|
||||||
place = Place()
|
place = Place()
|
||||||
|
try:
|
||||||
EditPlace(self.dbstate, self.uistate, self.track,
|
EditPlace(self.dbstate, self.uistate, self.track,
|
||||||
place, self.place_added)
|
place, self.place_added)
|
||||||
|
except Errors.WindowActiveError:
|
||||||
|
pass
|
||||||
|
|
||||||
def place_added(self, data):
|
def place_added(self, data):
|
||||||
self.set_val(data.handle)
|
self.set_val(data.handle)
|
||||||
@ -536,8 +540,11 @@ class PlaceEntry:
|
|||||||
from Editors import EditPlace
|
from Editors import EditPlace
|
||||||
|
|
||||||
place = self.db.get_place_from_handle(self.get_val())
|
place = self.db.get_place_from_handle(self.get_val())
|
||||||
|
try:
|
||||||
EditPlace(self.dbstate, self.uistate, self.track, place,
|
EditPlace(self.dbstate, self.uistate, self.track, place,
|
||||||
self.after_edit)
|
self.after_edit)
|
||||||
|
except Errors.WindowActiveError:
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
from Selectors import selector_factory
|
from Selectors import selector_factory
|
||||||
cls = selector_factory('Place')
|
cls = selector_factory('Place')
|
||||||
@ -570,8 +577,3 @@ class PlaceEntry:
|
|||||||
image.set_from_stock(gtk.STOCK_INDEX,gtk.ICON_SIZE_BUTTON)
|
image.set_from_stock(gtk.STOCK_INDEX,gtk.ICON_SIZE_BUTTON)
|
||||||
image.show()
|
image.show()
|
||||||
self.share.add(image)
|
self.share.add(image)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user