From 58842b856728661bcd72e2921e272ea287362e05 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sat, 4 Mar 2006 05:24:16 +0000 Subject: [PATCH] create new Editors submodule svn: r6067 --- gramps2/ChangeLog | 27 ++++++ gramps2/configure.in | 1 + gramps2/example/gramps/O0.jpg | Bin 7053 -> 7053 bytes gramps2/example/gramps/O1.jpg | Bin 12309 -> 12310 bytes gramps2/example/gramps/O2.jpg | Bin 5318 -> 5318 bytes gramps2/example/gramps/O3.jpg | Bin 7260 -> 7260 bytes gramps2/example/gramps/O4.jpg | Bin 12665 -> 12665 bytes gramps2/example/gramps/O5.jpg | Bin 10451 -> 10451 bytes gramps2/src/DisplayTabs.py | 99 ++++++++++---------- gramps2/src/{ => Editors}/EditAddress.py | 0 gramps2/src/{ => Editors}/EditAttribute.py | 0 gramps2/src/{ => Editors}/EditEvent.py | 0 gramps2/src/{ => Editors}/EditEventRef.py | 0 gramps2/src/{ => Editors}/EditFamily.py | 0 gramps2/src/{ => Editors}/EditLocation.py | 0 gramps2/src/{ => Editors}/EditMedia.py | 0 gramps2/src/{ => Editors}/EditMediaRef.py | 0 gramps2/src/{ => Editors}/EditName.py | 0 gramps2/src/{ => Editors}/EditPerson.py | 0 gramps2/src/{ => Editors}/EditPlace.py | 0 gramps2/src/{ => Editors}/EditPrimary.py | 0 gramps2/src/{ => Editors}/EditRepository.py | 0 gramps2/src/{ => Editors}/EditSecondary.py | 0 gramps2/src/{ => Editors}/EditSource.py | 0 gramps2/src/{ => Editors}/EditSourceRef.py | 0 gramps2/src/{ => Editors}/EditUrl.py | 0 gramps2/src/EventView.py | 12 +-- gramps2/src/FamilyList.py | 8 +- gramps2/src/FamilyView.py | 16 ++-- gramps2/src/Makefile.am | 16 +++- gramps2/src/MediaView.py | 4 +- gramps2/src/ObjectSelector/_PersonFrame.py | 2 +- gramps2/src/PedView.py | 10 +- gramps2/src/PersonView.py | 10 +- gramps2/src/PlaceView.py | 12 +-- gramps2/src/RepositoryView.py | 10 +- gramps2/src/SourceView.py | 11 ++- 37 files changed, 141 insertions(+), 97 deletions(-) rename gramps2/src/{ => Editors}/EditAddress.py (100%) rename gramps2/src/{ => Editors}/EditAttribute.py (100%) rename gramps2/src/{ => Editors}/EditEvent.py (100%) rename gramps2/src/{ => Editors}/EditEventRef.py (100%) rename gramps2/src/{ => Editors}/EditFamily.py (100%) rename gramps2/src/{ => Editors}/EditLocation.py (100%) rename gramps2/src/{ => Editors}/EditMedia.py (100%) rename gramps2/src/{ => Editors}/EditMediaRef.py (100%) rename gramps2/src/{ => Editors}/EditName.py (100%) rename gramps2/src/{ => Editors}/EditPerson.py (100%) rename gramps2/src/{ => Editors}/EditPlace.py (100%) rename gramps2/src/{ => Editors}/EditPrimary.py (100%) rename gramps2/src/{ => Editors}/EditRepository.py (100%) rename gramps2/src/{ => Editors}/EditSecondary.py (100%) rename gramps2/src/{ => Editors}/EditSource.py (100%) rename gramps2/src/{ => Editors}/EditSourceRef.py (100%) rename gramps2/src/{ => Editors}/EditUrl.py (100%) 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 ecce21da5cf52c8e4289f7fc449e4bad22366f34..e290cbfcfc206020c9a1b8050d63c9172c0c4c87 100644 GIT binary patch delta 265 zcmeA*?=_#G%*Z=Y#hQticVl7?BO~wRcZ^|-yqjH_q8Pb&HC_gB?Y;b^opm(xa_3vLe|CGGhAGNAngP@%X6P)Vq`1q%SCYgW<# delta 265 zcmeA*?=_#G%*ZuS#hQtWYhz*$BO}-3cZ^|-T$^2)q8PcjG+qXA?Y;b^oon(+W=Ejh zYvx{{TqVnYMj5U*Yu!$3nekbKJ<6`&l-Q(Dowq!NX=3m0TQj&OPhmR+R2|Qr3?vV; zn*hll?1n&6i(@NL{{xPVAd4n(T?dj`+%JG+Fpn9K?BW4QJMcz;q-XLi0CKGOb3mNs z0wC=-1rmUymEdC_DJK-q&$TUNQ`(hREE5*pzEoGtHMvJwI}Y(v80eNbcl603@pf(t+edf%!nCje;vdO0|W9fSfvE4UqQbBI`k7;bOi( za;exRpiqSPQ;?9IWDAgUSaLVe8Jp{6*g#@!vT8uiT3I!a*cEv%kO}gNfgq_uB@ZCE zOX&?zXt{C;NP&!6BuGJ-`U#K%d(Ac==a}X;W+10lHxo!c*S!uD+OH=BlE0+y3;<3I BM@awx delta 250 zcmbQ1Fg0PqcSf#_KiZiXxh6L-#{$WF%vOwCnwI}Y(v80eNbcl603@pf(kDL>m=9FgB)Af!P)9fj$f+0B0BK$!vK}NBA?6Dt zmx*lx3Pp-P1qsE(#WWd6_Ay5Q$>+>561;oX@}w}y zH?NqbF?(uwA$L`XlEj5R7T(FxEO&uQELqnw@@{_4s>uxG2y#XN$sA670ba3>LC2PH z&6`j$Z#n<{9^TEXIiE5C0<=QBtl3#?JfO^b@O+b2bM4|wt CYDSm< delta 225 zcmX@6c}#PHA|uyCrN4|^lNA^b0Lh1pWE(#WWd6_Ay5Q$>+>55?p)M@}w}y zH?NqbF?(uwA$L`XlEj5R7Ou(BEO&uQELqnwa&3Ojs>uxG2y#XN$sA670WPtRLC2PH z&6`j$Z#n<{90<=QBtl3#?JfO^b@O+b2bM4|wG C%|<~0 diff --git a/gramps2/example/gramps/O3.jpg b/gramps2/example/gramps/O3.jpg index fe1605a6bb4283bf2c25474812695c76f8109aa3..22f7bafabe8c61baf6e4755108c2b7baa21f9147 100644 GIT binary patch delta 144 zcmca(amQkUG&3(h??$;MMn>Mr3mFxFFwQYNfhfHIq3vUP!YC7j|w zYH|5-sj%~BB& delta 144 zcmca(amQkUG&2`J*G9P}MnFwQYNfhfHIq3vUP!YC7j|w zYH|5-sj%~Bp{fTeWy6UzRxz)ID2P8>H~KoGOs>R_+4O;K}=x6M-BBl}wPM zy40e83N}Ag=K@h5G$DPpocmgfK%6F>c|eY$t`$)Ep{fTeY|*UzRxz)ID2P8>H~KoGOs>R_+4O;K}=x6M-BBl}wPM zy40e83N}Ag=K@h5G$DPpocmgfK%6F>c|eY$t`$)E2}ttau@I9tBeJV zyqn#avY3FXHnJ!KIagUSf!a6Qv)y0@QW9J%KvD;JGJ&KvuNIID<1GP_r+HO?(jRz> zL3X9^&t~MEB;YQ@YkVw{-+hrtV6Kwg4q+R`M&8Yl0?HsIwSsa$a*p6EAZae-0wimM zG`M(AtoNBCu|=|+ck()+>p;Oa;b5S#w}jO|mNSa42Wj0XVG1OlOT++47fDqhnI-AW z$?Ix=Z?V7r72e6)BzFMC@})rXXQY6>-uzkW1W4l^nN(I@$FftrlhtIu0flAd^nk`r s_E9tflJ$zufn>VUOd!dq+zpiORW<|qb@LHbE0E^@Y7#(>g!*nq01g&jd;kCd delta 340 zcmcZ{csXzbHzOn0WFAH}AZg5~3nUX66GXTeco^Ay*wnZTp1gW&>2}ttau?U+tBeJV zT$|mPvY3FXHnJ!KIagUSf!a6Qv)y0@QW9J%KvD;JGJ&KvuNIID<1GP_r+HO?(jRz> zL3X9^&t~MBB;YQ@Wqd4>-+hrtV6Kwg4q+R`My}0~0?HsIwSsa$a*p6EAZae-0wimM zG`P4p;Oa;b5S#w}jO|mNSa42Wj0XVG1OlOT++47fDqhnI-AW z$>nN)Z?V7r6|TwKBzFMC@})rXXQY6>-uzkW1W4l^nN(IT$FfsglhtIu0flAd^nk`r s_E9tflJ$zufn>VUOd!dq+zpiORW<|qb@LHbE0E^@Y7#(>g!*nq0IhLd<^TWy 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)