Changeset 2683

Show
Ignore:
Timestamp:
01/15/2007 01:27:41 PM (2 years ago)
Author:
paul
Message:

Applied recent bugfixes to dabo-stable, wrote up ChangeLog? entries, and
bumped the version number. Please test your apps against dabo-stable, and
speak up if you find anything amiss.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/stable/ChangeLog

    r2489 r2683  
    11See the Subversion log for all the details. 
     2 
     3=============================================================================== 
     4Dabo 0.7.2 (2007-01-15) (Revision 2683): 
     5 
     6Additions, all minor, backported to stable only to keep compatibility with the  
     7stable 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 
     12Bug 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 
    236 
    337=============================================================================== 
  • branches/stable/dabo/__version__.py

    r2489 r2683  
    22# Everything else is boilerplate copied also to other dabo repositories. 
    33package_name = "dabo" 
    4 _version = "0.7.1s" 
     4_version = "0.7.2s" 
    55 
    66 
  • branches/stable/dabo/db/dbFirebird.py

    r2323 r2683  
    1212        self.fieldPat = re.compile("([A-Za-z_][A-Za-z0-9-_]+)\.([A-Za-z_][A-Za-z0-9-_]+)") 
    1313        import kinterbasdb 
    14         kinterbasdb.init(type_conv=200) 
     14        if not kinterbasdb.initialized: 
     15            kinterbasdb.init(type_conv=200) 
    1516        self.dbapi = kinterbasdb 
    1617 
  • branches/stable/dabo/lib/datanav/Form.py

    r2552 r2683  
    385385 
    386386    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 
    387391        if self.preview: 
    388392            # Just previewing  
     
    399403 
    400404            def addControls(self): 
    401                 self.addObject(dabo.ui.dRadioGroup, RegID="radMode",  
     405                self.addObject(dabo.ui.dRadioList, RegID="radMode",  
    402406                        Caption="Mode", 
    403407                        Orientation="Row",  
     
    407411                        SaveRestoreValue=True) 
    408412                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",  
    411416                        Caption="Report On", 
    412417                        Orientation="Row",  
     
    417422                        SaveRestoreValue=True) 
    418423                self.Sizer.append1x(self.radRecords) 
     424                self.Sizer.appendSpacer(12) 
    419425 
    420426                self.addObject(dabo.ui.dButton, RegID="btnAdvanced", Caption="Advanced") 
    421                 self.Sizer.append(self.btnAdvanced
     427                self.Sizer.append(self.btnAdvanced, halign="center"
    422428                self.btnAdvanced.bindEvent(dEvents.Hit, self.onAdvanced) 
    423429 
     
    427433                        "'yes', you'll be able to modify the file and it will be used " 
    428434                        "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): 
    431437                    self.saveNamedReportForm = True 
    432438 
  • branches/stable/dabo/lib/datanav/Page.py

    r2459 r2683  
    286286                    if isinstance(ctrl, dabo.ui.dDateTextBox): 
    287287                        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"),  
    289289                                padl(dtTuple[2], 2, "0") ) 
    290290                    else: 
  • branches/stable/dabo/ui/dDataControlMixinBase.py

    r2521 r2683  
    155155            oldVal = self._oldVal 
    156156        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. 
    157161            oldVal = None 
    158162        if curVal is None or curVal != oldVal: 
  • branches/stable/dabo/ui/dialogs/about.py

    r2274 r2683  
    6666 
    6767        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}) 
    6973        ds.append({"name": "Python Version:", "value": "%s on %s"  
    7074                % (sys.version.split()[0], sys.platform)}) 
  • branches/stable/dabo/ui/dialogs/htmlAbout.py

    r2481 r2683  
    5050 
    5151        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}) 
    5357        ds.append({"name": "Python Version:", "value": "%s on %s" 
    5458                % (sys.version.split()[0], sys.platform)}) 
     
    7074 
    7175 
    72     def getInfoString(self): 
     76    def getInfoString(self, useHTML=True): 
    7377        """Return app information as a string.""" 
    7478        ds = self.getInfoDataSet() 
     
    7781            lines.append("%s %s" % (r["name"], r["value"])) 
    7882 
    79         eol = "<br>\n" 
     83        eol = {True: "<br>\n", False: "\n"}[useHTML] 
    8084 
    8185        return eol.join(lines) 
     
    9296    def onCopyInfo(self, evt): 
    9397        """Copy the system information to the Clipboard""" 
    94         self.Application.copyToClipboard(self.htmlBox.Source
     98        self.Application.copyToClipboard(self.getInfoString(useHTML=False)
    9599 
    96100 
  • branches/stable/dabo/ui/uiwx/dControlItemMixin.py

    r2322 r2683  
     1import wx 
     2import dabo 
     3import dabo.dEvents as dEvents 
    14from dDataControlMixin import dDataControlMixin 
    25from dabo.dLocalize import _ 
    3 import wx 
    4 import dabo 
    56from dabo.ui import makeDynamicProperty 
    67 
     
    1718 
    1819         
     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     
    1929    def appendItem(self, txt, select=False): 
    2030        """ Adds a new item to the end of the list """ 
  • branches/stable/dabo/ui/uiwx/dMenuItem.py

    r2521 r2683  
    1515        preClass = wx.MenuItem 
    1616        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         
    1724        pm.dPemMixin.__init__(self, preClass, parent, properties, *args, **kwargs) 
    1825 
     
    4855        if self._constructed(): 
    4956            ## 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 = " " 
    5262            self.SetText(val) 
    5363        else: 
  • branches/stable/dabo/ui/uiwx/dToggleButton.py

    r2521 r2683  
    3333        dim.dImageMixin.__init__(self) 
    3434        dcm.dDataControlMixin.__init__(self, preClass, parent, properties, *args, **kwargs) 
    35          
    3635        self.Bind(wx.EVT_BUTTON, self.__onButton) 
    3736     
    3837     
    3938    def __onButton(self, evt): 
     39        self.flushValue() 
    4040        self.raiseEvent(dEvents.Hit, evt) 
    4141 
  • branches/stable/dabo/ui/uiwx/dTreeView.py

    r2522 r2683  
    272272        self.nodes = [] 
    273273         
     274        style = self._extractKey((properties, kwargs), "style", 0) 
    274275        # Default to showing buttons 
    275276        val = self._extractKey((properties, kwargs), "ShowButtons", True) 
     277        if val: 
     278            style = style | wx.TR_HAS_BUTTONS 
    276279        kwargs["ShowButtons"] = val 
    277280        # Default to showing lines 
    278281        val = self._extractKey((properties, kwargs), "ShowLines", True) 
    279282        kwargs["ShowLines"] = val 
     283        if not val: 
     284            style = style | wx.TR_NO_LINES 
    280285        # Default to showing root node 
    281286        val = self._extractKey((properties, kwargs), "ShowRootNode", True) 
    282287        kwargs["ShowRootNode"] = val 
     288        if not val: 
     289            style = style | wx.TR_HIDE_ROOT 
    283290        # Default to showing root node lines 
    284291        val = self._extractKey((properties, kwargs), "ShowRootNodeLines", True) 
    285292        kwargs["ShowRootNodeLines"] = val 
     293        if val: 
     294            style = style | wx.TR_LINES_AT_ROOT 
    286295 
    287296        preClass = wx.PreTreeCtrl 
    288         dcm.dControlMixin.__init__(self, preClass, parent, properties,  
     297        dcm.dControlMixin.__init__(self, preClass, parent, properties, style=style, 
    289298                *args, **kwargs) 
    290299         
  • branches/stable/dabo/ui/uiwx/uiApp.py

    r2521 r2683  
    267267            # Now we can work with the rest 
    268268            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] 
    270271            for orphan in orphans: 
    271272                orphan.close()