* src/GrampsCfg.py: update RelLib display
* src/GrampsGconfKeys.py: import os * src/RelLib.py: change _parser to parser and _display to display svn: r3575
This commit is contained in:
parent
7f94d0fb51
commit
c218d7c4f0
@ -1,4 +1,8 @@
|
|||||||
2004-09-25 Don Allingham <dallingham@users.sourceforge.net>
|
2004-09-25 Don Allingham <dallingham@users.sourceforge.net>
|
||||||
|
* src/DateDisplay.py: add set_format function
|
||||||
|
* src/GrampsCfg.py: update RelLib display
|
||||||
|
* src/GrampsGconfKeys.py: import os
|
||||||
|
* src/RelLib.py: change _parser to parser and _display to display
|
||||||
* src/const.py.in: remove calendar directory
|
* src/const.py.in: remove calendar directory
|
||||||
* src/gramps_main.py: remove calendar directory
|
* src/gramps_main.py: remove calendar directory
|
||||||
* configure.in: remove calendar directory
|
* configure.in: remove calendar directory
|
||||||
|
@ -140,6 +140,9 @@ class DateDisplay:
|
|||||||
self._display_islamic,
|
self._display_islamic,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def set_format(self,format):
|
||||||
|
self.format = format
|
||||||
|
|
||||||
def verify_format(self,format):
|
def verify_format(self,format):
|
||||||
"""
|
"""
|
||||||
Verifies that the format value is within the correct range.
|
Verifies that the format value is within the correct range.
|
||||||
|
@ -118,6 +118,7 @@ def get_toolbar_style():
|
|||||||
def set_calendar_date_format():
|
def set_calendar_date_format():
|
||||||
format_list = DateHandler.get_date_formats()
|
format_list = DateHandler.get_date_formats()
|
||||||
DateHandler.set_format(GrampsGconfKeys.get_date_format(format_list))
|
DateHandler.set_format(GrampsGconfKeys.get_date_format(format_list))
|
||||||
|
RelLib.display.set_format(GrampsGconfKeys.get_date_format(format_list))
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -37,6 +37,8 @@ except ImportError:
|
|||||||
gconf = gnome.gconf
|
gconf = gnome.gconf
|
||||||
|
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
client = gconf.client_get_default()
|
client = gconf.client_get_default()
|
||||||
client.add_dir("/apps/gramps",gconf.CLIENT_PRELOAD_NONE)
|
client.add_dir("/apps/gramps",gconf.CLIENT_PRELOAD_NONE)
|
||||||
|
|
||||||
|
@ -67,8 +67,8 @@ CONF_VERY_LOW = 0
|
|||||||
# Class definitions
|
# Class definitions
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
_display = DateHandler.create_display()
|
display = DateHandler.create_display()
|
||||||
_parser = DateHandler.create_parser()
|
parser = DateHandler.create_parser()
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -991,12 +991,12 @@ class Event(PrimaryObject,DataObj):
|
|||||||
|
|
||||||
def set_date(self, date) :
|
def set_date(self, date) :
|
||||||
"""attempts to sets the date of the Event instance"""
|
"""attempts to sets the date of the Event instance"""
|
||||||
self.date = _parser.parse(date)
|
self.date = parser.parse(date)
|
||||||
|
|
||||||
def get_date(self) :
|
def get_date(self) :
|
||||||
"""returns a string representation of the date of the Event instance"""
|
"""returns a string representation of the date of the Event instance"""
|
||||||
if self.date:
|
if self.date:
|
||||||
return _display.display(self.date)
|
return display.display(self.date)
|
||||||
return u""
|
return u""
|
||||||
|
|
||||||
def get_preferred_date(self) :
|
def get_preferred_date(self) :
|
||||||
@ -1007,7 +1007,7 @@ class Event(PrimaryObject,DataObj):
|
|||||||
"""returns a string representation of the date of the Event instance,
|
"""returns a string representation of the date of the Event instance,
|
||||||
enclosing the results in quotes if it is not a valid date"""
|
enclosing the results in quotes if it is not a valid date"""
|
||||||
if self.date:
|
if self.date:
|
||||||
return _display.quote_display(self.date)
|
return display.quote_display(self.date)
|
||||||
return u""
|
return u""
|
||||||
|
|
||||||
def get_date_object(self):
|
def get_date_object(self):
|
||||||
@ -1408,12 +1408,12 @@ class LdsOrd(SourceNote):
|
|||||||
"""attempts to sets the date of the ordinance"""
|
"""attempts to sets the date of the ordinance"""
|
||||||
if not self.date:
|
if not self.date:
|
||||||
self.date = Date.Date()
|
self.date = Date.Date()
|
||||||
_parser.set_date(self.date,date)
|
parser.set_date(self.date,date)
|
||||||
|
|
||||||
def get_date(self) :
|
def get_date(self) :
|
||||||
"""returns a string representation of the date of the ordinance"""
|
"""returns a string representation of the date of the ordinance"""
|
||||||
if self.date:
|
if self.date:
|
||||||
return _display.display(self.date)
|
return display.display(self.date)
|
||||||
return u""
|
return u""
|
||||||
|
|
||||||
def get_date_object(self):
|
def get_date_object(self):
|
||||||
@ -1748,13 +1748,13 @@ class Address(DataObj):
|
|||||||
def set_date(self,text):
|
def set_date(self,text):
|
||||||
"""attempts to sets the date that the person lived at the address
|
"""attempts to sets the date that the person lived at the address
|
||||||
from the passed string"""
|
from the passed string"""
|
||||||
self.date = _parser.parse(text)
|
self.date = parser.parse(text)
|
||||||
|
|
||||||
def get_date(self):
|
def get_date(self):
|
||||||
"""returns a string representation of the date that the person
|
"""returns a string representation of the date that the person
|
||||||
lived at the address"""
|
lived at the address"""
|
||||||
if self.date:
|
if self.date:
|
||||||
return _display.display(self.date)
|
return display.display(self.date)
|
||||||
return u""
|
return u""
|
||||||
|
|
||||||
def get_preferred_date(self):
|
def get_preferred_date(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user