* src/AddrEdit.py: remove already_exist check in favor of exception

* src/AttrEdit.py: remove already_exist check in favor of exception
* src/DisplayState.py: remove already_exist variable
* src/DisplayTabs.py: handle exception
* src/EditEventRef.py: remove already_exist check in favor of exception
* src/EditFamily.py: update to derive from EditPrimary
* src/EditMedia.py: update to derive from EditPrimary
* src/EditMediaRef.py: remove already_exist check in favor of exception
* src/EditPerson.py: update to derive from EditPrimary
* src/EditPlace.py: update to derive from EditPrimary
* src/EditRepository.py:update to derive from EditPrimary
* src/EditSource.py: update to derive from EditPrimary
* src/EditSourceRef.py: remove already_exist check in favor of exception
* src/Errors.py: new exception
* src/EventEdit.py: update to derive from EditPrimary
* src/EventView.py: catch exception of window already exists
* src/FamilyList.py: catch exception of window already exists
* src/FamilyView.py: catch exception of window already exists
* src/GrampsWidgets.py: typos
* src/NameEdit.py: remove already_exist check in favor of exception
* src/PedView.py: catch exception of window already exists
* src/PersonView.py: catch exception of window already exists
* src/PlaceView.py: catch exception of window already exists
* src/Plugins.py: catch exception of window already exists
* src/UrlEdit.py: remove already_exist check in favor of exception
* src/const.py.in: dynamically determine path
* src/gramps.glade: name changes
* src/gramps.py: set path


svn: r6014
This commit is contained in:
Don Allingham
2006-03-01 05:08:11 +00:00
parent 2dd4571b39
commit 6f8ae3cd51
32 changed files with 933 additions and 1326 deletions

View File

@ -45,6 +45,7 @@ import GrampsKeys
import NameDisplay
import GrampsMime
import const
import Errors
#-------------------------------------------------------------------------
#
@ -453,9 +454,6 @@ class ManagedWindow:
window_id,
submenu_label,
menu_label)
if self.already_exist:
return
# Proceed with the class.
...
@ -466,9 +464,8 @@ class ManagedWindow:
if uistate.gwm.get_item_from_id(window_key):
uistate.gwm.get_item_from_id(window_key).present()
self.already_exist = True
raise Errors.WindowActiveError('This window is already active')
else:
self.already_exist = False
self.window_id = window_key
self.submenu_label = submenu_label
self.menu_label = menu_label