diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 055f8aa8c..188b0866c 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -6,6 +6,33 @@ * src/EditEvent.py: renamed from EventEdit.py * src/images/Makefile.am: restore * 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 * src/plugins/stock_link.png: Remove (already present in diff --git a/gramps2/configure.in b/gramps2/configure.in index 1354a8723..38121f7e4 100644 --- a/gramps2/configure.in +++ b/gramps2/configure.in @@ -237,6 +237,7 @@ src/GrampsLogger/Makefile src/TreeViews/Makefile src/GrampsDb/Makefile src/docgen/Makefile +src/Editors/Makefile src/plugins/Makefile src/dates/Makefile src/data/Makefile diff --git a/gramps2/example/gramps/O0.jpg b/gramps2/example/gramps/O0.jpg index ecce21da5..e290cbfcf 100644 Binary files a/gramps2/example/gramps/O0.jpg and b/gramps2/example/gramps/O0.jpg differ diff --git a/gramps2/example/gramps/O1.jpg b/gramps2/example/gramps/O1.jpg index 6bcc902a4..4268acf48 100644 Binary files a/gramps2/example/gramps/O1.jpg and b/gramps2/example/gramps/O1.jpg differ diff --git a/gramps2/example/gramps/O2.jpg b/gramps2/example/gramps/O2.jpg index dfc47c69c..a653c983b 100644 Binary files a/gramps2/example/gramps/O2.jpg and b/gramps2/example/gramps/O2.jpg differ diff --git a/gramps2/example/gramps/O3.jpg b/gramps2/example/gramps/O3.jpg index fe1605a6b..22f7bafab 100644 Binary files a/gramps2/example/gramps/O3.jpg and b/gramps2/example/gramps/O3.jpg differ diff --git a/gramps2/example/gramps/O4.jpg b/gramps2/example/gramps/O4.jpg index 94d0151d7..b9144f420 100644 Binary files a/gramps2/example/gramps/O4.jpg and b/gramps2/example/gramps/O4.jpg differ diff --git a/gramps2/example/gramps/O5.jpg b/gramps2/example/gramps/O5.jpg index ce2d9ad2a..55e0cf3ac 100644 Binary files a/gramps2/example/gramps/O5.jpg and b/gramps2/example/gramps/O5.jpg differ diff --git a/gramps2/src/DisplayTabs.py b/gramps2/src/DisplayTabs.py index 01b1c3d68..c913515b2 100644 --- a/gramps2/src/DisplayTabs.py +++ b/gramps2/src/DisplayTabs.py @@ -593,7 +593,7 @@ class EventEmbedList(EmbeddedList): return ((1,0),(1,1),(1,2),(1,3),(1,4),(1,5)) def add_button_clicked(self,obj): - from EditEventRef import EditEventRef + from Editors import EditEventRef try: EditEventRef(self.dbstate,self.uistate,self.track, None, None, self.obj, self.event_added) @@ -601,7 +601,7 @@ class EventEmbedList(EmbeddedList): pass def share_button_clicked(self,obj): - from EditEventRef import EditEventRef + from Editors import EditEventRef import SelectEvent sel = SelectEvent.SelectEvent(self.dbstate.db,"Event Select") @@ -615,7 +615,7 @@ class EventEmbedList(EmbeddedList): def edit_button_clicked(self,obj): ref = self.get_selected() if ref: - from EditEventRef import EditEventRef + from Editors import EditEventRef event = self.dbstate.db.get_event_from_handle(ref.ref) try: EditEventRef(self.dbstate,self.uistate,self.track, @@ -723,42 +723,42 @@ class BackRefList(EmbeddedList): (reftype, ref) = self.find_node() if reftype == 'Person': try: - import EditPerson + from Editors import EditPerson 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: pass elif reftype == 'Family': try: - import EditFamily + from Editors import EditFamily 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: pass elif reftype == 'Source': try: - import EditFamily + from Editors import EditSource 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: pass elif reftype == 'Place': try: - import EditPlace + from Editors import EditPlace 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: pass elif reftype == 'Media': try: - import EditMedia + from Editors import EditMedia 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: pass @@ -866,11 +866,11 @@ class AttrEmbedList(EmbeddedList): return ((1,0),(1,1)) def add_button_clicked(self,obj): - import EditAttribute + from Editors import EditAttribute pname = '' attr_list = [] try: - EditAttribute.EditAttribute( + EditAttribute( self.dbstate, self.uistate, self.track, None, pname, attr_list, self.add_callback) except Errors.WindowActiveError: @@ -884,11 +884,11 @@ class AttrEmbedList(EmbeddedList): def edit_button_clicked(self,obj): attr = self.get_selected() if attr: - import EditAttribute + from Editors import EditAttribute pname = '' attr_list = [] try: - EditAttribute.EditAttribute( + EditAttribute( self.dbstate, self.uistate, self.track, attr, pname, attr_list, self.edit_callback) except Errors.WindowActiveError: @@ -926,11 +926,11 @@ class WebEmbedList(EmbeddedList): return ((1,0),(1,1),(1,2)) def add_button_clicked(self,obj): - import EditUrl + from Editors import EditUrl url = RelLib.Url() try: - EditUrl.EditUrl(self.dbstate, self.uistate, self.track, - '', url, self.add_callback) + EditUrl(self.dbstate, self.uistate, self.track, + '', url, self.add_callback) except Errors.WindowActiveError: pass @@ -941,10 +941,10 @@ class WebEmbedList(EmbeddedList): def edit_button_clicked(self,obj): url = self.get_selected() if url: - import EditUrl + from Editors import EditUrl try: - EditUrl.EditUrl(self.dbstate, self.uistate, self.track, - '', url, self.edit_callback) + EditUrl(self.dbstate, self.uistate, self.track, + '', url, self.edit_callback) except Errors.WindowActiveError: pass @@ -978,11 +978,11 @@ class NameEmbedList(EmbeddedList): return ((1,0),(1,1)) def add_button_clicked(self,obj): - import EditName + from Editors import EditName name = RelLib.Name() try: - EditName.EditName(self.dbstate, self.uistate, self.track, - name, self.add_callback) + EditName(self.dbstate, self.uistate, self.track, + name, self.add_callback) except Errors.WindowActiveError: pass @@ -993,10 +993,10 @@ class NameEmbedList(EmbeddedList): def edit_button_clicked(self,obj): name = self.get_selected() if name: - import EditName + from Editors import EditName try: - EditName.EditName(self.dbstate, self.uistate, self.track, - name, self.edit_callback) + EditName(self.dbstate, self.uistate, self.track, + name, self.edit_callback) except Errors.WindowActiveError: pass @@ -1033,11 +1033,11 @@ class AddrEmbedList(EmbeddedList): return ((1,0),(1,1),(1,2),(1,3),(1,4)) def add_button_clicked(self,obj): - import EditAddress + from Editors import EditAddress addr = RelLib.Address() try: - EditAddress.EditAddress(self.dbstate, self.uistate, self.track, - addr, self.add_callback) + EditAddress(self.dbstate, self.uistate, self.track, + addr, self.add_callback) except Errors.WindowActiveError: pass @@ -1048,10 +1048,10 @@ class AddrEmbedList(EmbeddedList): def edit_button_clicked(self,obj): addr = self.get_selected() if addr: - import EditAddress + from Editors import EditAddress try: - EditAddress.EditAddress(self.dbstate, self.uistate, self.track, - addr, self.edit_callback) + EditAddress(self.dbstate, self.uistate, self.track, + addr, self.edit_callback) except Errors.WindowActiveError: pass @@ -1088,11 +1088,11 @@ class LocationEmbedList(EmbeddedList): return ((1,0),(1,1),(1,2),(1,3),(1,4)) def add_button_clicked(self,obj): - import EditLocation + from Editors import EditLocation loc = RelLib.Location() try: - EditLocation.EditLocation(self.dbstate, self.uistate, self.track, - loc, self.add_callback) + EditLocation(self.dbstate, self.uistate, self.track, + loc, self.add_callback) except Errors.WindowActiveError: pass @@ -1103,10 +1103,10 @@ class LocationEmbedList(EmbeddedList): def edit_button_clicked(self,obj): loc = self.get_selected() if loc: - import EditLocation + from Editors import EditLocation try: - EditLocation.EditLocation(self.dbstate, self.uistate, self.track, - loc, self.edit_callback) + EditLocation(self.dbstate, self.uistate, self.track, + loc, self.edit_callback) except Errors.WindowActiveError: pass @@ -1294,7 +1294,7 @@ class GalleryTab(ButtonTab): return None def add_button_clicked(self,obj): - from EditMediaRef import EditMediaRef + from Editors import EditMediaRef sref = RelLib.MediaRef() src = RelLib.MediaObject() @@ -1318,7 +1318,7 @@ class GalleryTab(ButtonTab): def edit_button_clicked(self,obj): ref = self.get_selected() if ref: - from EditMediaRef import EditMediaRef + from Editors import EditMediaRef obj = self.dbstate.db.get_object_from_handle(ref.get_reference_handle()) try: @@ -1363,7 +1363,7 @@ class SourceEmbedList(EmbeddedList): return ((1,0),(1,1),(1,2),(1,3)) def add_button_clicked(self,obj): - from EditSourceRef import EditSourceRef + from Editors import EditSourceRef sref = RelLib.SourceRef() src = RelLib.Source() @@ -1379,7 +1379,7 @@ class SourceEmbedList(EmbeddedList): self.rebuild() def edit_button_clicked(self,obj): - from EditSourceRef import EditSourceRef + from Editors import EditSourceRef sref = self.get_selected() 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)) def add_button_clicked(self,obj): - from EditRepositoryRef import EditRepositoryRef + from Editors import EditRepositoryRef ref = RelLib.RepoRef() repo = RelLib.Repository() try: 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: pass @@ -1443,13 +1444,13 @@ class RepoEmbedList(EmbeddedList): self.rebuild() def edit_button_clicked(self,obj): - from EditRepositoryRef import EditRepositoryRef + from Editors import EditRepositoryRef ref = self.get_selected() if ref: repo = self.dbstate.db.get_repository_from_handle(ref.ref) try: - EditRepositoryRef.EditRepositoryRef( + Editors.EditRepositoryRef( self.dbstate, self.uistate, self.track, repo, ref, self.edit_callback) except Errors.WindowActiveError: diff --git a/gramps2/src/EditAddress.py b/gramps2/src/Editors/EditAddress.py similarity index 100% rename from gramps2/src/EditAddress.py rename to gramps2/src/Editors/EditAddress.py diff --git a/gramps2/src/EditAttribute.py b/gramps2/src/Editors/EditAttribute.py similarity index 100% rename from gramps2/src/EditAttribute.py rename to gramps2/src/Editors/EditAttribute.py diff --git a/gramps2/src/EditEvent.py b/gramps2/src/Editors/EditEvent.py similarity index 100% rename from gramps2/src/EditEvent.py rename to gramps2/src/Editors/EditEvent.py diff --git a/gramps2/src/EditEventRef.py b/gramps2/src/Editors/EditEventRef.py similarity index 100% rename from gramps2/src/EditEventRef.py rename to gramps2/src/Editors/EditEventRef.py diff --git a/gramps2/src/EditFamily.py b/gramps2/src/Editors/EditFamily.py similarity index 100% rename from gramps2/src/EditFamily.py rename to gramps2/src/Editors/EditFamily.py diff --git a/gramps2/src/EditLocation.py b/gramps2/src/Editors/EditLocation.py similarity index 100% rename from gramps2/src/EditLocation.py rename to gramps2/src/Editors/EditLocation.py diff --git a/gramps2/src/EditMedia.py b/gramps2/src/Editors/EditMedia.py similarity index 100% rename from gramps2/src/EditMedia.py rename to gramps2/src/Editors/EditMedia.py diff --git a/gramps2/src/EditMediaRef.py b/gramps2/src/Editors/EditMediaRef.py similarity index 100% rename from gramps2/src/EditMediaRef.py rename to gramps2/src/Editors/EditMediaRef.py diff --git a/gramps2/src/EditName.py b/gramps2/src/Editors/EditName.py similarity index 100% rename from gramps2/src/EditName.py rename to gramps2/src/Editors/EditName.py diff --git a/gramps2/src/EditPerson.py b/gramps2/src/Editors/EditPerson.py similarity index 100% rename from gramps2/src/EditPerson.py rename to gramps2/src/Editors/EditPerson.py diff --git a/gramps2/src/EditPlace.py b/gramps2/src/Editors/EditPlace.py similarity index 100% rename from gramps2/src/EditPlace.py rename to gramps2/src/Editors/EditPlace.py diff --git a/gramps2/src/EditPrimary.py b/gramps2/src/Editors/EditPrimary.py similarity index 100% rename from gramps2/src/EditPrimary.py rename to gramps2/src/Editors/EditPrimary.py diff --git a/gramps2/src/EditRepository.py b/gramps2/src/Editors/EditRepository.py similarity index 100% rename from gramps2/src/EditRepository.py rename to gramps2/src/Editors/EditRepository.py diff --git a/gramps2/src/EditSecondary.py b/gramps2/src/Editors/EditSecondary.py similarity index 100% rename from gramps2/src/EditSecondary.py rename to gramps2/src/Editors/EditSecondary.py diff --git a/gramps2/src/EditSource.py b/gramps2/src/Editors/EditSource.py similarity index 100% rename from gramps2/src/EditSource.py rename to gramps2/src/Editors/EditSource.py diff --git a/gramps2/src/EditSourceRef.py b/gramps2/src/Editors/EditSourceRef.py similarity index 100% rename from gramps2/src/EditSourceRef.py rename to gramps2/src/Editors/EditSourceRef.py diff --git a/gramps2/src/EditUrl.py b/gramps2/src/Editors/EditUrl.py similarity index 100% rename from gramps2/src/EditUrl.py rename to gramps2/src/Editors/EditUrl.py diff --git a/gramps2/src/EventView.py b/gramps2/src/EventView.py index 0f357be60..a92129346 100644 --- a/gramps2/src/EventView.py +++ b/gramps2/src/EventView.py @@ -34,11 +34,11 @@ import gtk.gdk #------------------------------------------------------------------------- import RelLib import PageView -import EditEvent import DisplayModels import const import Utils from QuestionDialog import QuestionDialog, ErrorDialog +from Editors import EditEvent, DelEventQuery #------------------------------------------------------------------------- # @@ -115,13 +115,13 @@ class EventView(PageView.ListView): handle = self.first_selected() the_event = self.dbstate.db.get_event_from_handle(handle) try: - EditEvent.EditEvent(the_event,self.dbstate, self.uistate, []) + EditEvent(the_event,self.dbstate, self.uistate, []) except Errors.WindowActiveError: pass def add(self,obj): try: - EditEvent.EditEvent(RelLib.Event(),self.dbstate, self.uistate, []) + EditEvent(RelLib.Event(),self.dbstate, self.uistate, []) except Errors.WindowActiveError: pass @@ -137,8 +137,8 @@ class EventView(PageView.ListView): event = db.get_event_from_handle(event_handle) - ans = EditEvent.DelEventQuery(event,db, - person_list,family_list) + ans = DelEventQuery(event,db, + person_list,family_list) if len(person_list) + len(family_list) > 0: msg = _('This event is currently being used. Deleting it ' @@ -162,7 +162,7 @@ class EventView(PageView.ListView): for handle in mlist: event = self.dbstate.db.get_event_from_handle(handle) try: - EditEvent.EditEvent(event, self.dbstate, self.uistate) + EditEvent(event, self.dbstate, self.uistate) except Errors.WindowActiveError: pass diff --git a/gramps2/src/FamilyList.py b/gramps2/src/FamilyList.py index fb2f04e67..fa11e5b88 100644 --- a/gramps2/src/FamilyList.py +++ b/gramps2/src/FamilyList.py @@ -113,10 +113,10 @@ class FamilyListView(PageView.ListView): return def add(self,obj): - import EditFamily + from Editors import EditFamily family = RelLib.Family() try: - EditFamily.EditFamily(self.dbstate,self.uistate,[],family) + EditFamily(self.dbstate,self.uistate,[],family) except Errors.WindowActiveError: pass @@ -128,9 +128,9 @@ class FamilyListView(PageView.ListView): self.selection.selected_foreach(self.blist,mlist) for handle in mlist: - import EditFamily + from Editors import EditFamily family = self.dbstate.db.get_family_from_handle(handle) try: - EditFamily.EditFamily(self.dbstate,self.uistate,[],family) + EditFamily(self.dbstate,self.uistate,[],family) except Errors.WindowActiveError: pass diff --git a/gramps2/src/FamilyView.py b/gramps2/src/FamilyView.py index 814b98aca..9cf56cf92 100644 --- a/gramps2/src/FamilyView.py +++ b/gramps2/src/FamilyView.py @@ -557,36 +557,36 @@ class FamilyView(PageView.PersonNavView): def edit_button_press(self, obj, event, handle): 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) try: - EditPerson.EditPerson(self.dbstate, self.uistate, [], person) + EditPerson(self.dbstate, self.uistate, [], person) except Errors.WindowActiveError: pass def edit_person(self,obj,handle): - import EditPerson + from Editors import EditPerson person = self.dbstate.db.get_person_from_handle(handle) try: - EditPerson.EditPerson(self.dbstate, self.uistate, [], person) + EditPerson(self.dbstate, self.uistate, [], person) except Errors.WindowActiveError: pass def edit_family(self,obj,event,handle): 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) try: - EditFamily.EditFamily(self.dbstate,self.uistate,[],family) + EditFamily(self.dbstate,self.uistate,[],family) except Errors.WindowActiveError: pass def add_family(self,obj,event,handle): if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1: - import EditFamily + from Editors import EditFamily family = RelLib.Family() try: - EditFamily.EditFamily(self.dbstate,self.uistate,[],family) + EditFamily(self.dbstate,self.uistate,[],family) except Errors.WindowActiveError: pass diff --git a/gramps2/src/Makefile.am b/gramps2/src/Makefile.am index 10b06725c..75aacc599 100644 --- a/gramps2/src/Makefile.am +++ b/gramps2/src/Makefile.am @@ -1,7 +1,21 @@ # $Id$ # 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? MOSTLYCLEANFILES = diff --git a/gramps2/src/MediaView.py b/gramps2/src/MediaView.py index 83a1660fc..6e040e782 100644 --- a/gramps2/src/MediaView.py +++ b/gramps2/src/MediaView.py @@ -170,8 +170,8 @@ class MediaView(PageView.ListView): return obj = self.dbstate.db.get_object_from_handle(handle) - import EditMedia - EditMedia.EditMedia(self.dbstate,self.uistate, [], obj) + from Editors import EditMedia + EditMedia(self.dbstate,self.uistate, [], obj) class DeleteMediaQuery: diff --git a/gramps2/src/ObjectSelector/_PersonFrame.py b/gramps2/src/ObjectSelector/_PersonFrame.py index 104884fdc..66bebec2d 100644 --- a/gramps2/src/ObjectSelector/_PersonFrame.py +++ b/gramps2/src/ObjectSelector/_PersonFrame.py @@ -28,7 +28,7 @@ import gtk import gobject from RelLib import Person -from EditPerson import EditPerson +from Editors import EditPerson from NameDisplay import displayer display_name = displayer.display diff --git a/gramps2/src/PedView.py b/gramps2/src/PedView.py index 63dfdfb49..2f049c903 100644 --- a/gramps2/src/PedView.py +++ b/gramps2/src/PedView.py @@ -49,13 +49,13 @@ except: #------------------------------------------------------------------------- import RelLib import PageView -import EditPerson import Relationship import NameDisplay import Utils import DateHandler import ImgManip import ReportUtils +from Editors import EditPerson #------------------------------------------------------------------------- # @@ -909,8 +909,8 @@ class PedView(PageView.PersonNavView): person = self.db.get_person_from_handle(person_handle) if person: try: - EditPerson.EditPerson(self.dbstate, self.uistate, [], person, - self.person_edited_cb) + EditPerson(self.dbstate, self.uistate, [], person, + self.person_edited_cb) except Errors.WindowActiveError: pass return True @@ -934,8 +934,8 @@ class PedView(PageView.PersonNavView): person = self.db.get_person_from_handle(person_handle) if person: try: - EditPerson.EditPerson(self.dbstate, self.uistate, [], person, - self.person_edited_cb) + EditPerson(self.dbstate, self.uistate, [], person, + self.person_edited_cb) except Errors.WindowActiveError: pass diff --git a/gramps2/src/PersonView.py b/gramps2/src/PersonView.py index 23dff14f9..45fb6e604 100644 --- a/gramps2/src/PersonView.py +++ b/gramps2/src/PersonView.py @@ -48,12 +48,12 @@ import RelLib import PeopleModel import PageView import GenericFilter -import EditPerson import NameDisplay import Utils import QuestionDialog import TreeTips import Errors +from Editors import EditPerson from DdTargets import DdTargets @@ -351,15 +351,15 @@ class PersonView(PageView.PersonNavView): def add(self,obj): person = RelLib.Person() try: - EditPerson.EditPerson(self.dbstate, self.uistate, [], person) + EditPerson(self.dbstate, self.uistate, [], person) except Errors.WindowActiveError: pass def edit(self,obj): if self.dbstate.active: try: - EditPerson.EditPerson(self.dbstate, self.uistate, [], - self.dbstate.active) + EditPerson(self.dbstate, self.uistate, [], + self.dbstate.active) except Errors.WindowActiveError: pass @@ -616,7 +616,7 @@ class PersonView(PageView.PersonNavView): person = self.dbstate.db.get_person_from_handle(handle) if person: try: - EditPerson.EditPerson(self.dbstate, self.uistate, [], person) + EditPerson(self.dbstate, self.uistate, [], person) except Errors.WindowActiveError: pass return True diff --git a/gramps2/src/PlaceView.py b/gramps2/src/PlaceView.py index f1795c998..3e9f2987a 100644 --- a/gramps2/src/PlaceView.py +++ b/gramps2/src/PlaceView.py @@ -34,11 +34,11 @@ import gtk.gdk #------------------------------------------------------------------------- import RelLib import PageView -import EditPlace import DisplayModels import const import Utils import Errors +from Editors import EditPlace, DeletePlaceQuery from QuestionDialog import QuestionDialog, ErrorDialog #------------------------------------------------------------------------- @@ -120,13 +120,13 @@ class PlaceView(PageView.ListView): handle = self.first_selected() place = self.dbstate.db.get_place_from_handle(handle) try: - EditPlace.EditPlace(self.dbstate,self.uistate,[],place) + EditPlace(self.dbstate,self.uistate,[],place) except Errors.WindowActiveError: pass def add(self,obj): try: - EditPlace.EditPlace(self.dbstate,self.uistate,[],RelLib.Place()) + EditPlace(self.dbstate,self.uistate,[],RelLib.Place()) except Errors.WindowActiveError: pass @@ -142,8 +142,8 @@ class PlaceView(PageView.ListView): event = db.get_event_from_handle(event_handle) - ans = EditPlace.DelPlaceQuery(event,db, - person_list,family_list) + ans = DeletePlaceQuery(event,db, + person_list,family_list) if len(person_list) + len(family_list) > 0: msg = _('This place is currently being used. Deleting it ' @@ -167,7 +167,7 @@ class PlaceView(PageView.ListView): for handle in mlist: place = self.dbstate.db.get_place_from_handle(handle) try: - EditPlace.EditPlace(self.dbstate,self.uistate,[],place) + EditPlace(self.dbstate,self.uistate,[],place) except Errors.WindowActiveError: pass diff --git a/gramps2/src/RepositoryView.py b/gramps2/src/RepositoryView.py index e443c4a33..61087c20a 100644 --- a/gramps2/src/RepositoryView.py +++ b/gramps2/src/RepositoryView.py @@ -34,10 +34,10 @@ import gtk.gdk #------------------------------------------------------------------------- import RelLib import PageView -import EditRepository import DisplayModels import const import Utils +from Editors import EditRepository, DelRepositoryQuery from QuestionDialog import QuestionDialog, ErrorDialog @@ -122,10 +122,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.EditRepository(self.dbstate, self.uistate,[],repos) + EditRepository(self.dbstate, self.uistate,[],repos) def add(self,obj): - EditRepository.EditRepository(self.dbstate, self.uistate,[],RelLib.Repository()) + EditRepository(self.dbstate, self.uistate,[],RelLib.Repository()) def remove(self,obj): db = self.dbstate.db @@ -140,7 +140,7 @@ class RepositoryView(PageView.ListView): 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: msg = _('This repository is currently being used. Deleting it ' @@ -160,5 +160,5 @@ class RepositoryView(PageView.ListView): for handle in mlist: repos = self.dbstate.db.get_repository_from_handle(handle) - EditRepository.EditRepository(self.dbstate, self.uistate, [], repos) + EditRepository(self.dbstate, self.uistate, [], repos) diff --git a/gramps2/src/SourceView.py b/gramps2/src/SourceView.py index 79b754aeb..0d799e674 100644 --- a/gramps2/src/SourceView.py +++ b/gramps2/src/SourceView.py @@ -34,10 +34,11 @@ import gtk.gdk #------------------------------------------------------------------------- import RelLib import PageView -import EditSource import DisplayModels import const import Utils +from Editors import EditSource, DelSrcQuery + from QuestionDialog import QuestionDialog, ErrorDialog #------------------------------------------------------------------------- @@ -113,10 +114,10 @@ class SourceView(PageView.ListView): def on_double_click(self,obj,event): handle = self.first_selected() 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): - EditSource.EditSource(self.dbstate, self.uistate, [], RelLib.Source()) + EditSource(self.dbstate, self.uistate, [], RelLib.Source()) def remove(self,obj): for source_handle in self.selected_handles(): @@ -125,7 +126,7 @@ class SourceView(PageView.ListView): 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 msg = _('This source is currently being used. Deleting it ' @@ -148,5 +149,5 @@ class SourceView(PageView.ListView): for handle in mlist: source = self.dbstate.db.get_source_from_handle(handle) - EditSource.EditSource(self.dbstate, self.uistate, [], source) + EditSource(self.dbstate, self.uistate, [], source)