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/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 <shura@gramps-project.org>
* src/plugins/stock_link.png: Remove (already present in

View File

@ -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

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))
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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 =

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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)