From 97fd0bc7d5ad45eff9b6f1aaa8231e1be5918ac3 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 19 Sep 2004 23:05:25 +0000 Subject: [PATCH] * src/gramps.glade: remove button border for date editor button * src/DateDisplay.py: fix quality prefix display svn: r3557 --- ChangeLog | 4 ++ src/DateDisplay.py | 16 +++-- src/gramps.glade | 159 +++++++++++++++++++++++++-------------------- 3 files changed, 103 insertions(+), 76 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8736849e0..5ef634d21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-09-19 Don Allingham + * src/gramps.glade: remove button border for date editor button + * src/DateDisplay.py: fix quality prefix display + 2004-09-19 Alex Roitman * src/DateEdit.py: Take date object as an argument and work with it. * src/AddrEdit.py: Use date object instead of text. diff --git a/src/DateDisplay.py b/src/DateDisplay.py index 7695cb54b..4c8fcffac 100644 --- a/src/DateDisplay.py +++ b/src/DateDisplay.py @@ -46,9 +46,9 @@ class DateDisplay: " (Persian)"," (Islamic)" ) - _mod_str = ( - "","before ","after ","about ","estimated ","calculated ","" - ) + _mod_str = ("","before ","after ","about ","","","") + + _qual_str = ("","estimated ","calculated ") # determine the code set returned by nl_langinfo _codeset = locale.nl_langinfo(locale.CODESET) @@ -175,20 +175,24 @@ class DateDisplay: """ mod = date.get_modifier() cal = date.get_calendar() + qual = date.get_quality() start = date.get_start_date() + + qual_str = self._qual_str[qual] + if start == Date.EMPTY: return u"" if mod == Date.MOD_SPAN: d1 = self.display_cal[cal](start) d2 = self.display_cal[cal](date.get_stop_date()) - return "from %s to %s%s" % (d1,d2,self.calendar[cal]) + return "%sfrom %s to %s%s" % (qual_str,d1,d2,self.calendar[cal]) elif mod == Date.MOD_RANGE: d1 = self.display_cal[cal](start) d2 = self.display_cal[cal](date.get_stop_date()) - return "between %s and %s%s" % (d1,d2,self.calendar[cal]) + return "%sbetween %s and %s%s" % (qual_str,d1,d2,self.calendar[cal]) else: text = self.display_cal[date.get_calendar()](start) - return "%s%s%s" % (self._mod_str[mod],text,self.calendar[cal]) + return "%s%s%s%s" % (qual_str,self._mod_str[mod],text,self.calendar[cal]) def _slash_year(self,val,slash): if slash: diff --git a/src/gramps.glade b/src/gramps.glade index 37c5cbc50..3379d2366 100644 --- a/src/gramps.glade +++ b/src/gramps.glade @@ -8184,9 +8184,6 @@ Other 0 0 birthDate - - - 1 @@ -8198,27 +8195,6 @@ Other - - - True - True - True - True - 0 - - True - * - False - - - 2 - 3 - 13 - 14 - - - - 1 @@ -8763,27 +8739,6 @@ Other - - - True - True - True - True - 0 - - True - * - False - - - 8 - 9 - 13 - 14 - - - - 1 @@ -8969,59 +8924,123 @@ Other - + True - Invoke date editor - True - GTK_RELIEF_NORMAL - True + False + 0 - + True - 0.5 - 0.5 - 0 - 0 + True + True + True + 0 + + True + * + False + + 0 + True + True + + + + + + True + Invoke date editor + True + GTK_RELIEF_NONE + True + + + + True + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + - 3 + 2 4 13 14 fill - + fill - + True - Invoke date editor - True - GTK_RELIEF_NORMAL - True - + False + 0 - + True - 0.5 - 0.5 - 0 - 0 + True + True + True + 0 + + True + * + False + + 0 + True + True + + + + + + True + Invoke date editor + True + GTK_RELIEF_NONE + True + + + + + True + 0.5 + 0.5 + 0 + 0 + + + + + 0 + False + False + - 9 + 8 10 13 14 fill - + fill