Changeset 1482
- Timestamp:
- 10/26/05 14:22:44 (3 years ago)
- Files:
-
- trunk/dabo/dReportWriter.py (modified) (1 diff)
- trunk/dabo/dSecurityManager.py (modified) (1 diff)
- trunk/dabo/lib/datanav/Page.py (modified) (3 diffs)
- trunk/dabo/lib/reporting_stefano/serialization/serialization.py (modified) (3 diffs)
- trunk/dabo/ui/dPemMixinBase.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dGrid.py (modified) (13 diffs)
- trunk/dabo/ui/uiwx/dListControl.py (modified) (1 diff)
- trunk/tools (added)
- trunk/tools/reportMixedIndentation.py (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dabo/dReportWriter.py
r1423 r1482 63 63 <align>"right"</align> 64 64 <hAnchor>"right"</hAnchor> 65 <x>self.Bands["pageFooter"]["width"]-1</x>65 <x>self.Bands["pageFooter"]["width"]-1</x> 66 66 <y>"0 in"</y> 67 67 <width>"6 in"</width> trunk/dabo/dSecurityManager.py
r1423 r1482 17 17 if attempt > 0: 18 18 message = _("Login incorrect, please try again. (%s/%s)") % ( 19 attempt+1, self.LoginAttemptsAllowed)19 attempt+1, self.LoginAttemptsAllowed) 20 20 user, password = self.Application.uiApp.getLoginInfo(message) 21 21 trunk/dabo/lib/datanav/Page.py
r1479 r1482 137 137 if self.sortFields.has_key(self.sortDS): 138 138 mn.append(_("Remove sort on ") + self.sortCap, 139 bindfunc=self.handleSortRemove)139 bindfunc=self.handleSortRemove) 140 140 141 141 mn.append(_("Sort Ascending"), bindfunc=self.handleSortAsc) … … 348 348 if typ == "char": 349 349 chcList = [n_("Equals"), 350 n_("Begins With"), 351 n_("Contains") 352 ] 350 n_("Begins With"), 351 n_("Contains")] 353 352 elif typ == "memo": 354 353 chcList = [n_("Begins With"), 355 n_("Contains") 356 ] 354 n_("Contains")] 357 355 if ws != "0": 358 356 chcList.append(n_("Matches Words")) … … 360 358 elif typ in ("date", "datetime"): 361 359 chc = (n_("Equals"), 362 n_("On or Before"), 363 n_("On or After"), 364 n_("Before"), 365 n_("After") 366 ) 360 n_("On or Before"), 361 n_("On or After"), 362 n_("Before"), 363 n_("After") ) 367 364 elif typ in ("int", "float", "decimal"): 368 365 chc = (n_("Equals"), 369 n_("Greater than"), 370 n_("Greater than/Equal to"), 371 n_("Less than"), 372 n_("Less than/Equal to") 373 ) 366 n_("Greater than"), 367 n_("Greater than/Equal to"), 368 n_("Less than"), 369 n_("Less than/Equal to")) 374 370 elif typ == "bool": 375 371 chc = (CHOICE_TRUE, CHOICE_FALSE) trunk/dabo/lib/reporting_stefano/serialization/serialization.py
r1044 r1482 3 3 from children import * 4 4 5 5 6 6 class SerializableMeta(type): 7 7 def __init__(cls, name, bases, dict): … … 13 13 for name, obj in dict.items(): 14 14 if (isinstance(obj, SerializableAttribute) 15 or isinstance(obj, SerializableObjectChild)):15 or isinstance(obj, SerializableObjectChild)): 16 16 attributes.append( (name, obj) ) 17 17 delattr(cls, name) … … 28 28 self.srcValues = {} 29 29 attributeNames = [attrName for attrName, 30 attrType in self._xmlSerializationAttributes]30 attrType in self._xmlSerializationAttributes] 31 31 for key, value in args.iteritems(): 32 32 assert key in attributeNames, "Unknown attribute name %r for object %s" \ trunk/dabo/ui/dPemMixinBase.py
r1423 r1482 88 88 except AttributeError: 89 89 break 90 if isinstance(parent, (dabo.ui.dForm, dabo.ui.dFormMain, 91 dabo.ui.dDialog) ): 90 if isinstance(parent, (dabo.ui.dFormMixin)): 92 91 frm = parent 93 92 break trunk/dabo/ui/uiwx/dGrid.py
r1481 r1482 283 283 if app is not None: 284 284 width = app.getUserSetting("%s.%s.%s.%s" % (self.grid.Form.Name, 285 self.grid.Name, colName,286 "Width"))285 self.grid.Name, colName, 286 "Width")) 287 287 288 288 if width is None: … … 1014 1014 auto = self._autoHorizontalAlignment = True 1015 1015 mapping = {wx.ALIGN_LEFT: "Left", wx.ALIGN_RIGHT: "Right", 1016 wx.ALIGN_CENTRE: "Center"}1016 wx.ALIGN_CENTRE: "Center"} 1017 1017 wxAlignment = self._gridColAttr.GetAlignment()[0] 1018 1018 try: … … 1040 1040 self._autoHorizontalAlignment = False 1041 1041 mapping = {"Left": wx.ALIGN_LEFT, "Right": wx.ALIGN_RIGHT, 1042 "Center": wx.ALIGN_CENTRE}1042 "Center": wx.ALIGN_CENTRE} 1043 1043 try: 1044 1044 wxHorAlign = mapping[val] … … 1118 1118 def _getVerticalAlignment(self): 1119 1119 mapping = {wx.ALIGN_TOP: "Top", wx.ALIGN_BOTTOM: "Bottom", 1120 wx.ALIGN_CENTRE: "Center"}1120 wx.ALIGN_CENTRE: "Center"} 1121 1121 wxAlignment = self._gridColAttr.GetAlignment()[1] 1122 1122 try: … … 1130 1130 val = self._expandPropStringValue(val, ("Top", "Bottom", "Center")) 1131 1131 mapping = {"Top": wx.ALIGN_TOP, "Bottom": wx.ALIGN_BOTTOM, 1132 "Center": wx.ALIGN_CENTRE}1132 "Center": wx.ALIGN_CENTRE} 1133 1133 try: 1134 1134 wxVertAlign = mapping[val] … … 1220 1220 will be self.CustomEditorClass if set, or the default editor for the 1221 1221 datatype of the field. (varies)""")) 1222 1222 1223 1223 DataField = property(_getDataField, _setDataField, None, 1224 1224 _("Field key in the data set to which this column is bound. (str)") ) … … 1304 1304 self.CustomRendererClass if set, or the default renderer class for the 1305 1305 datatype of the field. (varies)""")) 1306 1306 1307 1307 Searchable = property(_getSearchable, _setSearchable, None, 1308 1308 _("""Specifies whether this column's incremental search is enabled. … … 1724 1724 # Account for the width of the header caption: 1725 1725 cw = dabo.ui.fontMetricFromFont(colObj.Caption, 1726 colObj.HeaderFont)[0] + capBuffer1726 colObj.HeaderFont)[0] + capBuffer 1727 1727 w = max(autoWidth, cw) 1728 1728 w = min(w, maxWidth) … … 1809 1809 # Down arrow 1810 1810 dc.DrawPolygon([(left, top), (left+self.sortIndicatorSize, top), 1811 (left+self.sortIndicatorBuffer, top+self.sortIndicatorSize)])1811 (left+self.sortIndicatorBuffer, top+self.sortIndicatorSize)]) 1812 1812 elif self.sortOrder == "ASC": 1813 1813 # Up arrow 1814 1814 dc.DrawPolygon([(left+self.sortIndicatorBuffer, top), 1815 (left+self.sortIndicatorSize, top+self.sortIndicatorSize),1816 (left, top+self.sortIndicatorSize)])1815 (left+self.sortIndicatorSize, top+self.sortIndicatorSize), 1816 (left, top+self.sortIndicatorSize)]) 1817 1817 else: 1818 1818 # Column is not sorted, so don't draw. … … 1832 1832 1833 1833 wxah = {"Center": wx.ALIGN_CENTRE_HORIZONTAL, 1834 "Left": wx.ALIGN_LEFT,1835 "Right": wx.ALIGN_RIGHT}[ah]1834 "Left": wx.ALIGN_LEFT, 1835 "Right": wx.ALIGN_RIGHT}[ah] 1836 1836 1837 1837 wxav = {"Center": wx.ALIGN_CENTRE_VERTICAL, 1838 "Top": wx.ALIGN_TOP,1839 "Bottom": wx.ALIGN_BOTTOM}[av]1838 "Top": wx.ALIGN_TOP, 1839 "Bottom": wx.ALIGN_BOTTOM}[av] 1840 1840 1841 1841 # Give some more space around the rect - some platforms use a 3d look … … 2399 2399 self.autoSizeCol(self.getColByX(self._headerMousePosition[0]), persist=True) 2400 2400 menu.append(_("&Autosize Column"), bindfunc=_autosizeColumn, 2401 help=_("Autosize the column based on the data in the column."))2401 help=_("Autosize the column based on the data in the column.")) 2402 2402 2403 2403 menu = self.fillHeaderContextMenu(menu) … … 2943 2943 if app is not None: 2944 2944 app.setUserSetting("%s.%s.%s" % ( 2945 self.Form.Name, self.Name, "RowSize"), val)2945 self.Form.Name, self.Name, "RowSize"), val) 2946 2946 else: 2947 2947 self._properties["RowHeight"] = val … … 3150 3150 def initProperties(self): 3151 3151 self.DataSet = [{"name" : "Ed Leafe", "age" : 47, "coder" : True, "color": "brown"}, 3152 {"name" : "Mike Leafe", "age" : 18, "coder" : False, "color": "purple"},3153 {"name" : "Dan Leafe", "age" : 13, "coder" : False, "color": "green"}]3152 {"name" : "Mike Leafe", "age" : 18, "coder" : False, "color": "purple"}, 3153 {"name" : "Dan Leafe", "age" : 13, "coder" : False, "color": "green"}] 3154 3154 self.Width = 360 3155 3155 self.Height = 150 trunk/dabo/ui/uiwx/dListControl.py
r1415 r1482 10 10 11 11 class dListControl(wx.ListCtrl, dcm.dControlItemMixin, 12 ListMixin.ListCtrlAutoWidthMixin):12 ListMixin.ListCtrlAutoWidthMixin): 13 13 """ The List Control is ideal for visually dealing with data sets 14 14 where each 'row' is a unit, where it doesn't make sense to deal
