2006-07-29 Zsolt Foldvari <zfoldvar@users.sourceforge.net>
* src/NameDisplay.py (display_given): Cleanup * src/Gramps.Cfg.py (NameFormatEditDlg.run): Verification of the returned values svn: r7088
This commit is contained in:
parent
f3cf9b0aa3
commit
74ecbff35f
@ -1,3 +1,8 @@
|
|||||||
|
2006-07-29 Zsolt Foldvari <zfoldvar@users.sourceforge.net>
|
||||||
|
* src/NameDisplay.py (display_given): Cleanup
|
||||||
|
* src/Gramps.Cfg.py (NameFormatEditDlg.run): Verification of the
|
||||||
|
returned values
|
||||||
|
|
||||||
2006-07-27 Alex Roitman <shura@gramps-project.org>
|
2006-07-27 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/GrampsDb/_ReadGrdb.py: Re-map name formats on import.
|
* src/GrampsDb/_ReadGrdb.py: Re-map name formats on import.
|
||||||
* src/GrampsDb/_GrampsBSDDB.py (_load_metadata): Upgrade custom
|
* src/GrampsDb/_GrampsBSDDB.py (_load_metadata): Upgrade custom
|
||||||
|
@ -45,6 +45,7 @@ from NameDisplay import displayer as _nd
|
|||||||
from RelLib import Name
|
from RelLib import Name
|
||||||
import ManagedWindow
|
import ManagedWindow
|
||||||
from GrampsWidgets import *
|
from GrampsWidgets import *
|
||||||
|
import QuestionDialog
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -600,9 +601,22 @@ class NameFormatEditDlg:
|
|||||||
self.formatentry.set_text(self.fmt_str)
|
self.formatentry.set_text(self.fmt_str)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.response = self.dlg.run()
|
running = True
|
||||||
self.fmt_name = self.nameentry.get_text()
|
while running:
|
||||||
self.fmt_str = self.formatentry.get_text()
|
self.response = self.dlg.run()
|
||||||
|
|
||||||
|
running = False
|
||||||
|
self.fmt_name = self.nameentry.get_text()
|
||||||
|
self.fmt_str = self.formatentry.get_text()
|
||||||
|
|
||||||
|
if self.response == gtk.RESPONSE_OK:
|
||||||
|
if self.fmt_name == '' and self.fmt_str == '':
|
||||||
|
self.response = gtk.RESPONSE_CANCEL
|
||||||
|
elif (self.fmt_name == '') ^ (self.fmt_str == ''):
|
||||||
|
QuestionDialog.ErrorDialog(
|
||||||
|
_('Both Format name and definition have to be defined'),
|
||||||
|
parent=self.dlg)
|
||||||
|
running = True
|
||||||
|
|
||||||
self.dlg.destroy()
|
self.dlg.destroy()
|
||||||
return (self.response, self.fmt_name, self.fmt_str)
|
return (self.response, self.fmt_name, self.fmt_str)
|
||||||
|
@ -450,10 +450,7 @@ class NameDisplay:
|
|||||||
|
|
||||||
def display_given(self,person):
|
def display_given(self,person):
|
||||||
name = person.get_primary_name()
|
name = person.get_primary_name()
|
||||||
if name.patronymic:
|
return self.format_str(person.get_primary_name(),'%f %y')
|
||||||
return "%s %s" % (name.first_name, name.patronymic)
|
|
||||||
else:
|
|
||||||
return name.first_name
|
|
||||||
|
|
||||||
def name_grouping(self,db,person):
|
def name_grouping(self,db,person):
|
||||||
return self.name_grouping_name(db,person.primary_name)
|
return self.name_grouping_name(db,person.primary_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user