create new Editors submodule

svn: r6067
This commit is contained in:
Don Allingham 2006-03-04 05:24:16 +00:00
parent fcecd44628
commit 7b4866ff49
37 changed files with 141 additions and 97 deletions

View File

@ -6,6 +6,33 @@
* src/EditEvent.py: renamed from EventEdit.py * src/EditEvent.py: renamed from EventEdit.py
* src/images/Makefile.am: restore * src/images/Makefile.am: restore
* src/plugins/Makefile.am: remove stock_link.png from dependency list * src/plugins/Makefile.am: remove stock_link.png from dependency list
* src/Editors/EditPrimary.py: moved to separate module
* src/Editors/EditPlace.py: moved to separate module
* src/Editors/EditAddress.py: moved to separate module
* src/Editors/EditSecondary.py: moved to separate module
* src/Editors/EditSourceRef.py: moved to separate module
* src/Editors/EditSource.py: moved to separate module
* src/Editors/EditUrl.py: moved to separate module
* src/Editors/EditAttribute.py: moved to separate module
* src/Editors/EditPerson.py: moved to separate module
* src/Editors/EditLocation.py: moved to separate module
* src/Editors/EditMediaRef.py: moved to separate module
* src/Editors/EditEventRef.py: moved to separate module
* src/Editors/EditMedia.py: moved to separate module
* src/Editors/EditRepository.py: moved to separate module
* src/Editors/EditName.py: moved to separate module
* src/Editors/EditEvent.py: moved to separate module
* src/Editors/EditFamily.py: moved to separate module
* src/DisplayTabs.py: handle noew submodule
* src/ObjectSelector/_PersonFrame.py: handle noew submodule
* src/MediaView.py: handle noew submodule
* src/FamilyList.py: handle noew submodule
* src/PlaceView.py: handle noew submodule
* src/SourceView.py: handle noew submodule
* src/PersonView.py: handle noew submodule
* src/FamilyView.py: handle noew submodule
* src/EventView.py: handle noew submodule
* src/Makefile.am: handle noew submodule
2006-03-03 Alex Roitman <shura@gramps-project.org> 2006-03-03 Alex Roitman <shura@gramps-project.org>
* src/plugins/stock_link.png: Remove (already present in * src/plugins/stock_link.png: Remove (already present in

View File

@ -237,6 +237,7 @@ src/GrampsLogger/Makefile
src/TreeViews/Makefile src/TreeViews/Makefile
src/GrampsDb/Makefile src/GrampsDb/Makefile
src/docgen/Makefile src/docgen/Makefile
src/Editors/Makefile
src/plugins/Makefile src/plugins/Makefile
src/dates/Makefile src/dates/Makefile
src/data/Makefile src/data/Makefile

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -593,7 +593,7 @@ class EventEmbedList(EmbeddedList):
return ((1,0),(1,1),(1,2),(1,3),(1,4),(1,5)) return ((1,0),(1,1),(1,2),(1,3),(1,4),(1,5))
def add_button_clicked(self,obj): def add_button_clicked(self,obj):
from EditEventRef import EditEventRef from Editors import EditEventRef
try: try:
EditEventRef(self.dbstate,self.uistate,self.track, EditEventRef(self.dbstate,self.uistate,self.track,
None, None, self.obj, self.event_added) None, None, self.obj, self.event_added)
@ -601,7 +601,7 @@ class EventEmbedList(EmbeddedList):
pass pass
def share_button_clicked(self,obj): def share_button_clicked(self,obj):
from EditEventRef import EditEventRef from Editors import EditEventRef
import SelectEvent import SelectEvent
sel = SelectEvent.SelectEvent(self.dbstate.db,"Event Select") sel = SelectEvent.SelectEvent(self.dbstate.db,"Event Select")
@ -615,7 +615,7 @@ class EventEmbedList(EmbeddedList):
def edit_button_clicked(self,obj): def edit_button_clicked(self,obj):
ref = self.get_selected() ref = self.get_selected()
if ref: if ref:
from EditEventRef import EditEventRef from Editors import EditEventRef
event = self.dbstate.db.get_event_from_handle(ref.ref) event = self.dbstate.db.get_event_from_handle(ref.ref)
try: try:
EditEventRef(self.dbstate,self.uistate,self.track, EditEventRef(self.dbstate,self.uistate,self.track,
@ -723,42 +723,42 @@ class BackRefList(EmbeddedList):
(reftype, ref) = self.find_node() (reftype, ref) = self.find_node()
if reftype == 'Person': if reftype == 'Person':
try: try:
import EditPerson from Editors import EditPerson
person = self.dbstate.db.get_person_from_handle(ref) person = self.dbstate.db.get_person_from_handle(ref)
EditPerson.EditPerson(self.dbstate, self.uistate, [], person) EditPerson(self.dbstate, self.uistate, [], person)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
elif reftype == 'Family': elif reftype == 'Family':
try: try:
import EditFamily from Editors import EditFamily
family = self.dbstate.db.get_family_from_handle(ref) family = self.dbstate.db.get_family_from_handle(ref)
EditFamily.EditFamily(self.dbstate, self.uistate, [], family) EditFamily(self.dbstate, self.uistate, [], family)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
elif reftype == 'Source': elif reftype == 'Source':
try: try:
import EditFamily from Editors import EditSource
source = self.dbstate.db.get_source_from_handle(ref) source = self.dbstate.db.get_source_from_handle(ref)
EditSource.EditSource(self.dbstate, self.uistate, [], source) EditSource(self.dbstate, self.uistate, [], source)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
elif reftype == 'Place': elif reftype == 'Place':
try: try:
import EditPlace from Editors import EditPlace
place = self.dbstate.db.get_place_from_handle(ref) place = self.dbstate.db.get_place_from_handle(ref)
EditPlace.EditPlace(self.dbstate,self.uistate,[],place) EditPlace(self.dbstate,self.uistate,[],place)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
elif reftype == 'Media': elif reftype == 'Media':
try: try:
import EditMedia from Editors import EditMedia
obj = self.dbstate.db.get_object_from_handle(ref) obj = self.dbstate.db.get_object_from_handle(ref)
EditMedia.EditMedia(self.dbstate,self.uistate, [], obj) EditMedia(self.dbstate,self.uistate, [], obj)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -866,11 +866,11 @@ class AttrEmbedList(EmbeddedList):
return ((1,0),(1,1)) return ((1,0),(1,1))
def add_button_clicked(self,obj): def add_button_clicked(self,obj):
import EditAttribute from Editors import EditAttribute
pname = '' pname = ''
attr_list = [] attr_list = []
try: try:
EditAttribute.EditAttribute( EditAttribute(
self.dbstate, self.uistate, self.track, None, self.dbstate, self.uistate, self.track, None,
pname, attr_list, self.add_callback) pname, attr_list, self.add_callback)
except Errors.WindowActiveError: except Errors.WindowActiveError:
@ -884,11 +884,11 @@ class AttrEmbedList(EmbeddedList):
def edit_button_clicked(self,obj): def edit_button_clicked(self,obj):
attr = self.get_selected() attr = self.get_selected()
if attr: if attr:
import EditAttribute from Editors import EditAttribute
pname = '' pname = ''
attr_list = [] attr_list = []
try: try:
EditAttribute.EditAttribute( EditAttribute(
self.dbstate, self.uistate, self.track, attr, self.dbstate, self.uistate, self.track, attr,
pname, attr_list, self.edit_callback) pname, attr_list, self.edit_callback)
except Errors.WindowActiveError: except Errors.WindowActiveError:
@ -926,11 +926,11 @@ class WebEmbedList(EmbeddedList):
return ((1,0),(1,1),(1,2)) return ((1,0),(1,1),(1,2))
def add_button_clicked(self,obj): def add_button_clicked(self,obj):
import EditUrl from Editors import EditUrl
url = RelLib.Url() url = RelLib.Url()
try: try:
EditUrl.EditUrl(self.dbstate, self.uistate, self.track, EditUrl(self.dbstate, self.uistate, self.track,
'', url, self.add_callback) '', url, self.add_callback)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -941,10 +941,10 @@ class WebEmbedList(EmbeddedList):
def edit_button_clicked(self,obj): def edit_button_clicked(self,obj):
url = self.get_selected() url = self.get_selected()
if url: if url:
import EditUrl from Editors import EditUrl
try: try:
EditUrl.EditUrl(self.dbstate, self.uistate, self.track, EditUrl(self.dbstate, self.uistate, self.track,
'', url, self.edit_callback) '', url, self.edit_callback)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -978,11 +978,11 @@ class NameEmbedList(EmbeddedList):
return ((1,0),(1,1)) return ((1,0),(1,1))
def add_button_clicked(self,obj): def add_button_clicked(self,obj):
import EditName from Editors import EditName
name = RelLib.Name() name = RelLib.Name()
try: try:
EditName.EditName(self.dbstate, self.uistate, self.track, EditName(self.dbstate, self.uistate, self.track,
name, self.add_callback) name, self.add_callback)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -993,10 +993,10 @@ class NameEmbedList(EmbeddedList):
def edit_button_clicked(self,obj): def edit_button_clicked(self,obj):
name = self.get_selected() name = self.get_selected()
if name: if name:
import EditName from Editors import EditName
try: try:
EditName.EditName(self.dbstate, self.uistate, self.track, EditName(self.dbstate, self.uistate, self.track,
name, self.edit_callback) name, self.edit_callback)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -1033,11 +1033,11 @@ class AddrEmbedList(EmbeddedList):
return ((1,0),(1,1),(1,2),(1,3),(1,4)) return ((1,0),(1,1),(1,2),(1,3),(1,4))
def add_button_clicked(self,obj): def add_button_clicked(self,obj):
import EditAddress from Editors import EditAddress
addr = RelLib.Address() addr = RelLib.Address()
try: try:
EditAddress.EditAddress(self.dbstate, self.uistate, self.track, EditAddress(self.dbstate, self.uistate, self.track,
addr, self.add_callback) addr, self.add_callback)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -1048,10 +1048,10 @@ class AddrEmbedList(EmbeddedList):
def edit_button_clicked(self,obj): def edit_button_clicked(self,obj):
addr = self.get_selected() addr = self.get_selected()
if addr: if addr:
import EditAddress from Editors import EditAddress
try: try:
EditAddress.EditAddress(self.dbstate, self.uistate, self.track, EditAddress(self.dbstate, self.uistate, self.track,
addr, self.edit_callback) addr, self.edit_callback)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -1088,11 +1088,11 @@ class LocationEmbedList(EmbeddedList):
return ((1,0),(1,1),(1,2),(1,3),(1,4)) return ((1,0),(1,1),(1,2),(1,3),(1,4))
def add_button_clicked(self,obj): def add_button_clicked(self,obj):
import EditLocation from Editors import EditLocation
loc = RelLib.Location() loc = RelLib.Location()
try: try:
EditLocation.EditLocation(self.dbstate, self.uistate, self.track, EditLocation(self.dbstate, self.uistate, self.track,
loc, self.add_callback) loc, self.add_callback)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -1103,10 +1103,10 @@ class LocationEmbedList(EmbeddedList):
def edit_button_clicked(self,obj): def edit_button_clicked(self,obj):
loc = self.get_selected() loc = self.get_selected()
if loc: if loc:
import EditLocation from Editors import EditLocation
try: try:
EditLocation.EditLocation(self.dbstate, self.uistate, self.track, EditLocation(self.dbstate, self.uistate, self.track,
loc, self.edit_callback) loc, self.edit_callback)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -1294,7 +1294,7 @@ class GalleryTab(ButtonTab):
return None return None
def add_button_clicked(self,obj): def add_button_clicked(self,obj):
from EditMediaRef import EditMediaRef from Editors import EditMediaRef
sref = RelLib.MediaRef() sref = RelLib.MediaRef()
src = RelLib.MediaObject() src = RelLib.MediaObject()
@ -1318,7 +1318,7 @@ class GalleryTab(ButtonTab):
def edit_button_clicked(self,obj): def edit_button_clicked(self,obj):
ref = self.get_selected() ref = self.get_selected()
if ref: if ref:
from EditMediaRef import EditMediaRef from Editors import EditMediaRef
obj = self.dbstate.db.get_object_from_handle(ref.get_reference_handle()) obj = self.dbstate.db.get_object_from_handle(ref.get_reference_handle())
try: try:
@ -1363,7 +1363,7 @@ class SourceEmbedList(EmbeddedList):
return ((1,0),(1,1),(1,2),(1,3)) return ((1,0),(1,1),(1,2),(1,3))
def add_button_clicked(self,obj): def add_button_clicked(self,obj):
from EditSourceRef import EditSourceRef from Editors import EditSourceRef
sref = RelLib.SourceRef() sref = RelLib.SourceRef()
src = RelLib.Source() src = RelLib.Source()
@ -1379,7 +1379,7 @@ class SourceEmbedList(EmbeddedList):
self.rebuild() self.rebuild()
def edit_button_clicked(self,obj): def edit_button_clicked(self,obj):
from EditSourceRef import EditSourceRef from Editors import EditSourceRef
sref = self.get_selected() sref = self.get_selected()
src = self.dbstate.db.get_source_from_handle(sref.ref) src = self.dbstate.db.get_source_from_handle(sref.ref)
@ -1426,13 +1426,14 @@ class RepoEmbedList(EmbeddedList):
return ((1,0),(1,1),(1,2),(1,3)) return ((1,0),(1,1),(1,2),(1,3))
def add_button_clicked(self,obj): def add_button_clicked(self,obj):
from EditRepositoryRef import EditRepositoryRef from Editors import EditRepositoryRef
ref = RelLib.RepoRef() ref = RelLib.RepoRef()
repo = RelLib.Repository() repo = RelLib.Repository()
try: try:
EditRepositoryRef( EditRepositoryRef(
self.dbstate, self.uistate, self.track, repo, ref, self.add_callback) self.dbstate, self.uistate, self.track,
repo, ref, self.add_callback)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -1443,13 +1444,13 @@ class RepoEmbedList(EmbeddedList):
self.rebuild() self.rebuild()
def edit_button_clicked(self,obj): def edit_button_clicked(self,obj):
from EditRepositoryRef import EditRepositoryRef from Editors import EditRepositoryRef
ref = self.get_selected() ref = self.get_selected()
if ref: if ref:
repo = self.dbstate.db.get_repository_from_handle(ref.ref) repo = self.dbstate.db.get_repository_from_handle(ref.ref)
try: try:
EditRepositoryRef.EditRepositoryRef( Editors.EditRepositoryRef(
self.dbstate, self.uistate, self.track, repo, self.dbstate, self.uistate, self.track, repo,
ref, self.edit_callback) ref, self.edit_callback)
except Errors.WindowActiveError: except Errors.WindowActiveError:

View File

@ -34,11 +34,11 @@ import gtk.gdk
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import RelLib import RelLib
import PageView import PageView
import EditEvent
import DisplayModels import DisplayModels
import const import const
import Utils import Utils
from QuestionDialog import QuestionDialog, ErrorDialog from QuestionDialog import QuestionDialog, ErrorDialog
from Editors import EditEvent, DelEventQuery
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -115,13 +115,13 @@ class EventView(PageView.ListView):
handle = self.first_selected() handle = self.first_selected()
the_event = self.dbstate.db.get_event_from_handle(handle) the_event = self.dbstate.db.get_event_from_handle(handle)
try: try:
EditEvent.EditEvent(the_event,self.dbstate, self.uistate, []) EditEvent(the_event,self.dbstate, self.uistate, [])
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
def add(self,obj): def add(self,obj):
try: try:
EditEvent.EditEvent(RelLib.Event(),self.dbstate, self.uistate, []) EditEvent(RelLib.Event(),self.dbstate, self.uistate, [])
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -137,8 +137,8 @@ class EventView(PageView.ListView):
event = db.get_event_from_handle(event_handle) event = db.get_event_from_handle(event_handle)
ans = EditEvent.DelEventQuery(event,db, ans = DelEventQuery(event,db,
person_list,family_list) person_list,family_list)
if len(person_list) + len(family_list) > 0: if len(person_list) + len(family_list) > 0:
msg = _('This event is currently being used. Deleting it ' msg = _('This event is currently being used. Deleting it '
@ -162,7 +162,7 @@ class EventView(PageView.ListView):
for handle in mlist: for handle in mlist:
event = self.dbstate.db.get_event_from_handle(handle) event = self.dbstate.db.get_event_from_handle(handle)
try: try:
EditEvent.EditEvent(event, self.dbstate, self.uistate) EditEvent(event, self.dbstate, self.uistate)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass

View File

@ -113,10 +113,10 @@ class FamilyListView(PageView.ListView):
return return
def add(self,obj): def add(self,obj):
import EditFamily from Editors import EditFamily
family = RelLib.Family() family = RelLib.Family()
try: try:
EditFamily.EditFamily(self.dbstate,self.uistate,[],family) EditFamily(self.dbstate,self.uistate,[],family)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -128,9 +128,9 @@ class FamilyListView(PageView.ListView):
self.selection.selected_foreach(self.blist,mlist) self.selection.selected_foreach(self.blist,mlist)
for handle in mlist: for handle in mlist:
import EditFamily from Editors import EditFamily
family = self.dbstate.db.get_family_from_handle(handle) family = self.dbstate.db.get_family_from_handle(handle)
try: try:
EditFamily.EditFamily(self.dbstate,self.uistate,[],family) EditFamily(self.dbstate,self.uistate,[],family)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass

View File

@ -557,36 +557,36 @@ class FamilyView(PageView.PersonNavView):
def edit_button_press(self, obj, event, handle): def edit_button_press(self, obj, event, handle):
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1: if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
import EditPerson from Editors import EditPerson
person = self.dbstate.db.get_person_from_handle(handle) person = self.dbstate.db.get_person_from_handle(handle)
try: try:
EditPerson.EditPerson(self.dbstate, self.uistate, [], person) EditPerson(self.dbstate, self.uistate, [], person)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
def edit_person(self,obj,handle): def edit_person(self,obj,handle):
import EditPerson from Editors import EditPerson
person = self.dbstate.db.get_person_from_handle(handle) person = self.dbstate.db.get_person_from_handle(handle)
try: try:
EditPerson.EditPerson(self.dbstate, self.uistate, [], person) EditPerson(self.dbstate, self.uistate, [], person)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
def edit_family(self,obj,event,handle): def edit_family(self,obj,event,handle):
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1: if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
import EditFamily from Editors import EditFamily
family = self.dbstate.db.get_family_from_handle(handle) family = self.dbstate.db.get_family_from_handle(handle)
try: try:
EditFamily.EditFamily(self.dbstate,self.uistate,[],family) EditFamily(self.dbstate,self.uistate,[],family)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
def add_family(self,obj,event,handle): def add_family(self,obj,event,handle):
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1: if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
import EditFamily from Editors import EditFamily
family = RelLib.Family() family = RelLib.Family()
try: try:
EditFamily.EditFamily(self.dbstate,self.uistate,[],family) EditFamily(self.dbstate,self.uistate,[],family)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass

View File

@ -1,7 +1,21 @@
# $Id$ # $Id$
# This is the src level Makefile for Gramps # This is the src level Makefile for Gramps
SUBDIRS = docgen plugins dates data po GrampsDb RelLib ObjectSelector GrampsLogger TreeViews Config Mime images SUBDIRS = \
docgen \
plugins \
dates \
data \
po \
GrampsDb \
RelLib \
ObjectSelector \
GrampsLogger \
TreeViews \
Config \
Mime \
images \
Editors
# For intl. support, how do we compile? # For intl. support, how do we compile?
MOSTLYCLEANFILES = MOSTLYCLEANFILES =

View File

@ -170,8 +170,8 @@ class MediaView(PageView.ListView):
return return
obj = self.dbstate.db.get_object_from_handle(handle) obj = self.dbstate.db.get_object_from_handle(handle)
import EditMedia from Editors import EditMedia
EditMedia.EditMedia(self.dbstate,self.uistate, [], obj) EditMedia(self.dbstate,self.uistate, [], obj)
class DeleteMediaQuery: class DeleteMediaQuery:

View File

@ -28,7 +28,7 @@ import gtk
import gobject import gobject
from RelLib import Person from RelLib import Person
from EditPerson import EditPerson from Editors import EditPerson
from NameDisplay import displayer from NameDisplay import displayer
display_name = displayer.display display_name = displayer.display

View File

@ -49,13 +49,13 @@ except:
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import RelLib import RelLib
import PageView import PageView
import EditPerson
import Relationship import Relationship
import NameDisplay import NameDisplay
import Utils import Utils
import DateHandler import DateHandler
import ImgManip import ImgManip
import ReportUtils import ReportUtils
from Editors import EditPerson
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -909,8 +909,8 @@ class PedView(PageView.PersonNavView):
person = self.db.get_person_from_handle(person_handle) person = self.db.get_person_from_handle(person_handle)
if person: if person:
try: try:
EditPerson.EditPerson(self.dbstate, self.uistate, [], person, EditPerson(self.dbstate, self.uistate, [], person,
self.person_edited_cb) self.person_edited_cb)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
return True return True
@ -934,8 +934,8 @@ class PedView(PageView.PersonNavView):
person = self.db.get_person_from_handle(person_handle) person = self.db.get_person_from_handle(person_handle)
if person: if person:
try: try:
EditPerson.EditPerson(self.dbstate, self.uistate, [], person, EditPerson(self.dbstate, self.uistate, [], person,
self.person_edited_cb) self.person_edited_cb)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass

View File

@ -48,12 +48,12 @@ import RelLib
import PeopleModel import PeopleModel
import PageView import PageView
import GenericFilter import GenericFilter
import EditPerson
import NameDisplay import NameDisplay
import Utils import Utils
import QuestionDialog import QuestionDialog
import TreeTips import TreeTips
import Errors import Errors
from Editors import EditPerson
from DdTargets import DdTargets from DdTargets import DdTargets
@ -351,15 +351,15 @@ class PersonView(PageView.PersonNavView):
def add(self,obj): def add(self,obj):
person = RelLib.Person() person = RelLib.Person()
try: try:
EditPerson.EditPerson(self.dbstate, self.uistate, [], person) EditPerson(self.dbstate, self.uistate, [], person)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
def edit(self,obj): def edit(self,obj):
if self.dbstate.active: if self.dbstate.active:
try: try:
EditPerson.EditPerson(self.dbstate, self.uistate, [], EditPerson(self.dbstate, self.uistate, [],
self.dbstate.active) self.dbstate.active)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -616,7 +616,7 @@ class PersonView(PageView.PersonNavView):
person = self.dbstate.db.get_person_from_handle(handle) person = self.dbstate.db.get_person_from_handle(handle)
if person: if person:
try: try:
EditPerson.EditPerson(self.dbstate, self.uistate, [], person) EditPerson(self.dbstate, self.uistate, [], person)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
return True return True

View File

@ -34,11 +34,11 @@ import gtk.gdk
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import RelLib import RelLib
import PageView import PageView
import EditPlace
import DisplayModels import DisplayModels
import const import const
import Utils import Utils
import Errors import Errors
from Editors import EditPlace, DeletePlaceQuery
from QuestionDialog import QuestionDialog, ErrorDialog from QuestionDialog import QuestionDialog, ErrorDialog
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -120,13 +120,13 @@ class PlaceView(PageView.ListView):
handle = self.first_selected() handle = self.first_selected()
place = self.dbstate.db.get_place_from_handle(handle) place = self.dbstate.db.get_place_from_handle(handle)
try: try:
EditPlace.EditPlace(self.dbstate,self.uistate,[],place) EditPlace(self.dbstate,self.uistate,[],place)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
def add(self,obj): def add(self,obj):
try: try:
EditPlace.EditPlace(self.dbstate,self.uistate,[],RelLib.Place()) EditPlace(self.dbstate,self.uistate,[],RelLib.Place())
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass
@ -142,8 +142,8 @@ class PlaceView(PageView.ListView):
event = db.get_event_from_handle(event_handle) event = db.get_event_from_handle(event_handle)
ans = EditPlace.DelPlaceQuery(event,db, ans = DeletePlaceQuery(event,db,
person_list,family_list) person_list,family_list)
if len(person_list) + len(family_list) > 0: if len(person_list) + len(family_list) > 0:
msg = _('This place is currently being used. Deleting it ' msg = _('This place is currently being used. Deleting it '
@ -167,7 +167,7 @@ class PlaceView(PageView.ListView):
for handle in mlist: for handle in mlist:
place = self.dbstate.db.get_place_from_handle(handle) place = self.dbstate.db.get_place_from_handle(handle)
try: try:
EditPlace.EditPlace(self.dbstate,self.uistate,[],place) EditPlace(self.dbstate,self.uistate,[],place)
except Errors.WindowActiveError: except Errors.WindowActiveError:
pass pass

View File

@ -34,10 +34,10 @@ import gtk.gdk
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import RelLib import RelLib
import PageView import PageView
import EditRepository
import DisplayModels import DisplayModels
import const import const
import Utils import Utils
from Editors import EditRepository, DelRepositoryQuery
from QuestionDialog import QuestionDialog, ErrorDialog from QuestionDialog import QuestionDialog, ErrorDialog
@ -122,10 +122,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)
EditRepository.EditRepository(self.dbstate, self.uistate,[],repos) EditRepository(self.dbstate, self.uistate,[],repos)
def add(self,obj): def add(self,obj):
EditRepository.EditRepository(self.dbstate, self.uistate,[],RelLib.Repository()) EditRepository(self.dbstate, self.uistate,[],RelLib.Repository())
def remove(self,obj): def remove(self,obj):
db = self.dbstate.db db = self.dbstate.db
@ -140,7 +140,7 @@ class RepositoryView(PageView.ListView):
repository = db.get_repository_from_handle(repos_handle) repository = db.get_repository_from_handle(repos_handle)
ans = EditRepository.DelRepositoryQuery(repository,db,source_list) ans = DelRepositoryQuery(repository,db,source_list)
if len(source_list) > 0: if len(source_list) > 0:
msg = _('This repository is currently being used. Deleting it ' msg = _('This repository is currently being used. Deleting it '
@ -160,5 +160,5 @@ 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)
EditRepository.EditRepository(self.dbstate, self.uistate, [], repos) EditRepository(self.dbstate, self.uistate, [], repos)

View File

@ -34,10 +34,11 @@ import gtk.gdk
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import RelLib import RelLib
import PageView import PageView
import EditSource
import DisplayModels import DisplayModels
import const import const
import Utils import Utils
from Editors import EditSource, DelSrcQuery
from QuestionDialog import QuestionDialog, ErrorDialog from QuestionDialog import QuestionDialog, ErrorDialog
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -113,10 +114,10 @@ class SourceView(PageView.ListView):
def on_double_click(self,obj,event): def on_double_click(self,obj,event):
handle = self.first_selected() handle = self.first_selected()
source = self.dbstate.db.get_source_from_handle(handle) source = self.dbstate.db.get_source_from_handle(handle)
EditSource.EditSource(self.dbstate, self.uistate, [], source) EditSource(self.dbstate, self.uistate, [], source)
def add(self,obj): def add(self,obj):
EditSource.EditSource(self.dbstate, self.uistate, [], RelLib.Source()) EditSource(self.dbstate, self.uistate, [], RelLib.Source())
def remove(self,obj): def remove(self,obj):
for source_handle in self.selected_handles(): for source_handle in self.selected_handles():
@ -125,7 +126,7 @@ class SourceView(PageView.ListView):
source = db.get_source_from_handle(source_handle) source = db.get_source_from_handle(source_handle)
ans = EditSource.DelSrcQuery(source,db,the_lists) ans = DelSrcQuery(source,db,the_lists)
if filter(None,the_lists): # quick test for non-emptiness if filter(None,the_lists): # quick test for non-emptiness
msg = _('This source is currently being used. Deleting it ' msg = _('This source is currently being used. Deleting it '
@ -148,5 +149,5 @@ class SourceView(PageView.ListView):
for handle in mlist: for handle in mlist:
source = self.dbstate.db.get_source_from_handle(handle) source = self.dbstate.db.get_source_from_handle(handle)
EditSource.EditSource(self.dbstate, self.uistate, [], source) EditSource(self.dbstate, self.uistate, [], source)