Changeset 2683
- Timestamp:
- 01/15/2007 01:27:41 PM (2 years ago)
- Files:
-
- branches/stable/ChangeLog (modified) (1 diff)
- branches/stable/dabo/__version__.py (modified) (1 diff)
- branches/stable/dabo/db/dbFirebird.py (modified) (1 diff)
- branches/stable/dabo/lib/datanav/Form.py (modified) (5 diffs)
- branches/stable/dabo/lib/datanav/Page.py (modified) (1 diff)
- branches/stable/dabo/ui/dDataControlMixinBase.py (modified) (1 diff)
- branches/stable/dabo/ui/dialogs/about.py (modified) (1 diff)
- branches/stable/dabo/ui/dialogs/htmlAbout.py (modified) (4 diffs)
- branches/stable/dabo/ui/uiwx/dControlItemMixin.py (modified) (2 diffs)
- branches/stable/dabo/ui/uiwx/dMenuItem.py (modified) (2 diffs)
- branches/stable/dabo/ui/uiwx/dToggleButton.py (modified) (1 diff)
- branches/stable/dabo/ui/uiwx/dTreeView.py (modified) (1 diff)
- branches/stable/dabo/ui/uiwx/uiApp.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/stable/ChangeLog
r2489 r2683 1 1 See the Subversion log for all the details. 2 3 =============================================================================== 4 Dabo 0.7.2 (2007-01-15) (Revision 2683): 5 6 Additions, all minor, backported to stable only to keep compatibility with the 7 stable versions of daboide and/or dabodemo: 8 + Enhanced the getImagePath() function to work better with Windows pathing. 9 + Refactored dPanel into a common mixin class. 10 + Added getBaseNodeClass() function to dTreeView. 11 12 Bug Fixes: 13 + Fixed the stable branch to work with wxPython 2.7 and 2.8, which was a fairly 14 large backport of relevant changes from the development trunk. 15 + Fixed incremental search in dGrid, which was broken by earlier unicode fixes. 16 + dBizobj.onSaveNew() user hook never being called. Fixed. 17 + Fixed but in dUserSettingProvider if setting/retrieving nested settings. 18 + dForm not updating field values after a save(), which is sometimes needed. 19 Fixed. 20 + Fixed dForm to explicitly cancel bizobj changes if the user answers "no" to 21 the "do you wish to save?" message. Otherwise, the application would never 22 finish. 23 + Fixed dGrid and dImage's attProperties. 24 + Fixed bug in dGrid.HeaderHeight resulting in a traceback if you tried to set 25 it in initProperties() or as a kwarg to the constructor. 26 + Fixed dabo.ui.busyInfo() to actually show the specified text instead of just 27 an ugly grey box on Gtk. 28 + Fixed a bug in dbFirebird that was caused by initializing more than once. 29 + Fixed a problem with the date textbox in the datanav select page adding 1 30 to each month, resulting in an incorrect select statement. 31 + Fixed some minor wording and behavior problems with the Quick Report option 32 in AppWizard apps, thanks to Ted Roche. 33 + Fixed htmlAbout to not return the html tags to the clipboard. 34 + Fixed dToggleButton to always flush its data, not just on LostFocus. 35 2 36 3 37 =============================================================================== branches/stable/dabo/__version__.py
r2489 r2683 2 2 # Everything else is boilerplate copied also to other dabo repositories. 3 3 package_name = "dabo" 4 _version = "0.7. 1s"4 _version = "0.7.2s" 5 5 6 6 branches/stable/dabo/db/dbFirebird.py
r2323 r2683 12 12 self.fieldPat = re.compile("([A-Za-z_][A-Za-z0-9-_]+)\.([A-Za-z_][A-Za-z0-9-_]+)") 13 13 import kinterbasdb 14 kinterbasdb.init(type_conv=200) 14 if not kinterbasdb.initialized: 15 kinterbasdb.init(type_conv=200) 15 16 self.dbapi = kinterbasdb 16 17 branches/stable/dabo/lib/datanav/Form.py
r2552 r2683 385 385 386 386 def onQuickReport(self, evt): 387 # May not have records if called via toolbar button 388 if not self.enableQuickReport(): 389 dabo.ui.exclaim(_("Sorry, there are no records to report on."), title=_("No Records")) 390 return 387 391 if self.preview: 388 392 # Just previewing … … 399 403 400 404 def addControls(self): 401 self.addObject(dabo.ui.dRadio Group, RegID="radMode",405 self.addObject(dabo.ui.dRadioList, RegID="radMode", 402 406 Caption="Mode", 403 407 Orientation="Row", … … 407 411 SaveRestoreValue=True) 408 412 self.Sizer.append1x(self.radMode) 409 410 self.addObject(dabo.ui.dRadioGroup, RegID="radRecords", 413 self.Sizer.appendSpacer(12) 414 415 self.addObject(dabo.ui.dRadioList, RegID="radRecords", 411 416 Caption="Report On", 412 417 Orientation="Row", … … 417 422 SaveRestoreValue=True) 418 423 self.Sizer.append1x(self.radRecords) 424 self.Sizer.appendSpacer(12) 419 425 420 426 self.addObject(dabo.ui.dButton, RegID="btnAdvanced", Caption="Advanced") 421 self.Sizer.append(self.btnAdvanced )427 self.Sizer.append(self.btnAdvanced, halign="center") 422 428 self.btnAdvanced.bindEvent(dEvents.Hit, self.onAdvanced) 423 429 … … 427 433 "'yes', you'll be able to modify the file and it will be used " 428 434 "as the Quick Report from now on (it will no longer be auto-" 429 "generated). The file will be generated when you click ' OK'."430 "\n\nGenerate the report form file?" ):435 "generated). The file will be generated when you click 'Yes'." 436 "\n\nGenerate the report form file?", cancelButton=False): 431 437 self.saveNamedReportForm = True 432 438 branches/stable/dabo/lib/datanav/Page.py
r2459 r2683 286 286 if isinstance(ctrl, dabo.ui.dDateTextBox): 287 287 dtTuple = ctrl.getDateTuple() 288 dt = "%s-%s-%s" % (dtTuple[0], padl(dtTuple[1] +1, 2, "0"),288 dt = "%s-%s-%s" % (dtTuple[0], padl(dtTuple[1], 2, "0"), 289 289 padl(dtTuple[2], 2, "0") ) 290 290 else: branches/stable/dabo/ui/dDataControlMixinBase.py
r2521 r2683 155 155 oldVal = self._oldVal 156 156 except AttributeError: 157 oldVal = None 158 if isinstance(self, (dabo.ui.dToggleButton,)): 159 # These classes change their value before the GotFocus event 160 # can store the oldval, so always flush 'em. 157 161 oldVal = None 158 162 if curVal is None or curVal != oldVal: branches/stable/dabo/ui/dialogs/about.py
r2274 r2683 66 66 67 67 ds = [] 68 ds.append({"name": "Platform:", "value": app.Platform}) 68 if app: 69 plat = app.Platform 70 else: 71 plat = sys.platform 72 ds.append({"name": "Platform:", "value": plat}) 69 73 ds.append({"name": "Python Version:", "value": "%s on %s" 70 74 % (sys.version.split()[0], sys.platform)}) branches/stable/dabo/ui/dialogs/htmlAbout.py
r2481 r2683 50 50 51 51 ds = [] 52 ds.append({"name": "Platform:", "value": app.Platform}) 52 if app: 53 plat = app.Platform 54 else: 55 plat = sys.platform 56 ds.append({"name": "Platform:", "value": plat}) 53 57 ds.append({"name": "Python Version:", "value": "%s on %s" 54 58 % (sys.version.split()[0], sys.platform)}) … … 70 74 71 75 72 def getInfoString(self ):76 def getInfoString(self, useHTML=True): 73 77 """Return app information as a string.""" 74 78 ds = self.getInfoDataSet() … … 77 81 lines.append("%s %s" % (r["name"], r["value"])) 78 82 79 eol = "<br>\n"83 eol = {True: "<br>\n", False: "\n"}[useHTML] 80 84 81 85 return eol.join(lines) … … 92 96 def onCopyInfo(self, evt): 93 97 """Copy the system information to the Clipboard""" 94 self.Application.copyToClipboard(self. htmlBox.Source)98 self.Application.copyToClipboard(self.getInfoString(useHTML=False)) 95 99 96 100 branches/stable/dabo/ui/uiwx/dControlItemMixin.py
r2322 r2683 1 import wx 2 import dabo 3 import dabo.dEvents as dEvents 1 4 from dDataControlMixin import dDataControlMixin 2 5 from dabo.dLocalize import _ 3 import wx4 import dabo5 6 from dabo.ui import makeDynamicProperty 6 7 … … 17 18 18 19 20 def _initEvents(self): 21 super(dControlItemMixin, self)._initEvents() 22 self.bindEvent(dEvents.Hit, self.__flush) 23 24 25 def __flush(self, evt): 26 self.flushValue() 27 28 19 29 def appendItem(self, txt, select=False): 20 30 """ Adds a new item to the end of the list """ branches/stable/dabo/ui/uiwx/dMenuItem.py
r2521 r2683 15 15 preClass = wx.MenuItem 16 16 self.Parent = parent 17 18 ## see comments in _setCaption for explanation of below: 19 text = kwargs.get("text", "") 20 if not text: 21 text = "dMenuItem" 22 kwargs["text"] = text 23 17 24 pm.dPemMixin.__init__(self, preClass, parent, properties, *args, **kwargs) 18 25 … … 48 55 if self._constructed(): 49 56 ## Win32 seems to need to clear the caption first, or funkiness 50 ## can arise. 51 self.SetText("") 57 ## can arise. And win32 in wx2.8 needs for the caption to never be 58 ## an empty string, or you'll get an invalid stock id assertion. 59 self.SetText(" ") 60 if val == "": 61 val = " " 52 62 self.SetText(val) 53 63 else: branches/stable/dabo/ui/uiwx/dToggleButton.py
r2521 r2683 33 33 dim.dImageMixin.__init__(self) 34 34 dcm.dDataControlMixin.__init__(self, preClass, parent, properties, *args, **kwargs) 35 36 35 self.Bind(wx.EVT_BUTTON, self.__onButton) 37 36 38 37 39 38 def __onButton(self, evt): 39 self.flushValue() 40 40 self.raiseEvent(dEvents.Hit, evt) 41 41 branches/stable/dabo/ui/uiwx/dTreeView.py
r2522 r2683 272 272 self.nodes = [] 273 273 274 style = self._extractKey((properties, kwargs), "style", 0) 274 275 # Default to showing buttons 275 276 val = self._extractKey((properties, kwargs), "ShowButtons", True) 277 if val: 278 style = style | wx.TR_HAS_BUTTONS 276 279 kwargs["ShowButtons"] = val 277 280 # Default to showing lines 278 281 val = self._extractKey((properties, kwargs), "ShowLines", True) 279 282 kwargs["ShowLines"] = val 283 if not val: 284 style = style | wx.TR_NO_LINES 280 285 # Default to showing root node 281 286 val = self._extractKey((properties, kwargs), "ShowRootNode", True) 282 287 kwargs["ShowRootNode"] = val 288 if not val: 289 style = style | wx.TR_HIDE_ROOT 283 290 # Default to showing root node lines 284 291 val = self._extractKey((properties, kwargs), "ShowRootNodeLines", True) 285 292 kwargs["ShowRootNodeLines"] = val 293 if val: 294 style = style | wx.TR_LINES_AT_ROOT 286 295 287 296 preClass = wx.PreTreeCtrl 288 dcm.dControlMixin.__init__(self, preClass, parent, properties, 297 dcm.dControlMixin.__init__(self, preClass, parent, properties, style=style, 289 298 *args, **kwargs) 290 299 branches/stable/dabo/ui/uiwx/uiApp.py
r2521 r2683 267 267 # Now we can work with the rest 268 268 orphans = [frm for frm in frms 269 if frm.Parent is not self.dApp.MainForm] 269 if frm.Parent is not self.dApp.MainForm 270 and frm is not self.dApp.MainForm] 270 271 for orphan in orphans: 271 272 orphan.close()
