* src/DisplayModels.py: fix initialization of self.map
svn: r3621
This commit is contained in:
parent
45504a5025
commit
b311d350a2
@ -1,4 +1,5 @@
|
|||||||
2004-10-11 Don Allingham <dallingham@users.sourceforge.net>
|
2004-10-11 Don Allingham <dallingham@users.sourceforge.net>
|
||||||
|
* src/DisplayModels.py: fix initialization of self.map
|
||||||
* src/DateParser.py: dynamically detect numerical parsing based
|
* src/DateParser.py: dynamically detect numerical parsing based
|
||||||
off locale. Do not depend on strptime.
|
off locale. Do not depend on strptime.
|
||||||
* src/Utils.py: remove last remains of SingleDate
|
* src/Utils.py: remove last remains of SingleDate
|
||||||
|
@ -51,11 +51,13 @@ _lang = os.environ.get('LANG','C')
|
|||||||
_lang_to_parser = {
|
_lang_to_parser = {
|
||||||
'C' : DateParser.DateParser,
|
'C' : DateParser.DateParser,
|
||||||
'en_US' : DateParser.DateParser,
|
'en_US' : DateParser.DateParser,
|
||||||
|
'en_GB' : DateParser.DateParser,
|
||||||
}
|
}
|
||||||
|
|
||||||
_lang_to_display = {
|
_lang_to_display = {
|
||||||
'C' : DateDisplay.DateDisplay,
|
'C' : DateDisplay.DateDisplay,
|
||||||
'en_US' : DateDisplay.DateDisplay,
|
'en_US' : DateDisplay.DateDisplay,
|
||||||
|
'en_GB' : DateDisplay.DateDisplay,
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -80,7 +82,6 @@ def get_date_formats():
|
|||||||
try:
|
try:
|
||||||
return _lang_to_display[_lang].formats
|
return _lang_to_display[_lang].formats
|
||||||
except:
|
except:
|
||||||
print "not found"
|
|
||||||
return DateDisplay.DateDisplay.formats
|
return DateDisplay.DateDisplay.formats
|
||||||
|
|
||||||
def set_format(val):
|
def set_format(val):
|
||||||
|
@ -38,8 +38,6 @@ class BaseModel(gtk.GenericTreeModel):
|
|||||||
def __init__(self,db):
|
def __init__(self,db):
|
||||||
gtk.GenericTreeModel.__init__(self)
|
gtk.GenericTreeModel.__init__(self)
|
||||||
self.set_property("leak_references",False)
|
self.set_property("leak_references",False)
|
||||||
self.fmap = []
|
|
||||||
self.map = {}
|
|
||||||
self.db = db
|
self.db = db
|
||||||
self.rebuild_data()
|
self.rebuild_data()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user