diff --git a/ChangeLog b/ChangeLog index ea0f40f71..716f6c114 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2006-05-20 Don Allingham + * src/Editors/_EditPlace.py: custom menus + * src/Editors/_EditLdsOrd.py: custom menus + * src/Editors/_EditSourceRef.py: custom menus + * src/Editors/_EditSource.py: custom menus + * src/Editors/_EditRepoRef.py: custom menus + * src/Editors/_EditUrl.py: custom menus + * src/Editors/_EditAttribute.py: custom menus + * src/Editors/_EditPerson.py: custom menus + * src/Editors/_EditLocation.py: custom menus + * src/Editors/_EditMediaRef.py: custom menus + * src/Editors/_EditEventRef.py: custom menus + * src/Editors/_EditMedia.py: custom menus + * src/Editors/_EditRepository.py: custom menus + * src/Editors/_EditName.py: custom menus + * src/Editors/_EditChildRef.py: custom menus + * src/Editors/_EditFamily.py: custom menus + * src/Editors/_EditEvent.py: custom menus + 2006-05-20 Alex Roitman * src/GrampsDb/_WriteGedcom.py (write_repos): Add method. * src/gramps_main.py (Gramps.__init__): Call ArgHandler between diff --git a/src/Editors/_EditAttribute.py b/src/Editors/_EditAttribute.py index 461347cae..34e1085fc 100644 --- a/src/Editors/_EditAttribute.py +++ b/src/Editors/_EditAttribute.py @@ -48,7 +48,6 @@ import gtk.glade # #------------------------------------------------------------------------- import const -import Utils import RelLib import GrampsDisplay from _EditSecondary import EditSecondary @@ -102,6 +101,8 @@ class EditAttribute(EditSecondary): self.top.get_widget("attr_menu"), self.obj.set_type, self.obj.get_type, + self.db.readonly, + custom_values=self.alist ) def _create_tabbed_pages(self): diff --git a/src/Editors/_EditChildRef.py b/src/Editors/_EditChildRef.py index 87662fba7..effaccfb6 100644 --- a/src/Editors/_EditChildRef.py +++ b/src/Editors/_EditChildRef.py @@ -82,12 +82,16 @@ class EditChildRef(EditSecondary): self.top.get_widget('frel'), self.obj.set_father_relation, self.obj.get_father_relation, + self.db.readonly, + self.db.get_child_reference_types() ) self.mrel = MonitoredDataType( self.top.get_widget('mrel'), self.obj.set_mother_relation, self.obj.get_mother_relation, + self.db.readonly, + self.db.get_child_reference_types() ) self.priv = PrivacyButton( diff --git a/src/Editors/_EditEvent.py b/src/Editors/_EditEvent.py index abdf812c6..84ed257c2 100644 --- a/src/Editors/_EditEvent.py +++ b/src/Editors/_EditEvent.py @@ -46,7 +46,6 @@ import gtk.glade # #------------------------------------------------------------------------- import const -import Utils import AutoComp import RelLib import GrampsDisplay @@ -105,10 +104,6 @@ class EditEvent(EditPrimary): ok.set_sensitive(not self.db.readonly) ok.connect('clicked',self.save) - def get_custom_events(self): - return self.dbstate.db.get_person_event_type_list() + \ - self.dbstate.db.get_family_event_types() - def _setup_fields(self): # place, select_place, add_del_place diff --git a/src/Editors/_EditEventRef.py b/src/Editors/_EditEventRef.py index cb1d5632c..f9fb88787 100644 --- a/src/Editors/_EditEventRef.py +++ b/src/Editors/_EditEventRef.py @@ -46,7 +46,6 @@ import gtk.glade # #------------------------------------------------------------------------- import const -import Utils import RelLib from DisplayTabs import SourceEmbedList,NoteTab,GalleryTab,EventBackRefList @@ -134,6 +133,8 @@ class EditEventRef(EditReference): self.top.get_widget('eer_role_combo'), self.source_ref.set_role, self.source_ref.get_role, + self.db.readonly, + self.db.get_event_roles() ) self.event_menu = MonitoredDataType( diff --git a/src/Editors/_EditFamily.py b/src/Editors/_EditFamily.py index 25c55841b..8cc386b23 100644 --- a/src/Editors/_EditFamily.py +++ b/src/Editors/_EditFamily.py @@ -25,7 +25,6 @@ # python modules # #------------------------------------------------------------------------- -import cPickle as pickle from gettext import gettext as _ #------------------------------------------------------------------------- @@ -429,12 +428,16 @@ class EditFamily(EditPrimary): self.top.get_widget('marker'), self.obj.set_marker, self.obj.get_marker, - self.db.readonly) + self.db.readonly, + self.db.get_marker_types(), + ) self.data_type = MonitoredDataType( self.top.get_widget('marriage_type'), self.obj.set_relationship, self.obj.get_relationship, + self.db.readonly, + self.db.get_marker_types(), ) def load_data(self): diff --git a/src/Editors/_EditLdsOrd.py b/src/Editors/_EditLdsOrd.py index a29e8fcce..ec8a39277 100644 --- a/src/Editors/_EditLdsOrd.py +++ b/src/Editors/_EditLdsOrd.py @@ -48,7 +48,6 @@ import gtk.glade # #------------------------------------------------------------------------- import const -import Utils import RelLib import GrampsDisplay import NameDisplay diff --git a/src/Editors/_EditLocation.py b/src/Editors/_EditLocation.py index 0ba7c4f7e..3bea4da03 100644 --- a/src/Editors/_EditLocation.py +++ b/src/Editors/_EditLocation.py @@ -34,7 +34,6 @@ import gtk.glade # #------------------------------------------------------------------------- import const -import Utils from _EditSecondary import EditSecondary from GrampsWidgets import * diff --git a/src/Editors/_EditMedia.py b/src/Editors/_EditMedia.py index 5c1f90159..feb23f727 100644 --- a/src/Editors/_EditMedia.py +++ b/src/Editors/_EditMedia.py @@ -43,7 +43,6 @@ import gtk.glade # #------------------------------------------------------------------------- import const -import Utils import RelLib import Mime import ImgManip diff --git a/src/Editors/_EditMediaRef.py b/src/Editors/_EditMediaRef.py index a5f65ecdc..5cc0f1771 100644 --- a/src/Editors/_EditMediaRef.py +++ b/src/Editors/_EditMediaRef.py @@ -42,7 +42,6 @@ import gtk.glade # #------------------------------------------------------------------------- import const -import Utils import RelLib import Mime import ImgManip diff --git a/src/Editors/_EditName.py b/src/Editors/_EditName.py index fbf84aff8..f947ebf25 100644 --- a/src/Editors/_EditName.py +++ b/src/Editors/_EditName.py @@ -168,6 +168,8 @@ class EditName(EditSecondary): self.top.get_widget("name_type"), self.obj.set_type, self.obj.get_type, + self.db.readonly, + self.db.get_name_types(), ) self.privacy = PrivacyButton( diff --git a/src/Editors/_EditPerson.py b/src/Editors/_EditPerson.py index 3d93d35cd..f69d9e069 100644 --- a/src/Editors/_EditPerson.py +++ b/src/Editors/_EditPerson.py @@ -187,13 +187,16 @@ class EditPerson(EditPrimary): self.top.get_widget("ntype"), self.pname.set_type, self.pname.get_type, - self.db.readonly) + self.db.readonly, + self.db.get_name_types()) self.marker = GrampsWidgets.MonitoredDataType( self.top.get_widget('marker'), self.obj.set_marker, self.obj.get_marker, - self.db.readonly) + self.db.readonly, + self.db.get_marker_types(), + ) if self.use_patronymic: self.prefix = GrampsWidgets.MonitoredEntry( diff --git a/src/Editors/_EditPlace.py b/src/Editors/_EditPlace.py index b4b5cf083..48de124f3 100644 --- a/src/Editors/_EditPlace.py +++ b/src/Editors/_EditPlace.py @@ -25,7 +25,6 @@ # python modules # #------------------------------------------------------------------------- -import cPickle as pickle from gettext import gettext as _ import logging diff --git a/src/Editors/_EditRepoRef.py b/src/Editors/_EditRepoRef.py index ef1c2adc2..ed81430e6 100644 --- a/src/Editors/_EditRepoRef.py +++ b/src/Editors/_EditRepoRef.py @@ -46,7 +46,6 @@ import gtk.glade # #------------------------------------------------------------------------- import const -import Utils import RelLib from DisplayTabs import NoteTab,AddrEmbedList,WebEmbedList,SourceBackRefList @@ -99,13 +98,17 @@ class EditRepoRef(EditReference): self.type_selector = MonitoredDataType( self.top.get_widget("media_type"), self.source_ref.set_media_type, - self.source_ref.get_media_type + self.source_ref.get_media_type, + self.db.readonly, + self.db.get_source_media_types(), ) self.media_type_selector = MonitoredDataType( self.top.get_widget("repo_type"), self.source.set_type, - self.source.get_type + self.source.get_type, + self.db.readonly, + self.db.get_repository_types(), ) def _create_tabbed_pages(self): diff --git a/src/Editors/_EditRepository.py b/src/Editors/_EditRepository.py index 22c9d789b..8bfc0b7d0 100644 --- a/src/Editors/_EditRepository.py +++ b/src/Editors/_EditRepository.py @@ -41,7 +41,6 @@ import gtk.glade # #------------------------------------------------------------------------- import const -import Utils import RelLib from GrampsWidgets import * @@ -75,7 +74,9 @@ class EditRepository(EditPrimary): self.type = MonitoredDataType( self.glade.get_widget("repository_type"), self.obj.set_type, - self.obj.get_type + self.obj.get_type, + self.db.readonly, + self.db.get_repository_types(), ) self.call_number = MonitoredEntry( diff --git a/src/Editors/_EditSource.py b/src/Editors/_EditSource.py index 19bc49245..05d7d92a6 100644 --- a/src/Editors/_EditSource.py +++ b/src/Editors/_EditSource.py @@ -44,7 +44,6 @@ import gtk.glade # #------------------------------------------------------------------------- import const -import Utils import RelLib import NameDisplay import Spell diff --git a/src/Editors/_EditSourceRef.py b/src/Editors/_EditSourceRef.py index c85d3c0d1..e4c65a49a 100644 --- a/src/Editors/_EditSourceRef.py +++ b/src/Editors/_EditSourceRef.py @@ -46,7 +46,6 @@ import gtk.glade # #------------------------------------------------------------------------- import const -import Utils import RelLib from DisplayTabs import \ diff --git a/src/Editors/_EditUrl.py b/src/Editors/_EditUrl.py index dbd6e4195..2a9a1391e 100644 --- a/src/Editors/_EditUrl.py +++ b/src/Editors/_EditUrl.py @@ -41,7 +41,6 @@ import gtk.glade # #------------------------------------------------------------------------- import const -import Utils from _EditSecondary import EditSecondary from GrampsWidgets import *