dabo Commit
Revision 6112
Date: 2010-10-17 17:21:14 -0700 (Sun, 17 Oct 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6112
Changed:
U trunk/dabo/dApp.py
U trunk/dabo/dLocalize.py
U trunk/dabo/lib/dates.py
U trunk/dabo/lib/test/test_dates.py
U trunk/dabo/settings.py
U trunk/dabo/ui/dialogs/PreferenceDialog.py
U trunk/dabo/ui/uiwx/dCalendar.py
U trunk/dabo/ui/uiwx/dFont.py
U trunk/dabo/ui/uiwx/dForm.py
U trunk/dabo/ui/uiwx/dFormMain.py
U trunk/ide/wizards/AppWizard/spec-App.py.txt
U trunk/ide/wizards/AppWizard/spec-main.py.txt
Log:
Applied Jacek's patch to change all references to 'dabo.settings.something' to
'dabo.something'.
Diff:
Modified: trunk/dabo/dApp.py
===================================================================
--- trunk/dabo/dApp.py 2010-10-17 14:56:07 UTC (rev 6111)
+++ trunk/dabo/dApp.py 2010-10-18 00:21:14 UTC (rev 6112)
@@ -175,7 +175,7 @@
def __init__(self, selfStart=False, ignoreScriptDir=False,
properties=None, *args, **kwargs):
- if dabo.settings.loadUserLocale:
+ if dabo.loadUserLocale:
locale.setlocale(locale.LC_ALL, '')
# Subdirectories that make up a standard Dabo app
@@ -529,7 +529,7 @@
"""
if not force:
# Check for cases where we absolutely will not Web
Update.
- update = dabo.settings.checkForWebUpdates
+ update = dabo.checkForWebUpdates
if update:
# If they are running Subversion, don't update.
if
os.path.isdir(os.path.join(dabo.frameworkPath, ".svn")):
Modified: trunk/dabo/dLocalize.py
===================================================================
--- trunk/dabo/dLocalize.py 2010-10-17 14:56:07 UTC (rev 6111)
+++ trunk/dabo/dLocalize.py 2010-10-18 00:21:14 UTC (rev 6112)
@@ -11,7 +11,7 @@
_defaultLanguage, _defaultEncoding = locale.getdefaultlocale()
if _defaultLanguage is None:
- _defaultLanguage = dabo.settings.defaultLanguage
+ _defaultLanguage = dabo.defaultLanguage
if _defaultEncoding is None:
_defaultEncoding = dabo.getEncoding()
@@ -26,7 +26,7 @@
"german": "de", "deutsch": "de",
"italian": "it", "italiano": "it",
"portuguese": "pt", "portuguése": "pt",
- "russian": "ru"}
+ "russian": "ru", "polish": "pl"}
def _(s):
"""Return the localized translation of s, or s if translation not
possible."""
@@ -135,7 +135,7 @@
print
print "sys.getdefaultencoding():", sys.getdefaultencoding()
- if dabo.settings.loadUserLocale:
+ if dabo.loadUserLocale:
locale.setlocale(locale.LC_ALL, '')
print "locale.getlocale():", locale.getlocale()
else:
Modified: trunk/dabo/lib/dates.py
===================================================================
--- trunk/dabo/lib/dates.py 2010-10-17 14:56:07 UTC (rev 6111)
+++ trunk/dabo/lib/dates.py 2010-10-18 00:21:14 UTC (rev 6112)
@@ -90,8 +90,8 @@
def getStringFromDate(d):
- """Given a datetime.date, convert to string in dabo.settings.dateFormat
style."""
- fmt = dabo.settings.dateFormat
+ """Given a datetime.date, convert to string in dabo.dateFormat style."""
+ fmt = dabo.dateFormat
if fmt is None:
# Delegate formatting to the time module, which will take the
# user's locale into account.
@@ -110,7 +110,7 @@
if formats is None:
formats = ["ISO8601"]
- sdf = dabo.settings.dateFormat
+ sdf = dabo.dateFormat
if sdf is not None:
if _usedDateFormats[0] == sdf:
# current date format is already first in the list; do
nothing
@@ -157,8 +157,8 @@
def getStringFromDateTime(dt):
- """Given a datetime.datetime, convert to string in
dabo.settings.dateTimeFormat style."""
- fmt = dabo.settings.dateTimeFormat
+ """Given a datetime.datetime, convert to string in dabo.dateTimeFormat
style."""
+ fmt = dabo.dateTimeFormat
if fmt is None:
# Delegate formatting to the time module, which will take the
# user's locale into account.
@@ -171,7 +171,7 @@
"""Given a string in a defined format, return a datetime object or
None."""
global _dtregex
- dtFormat = dabo.settings.dateTimeFormat
+ dtFormat = dabo.dateTimeFormat
ret = None
if formats is None:
Modified: trunk/dabo/lib/test/test_dates.py
===================================================================
--- trunk/dabo/lib/test/test_dates.py 2010-10-17 14:56:07 UTC (rev 6111)
+++ trunk/dabo/lib/test/test_dates.py 2010-10-18 00:21:14 UTC (rev 6112)
@@ -37,13 +37,13 @@
def test_getStringFromDate(self):
test_str = "2006-05-03"
test_date = dates.getDateFromString(test_str)
- dabo.settings.dateFormat = "%Y-%m-%d"
+ dabo.dateFormat = "%Y-%m-%d"
self.assertEqual(dates.getStringFromDate(test_date), test_str)
def test_getStringFromDateTime(self):
test_str = "2006-05-03 12:15:00"
test_datetime = dates.getDateTimeFromString(test_str)
- dabo.settings.dateTimeFormat = "%Y-%m-%d %H:%M:%S"
+ dabo.dateTimeFormat = "%Y-%m-%d %H:%M:%S"
self.assertEqual(dates.getStringFromDateTime(test_datetime),
test_str)
def test_goDate(self):
Modified: trunk/dabo/settings.py
===================================================================
--- trunk/dabo/settings.py 2010-10-17 14:56:07 UTC (rev 6111)
+++ trunk/dabo/settings.py 2010-10-18 00:21:14 UTC (rev 6112)
@@ -124,7 +124,7 @@
# Date and Time formats. None will use the os user's settings, but
# your code can easily override these. Example:
-# dabo.settings.dateFormat = "%d.%m.%Y" -> "31.12.2008".
+# dabo.dateFormat = "%d.%m.%Y" -> "31.12.2008".
dateFormat = None
dateTimeFormat = None
timeFormat = None
Modified: trunk/dabo/ui/dialogs/PreferenceDialog.py
===================================================================
--- trunk/dabo/ui/dialogs/PreferenceDialog.py 2010-10-17 14:56:07 UTC (rev
6111)
+++ trunk/dabo/ui/dialogs/PreferenceDialog.py 2010-10-18 00:21:14 UTC (rev
6112)
@@ -16,7 +16,7 @@
class PreferenceDialog(dabo.ui.dOkCancelDialog):
def _afterInit(self):
self._includeDefaultPages = True
- update = dabo.settings.checkForWebUpdates
+ update = dabo.checkForWebUpdates
if update:
# If they are running Subversion, don't update.
if
os.path.isdir(os.path.join(os.path.split(dabo.__file__)[0], ".svn")):
Modified: trunk/dabo/ui/uiwx/dCalendar.py
===================================================================
--- trunk/dabo/ui/uiwx/dCalendar.py 2010-10-17 14:56:07 UTC (rev 6111)
+++ trunk/dabo/ui/uiwx/dCalendar.py 2010-10-18 00:21:14 UTC (rev 6112)
@@ -305,7 +305,7 @@
FirstDayOfWeek = property(_getFirstDayOfWeek, None, None,
_("""Can be one of either 'Sunday' or 'Monday'.
Determines which day
of the week appears in the first column. Defaults to
the value set
- in dabo.settings.firstDayOfWeek. Read-only at runtime.
(str)"""))
+ in dabo.firstDayOfWeek. Read-only at runtime.
(str)"""))
FixedMonth = property(_getFixedMonth, _setFixedMonth, None,
_("""When True, the user cannot change the displayed
month.
Modified: trunk/dabo/ui/uiwx/dFont.py
===================================================================
--- trunk/dabo/ui/uiwx/dFont.py 2010-10-17 14:56:07 UTC (rev 6111)
+++ trunk/dabo/ui/uiwx/dFont.py 2010-10-18 00:21:14 UTC (rev 6112)
@@ -14,7 +14,7 @@
if _nativeFont is not None:
self._nativeFont = _nativeFont
else:
- self._nativeFont =
wx.Font(dabo.settings.defaultFontSize,
+ self._nativeFont = wx.Font(dabo.defaultFontSize,
wx.FONTFAMILY_DEFAULT,
wx.FONTSTYLE_NORMAL,
wx.FONTWEIGHT_NORMAL)
self._macNonScaledSize = 0
@@ -135,7 +135,7 @@
def _useMacFontScaling(self):
- return wx.Platform == "__WXMAC__" and
dabo.settings.macFontScaling
+ return wx.Platform == "__WXMAC__" and dabo.macFontScaling
def _getUnderline(self):
Modified: trunk/dabo/ui/uiwx/dForm.py
===================================================================
--- trunk/dabo/ui/uiwx/dForm.py 2010-10-17 14:56:07 UTC (rev 6111)
+++ trunk/dabo/ui/uiwx/dForm.py 2010-10-18 00:21:14 UTC (rev 6112)
@@ -92,7 +92,7 @@
""" Displays an alert messagebox for the user. You can customize
this in your own classes if you prefer a different display.
"""
- if exception and not dabo.settings.eatBizExceptions:
+ if exception and not dabo.eatBizExceptions:
raise
if severe:
func = dabo.ui.stop
@@ -913,7 +913,7 @@
self._modal = True
else:
# Normal dForm
- if dabo.settings.MDI and isinstance(parent,
wx.MDIParentFrame):
+ if dabo.MDI and isinstance(parent, wx.MDIParentFrame):
# Hack this into an MDI Child:
preClass = wx.PreMDIChildFrame
self._mdi = True
@@ -934,7 +934,7 @@
_hackToDialog = classmethod(_hackToDialog)
def _hackToFrame(cls):
- if dabo.settings.MDI:
+ if dabo.MDI:
dForm.__bases__ = (BaseForm, wx.MDIChildFrame)
else:
dForm.__bases__ = (BaseForm, wx.Frame)
Modified: trunk/dabo/ui/uiwx/dFormMain.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMain.py 2010-10-17 14:56:07 UTC (rev 6111)
+++ trunk/dabo/ui/uiwx/dFormMain.py 2010-10-18 00:21:14 UTC (rev 6112)
@@ -36,7 +36,7 @@
def __init__(self, parent=None, properties=None, *args, **kwargs):
self._baseClass = dFormMain
- if dabo.settings.MDI:
+ if dabo.MDI:
# Hack this into an MDI Parent:
dFormMain.__bases__ = (dFormMainBase, wx.MDIParentFrame)
preClass = wx.PreMDIParentFrame
Modified: trunk/ide/wizards/AppWizard/spec-App.py.txt
===================================================================
--- trunk/ide/wizards/AppWizard/spec-App.py.txt 2010-10-17 14:56:07 UTC (rev
6111)
+++ trunk/ide/wizards/AppWizard/spec-App.py.txt 2010-10-18 00:21:14 UTC (rev
6112)
@@ -32,7 +32,7 @@
self.setAppInfo("appRevision", version["revision"])
def setup(self):
- if dabo.settings.MDI:
+ if dabo.MDI:
self.MainFormClass = self.ui.FrmMain
else:
# no need for main form in SDI mode:
Modified: trunk/ide/wizards/AppWizard/spec-main.py.txt
===================================================================
--- trunk/ide/wizards/AppWizard/spec-main.py.txt 2010-10-17 14:56:07 UTC
(rev 6111)
+++ trunk/ide/wizards/AppWizard/spec-main.py.txt 2010-10-18 00:21:14 UTC
(rev 6112)
@@ -12,7 +12,7 @@
# db, biz, and ui packages:
dabo.ui.loadUI("wx")
if sys.platform[:3] == "win":
- dabo.settings.MDI = True
+ dabo.MDI = True
import db
import biz
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]