dabo Commit
Revision 2480
Date: 2006-11-19 07:46:51 -0800 (Sun, 19 Nov 2006)
Author: ed

Changed:
U   branches/wx2.7/dabo/dApp.py
U   branches/wx2.7/dabo/ui/dialogs/htmlAbout.py
U   branches/wx2.7/dabo/ui/uiwx/__init__.py

Log:
Changed the 'About' to use the HTML version

Spruced up the htmlAbout display a bit.

Added the splitter fix to this branch.


Diff:
Modified: branches/wx2.7/dabo/dApp.py
===================================================================
--- branches/wx2.7/dabo/dApp.py 2006-11-19 15:01:44 UTC (rev 2479)
+++ branches/wx2.7/dabo/dApp.py 2006-11-19 15:46:51 UTC (rev 2480)
@@ -575,11 +575,11 @@
                
 
        def onHelpAbout(self, evt):
-               import dabo.ui.dialogs.about as about
+               from dabo.ui.dialogs.htmlAbout import HtmlAbout as about
                frm = self.ActiveForm
                if frm is None:
                        frm = self.MainForm
-               dlg = about.About(frm)
+               dlg = about(frm)
                dlg.show()
        
        

Modified: branches/wx2.7/dabo/ui/dialogs/htmlAbout.py
===================================================================
--- branches/wx2.7/dabo/ui/dialogs/htmlAbout.py 2006-11-19 15:01:44 UTC (rev 
2479)
+++ branches/wx2.7/dabo/ui/dialogs/htmlAbout.py 2006-11-19 15:46:51 UTC (rev 
2480)
@@ -7,6 +7,7 @@
 import dabo.dEvents as dEvents
 from dabo.dLocalize import _
 
+
 class HtmlAbout(dabo.ui.dDialog):
        def initProperties(self):
                self.AutoSize = True
@@ -18,13 +19,14 @@
                self.bindKey("enter", self.onClear)
 
        def addControls(self):
-               pnlBack = dabo.ui.dPanel(self, BackColor="#DEDEF5")
+               pnlBack = dabo.ui.dPanel(self, BackColor="cornflowerblue")
                self.Sizer.append1x(pnlBack)
                pnlBack.Sizer = sz = dabo.ui.dSizer("v")
 
                self.htmlBox = dabo.ui.dHtmlBox(self)
                self.htmlBox.Size = (400,300)
-               sz.append1x(self.htmlBox, halign="center", valign="center")
+               sz.append1x(self.htmlBox, halign="center", valign="center",
+                               border=30)
 
                # Copy info
                btnCopy = dabo.ui.dButton(pnlBack, Caption=_("Copy Info"))
@@ -40,7 +42,9 @@
 
 
        def writeHtmlPage(self):
-               return self.pageData().replace("[DocString]", 
self.getAppSpecificString()).replace("[AppInfo]", self.getInfoString())
+               appinfo = self.getInfoString()
+               docstring = self.getAppSpecificString()
+               return self.getPageData() % locals()
 
 
        def getInfoDataSet(self):
@@ -91,7 +95,8 @@
 
        def onCopyInfo(self, evt):
                """Copy the system information to the Clipboard"""
-               self.Application.copyToClipboard(self.htmlBox.Source)
+#              self.Application.copyToClipboard(self.htmlBox.Source)
+               self.Application.copyToClipboard(self.getInfoString())
 
 
        def onClear(self, evt):
@@ -100,23 +105,17 @@
        def onClose(self, evt=None):
                self.release()
 
-       def pageData(self):
+       def getPageData(self):
                """Basic Template structure of the About box."""
-               return """<html>
-       <body bgcolor="#DEDEF5">
-               <h1>
-               <b>Dabo</b>
-               </h1>
-
-               <p>
-               [AppInfo]
-               </p>
-
-               <p>
-               [DocString]
-               </p>
+               return """
+<html>
+       <body bgcolor="#DDDDFF">
+               <h1 align="center"><b>Dabo</b></h1>
+               <p>%(appinfo)s</p>
+               <p>%(docstring)s</p>
        </body>
-</html>"""
+</html>
+"""
 
 
 def main():

Modified: branches/wx2.7/dabo/ui/uiwx/__init__.py
===================================================================
--- branches/wx2.7/dabo/ui/uiwx/__init__.py     2006-11-19 15:01:44 UTC (rev 
2479)
+++ branches/wx2.7/dabo/ui/uiwx/__init__.py     2006-11-19 15:46:51 UTC (rev 
2480)
@@ -403,7 +403,7 @@
                        ed["sashPosition"] = wxEvt.GetSashPosition()
                except:
                        ed["sashPosition"] = wxEvt.GetEventObject().SashPosition
-               if hasattr(wxEvt, "GetWindowBeingRemoved"):
+               if wxEvt.GetEventType() == wx.EVT_SPLITTER_UNSPLIT.evtType[0]:
                        try:
                                ed["windowRemoved"] = 
wxEvt.GetWindowBeingRemoved()
                        except:




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to