svn: r7002
This commit is contained in:
Alex Roitman 2006-07-06 21:27:29 +00:00
parent 05caffe3ed
commit 712d0828e2
3 changed files with 22 additions and 17 deletions

View File

@ -97,8 +97,10 @@ class EditName(EditSecondary):
self.group_as.force_value(self.obj.get_surname()) self.group_as.force_value(self.obj.get_surname())
format_list = [(name,number) for (number,name,fmt_str) (number,name,fmt_str) =RelLib.Name.DEFAULT_FORMAT
in RelLib.Name.DEFAULT_FORMATS] format_list = [(name,number)]
format_list += [(name,number) for (number,name,fmt_str)
in RelLib.Name.STANDARD_FORMATS]
format_list += [(name,number) for (number,name,fmt_str) format_list += [(name,number) for (number,name,fmt_str)
in NameDisplay.CUSTOM_FORMATS] in NameDisplay.CUSTOM_FORMATS]

View File

@ -214,8 +214,9 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
self.name_exp.set_sensitive(False) self.name_exp.set_sensitive(False)
format_list = [(name,number) for (number,name,fmt_str) format_list = []
in Name.DEFAULT_FORMATS] format_list += [(name,number) for (number,name,fmt_str)
in Name.STANDARD_FORMATS]
format_list += [(name,number) for (number,name,fmt_str) format_list += [(name,number) for (number,name,fmt_str)
in NameDisplay.CUSTOM_FORMATS] in NameDisplay.CUSTOM_FORMATS]
@ -235,7 +236,7 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
active = int(Config.get(Config.NAME_FORMAT)) active = int(Config.get(Config.NAME_FORMAT))
obox.set_active(active) obox.set_active(active)
obox.connect('changed', self.name_changed) # obox.connect('changed', self.name_changed)
lwidget = BasicLabel("%s: " % _('Preset format')) lwidget = BasicLabel("%s: " % _('Preset format'))
# custom_ui = self.build_custom_name_ui() # custom_ui = self.build_custom_name_ui()
@ -283,16 +284,16 @@ class GrampsPreferences(ManagedWindow.ManagedWindow):
## return table ## return table
def name_changed(self,obj): ## def name_changed(self,obj):
custom_text = NameDisplay.formats[Name.CUSTOM] ## custom_text = NameDisplay.formats[Name.CUSTOM]
if obj.get_active_text() == custom_text: ## if obj.get_active_text() == custom_text:
pass ## pass
#self.name_exp.set_sensitive(True) ## #self.name_exp.set_sensitive(True)
#self.name_exp.set_expanded(True) ## #self.name_exp.set_expanded(True)
else: ## else:
Config.set(Config.NAME_FORMAT,obj.get_active()) ## Config.set(Config.NAME_FORMAT,obj.get_active())
#self.name_exp.set_expanded(False) ## #self.name_exp.set_expanded(False)
#self.name_exp.set_sensitive(False) ## #self.name_exp.set_sensitive(False)
def add_formats_panel(self): def add_formats_panel(self):
table = gtk.Table(3,8) table = gtk.Table(3,8)

View File

@ -61,8 +61,10 @@ class Name(SecondaryObject,PrivacyBase,SourceBase,NoteBase,DateBase):
PTFN = 3 # patronymic first name PTFN = 3 # patronymic first name
FN = 4 # first name FN = 4 # first name
DEFAULT_FORMATS = [ DEFAULT_FORMAT = \
(DEF, _("Default format (defined by GRAMPS preferences)"),''), (DEF,_("Default format (defined by GRAMPS preferences)"),'')
STANDARD_FORMATS = [
(LNFN, _("Family name, Given name Patronymic"),''), (LNFN, _("Family name, Given name Patronymic"),''),
(FNLN, _("Given name Family name"),''), (FNLN, _("Given name Family name"),''),
(PTFN, _("Patronymic, Given name"),''), (PTFN, _("Patronymic, Given name"),''),