dabo Commit
Revision 2600
Date: 2007-01-04 14:27:50 -0800 (Thu, 04 Jan 2007)
Author: Ed
Changed:
U trunk/dabo/ui/dialogs/about.py
U trunk/dabo/ui/dialogs/htmlAbout.py
Log:
Removed the <br> tags from the info that is copied to the clipboard.
Fixed a potentially bad app reference.
Diff:
Modified: trunk/dabo/ui/dialogs/about.py
===================================================================
--- trunk/dabo/ui/dialogs/about.py 2007-01-03 18:34:14 UTC (rev 2599)
+++ trunk/dabo/ui/dialogs/about.py 2007-01-04 22:27:50 UTC (rev 2600)
@@ -65,7 +65,11 @@
app = self.Application
ds = []
- ds.append({"name": "Platform:", "value": app.Platform})
+ if app:
+ plat = app.Platform
+ else:
+ plat = sys.platform
+ ds.append({"name": "Platform:", "value": plat})
ds.append({"name": "Python Version:", "value": "%s on %s"
% (sys.version.split()[0], sys.platform)})
if app:
Modified: trunk/dabo/ui/dialogs/htmlAbout.py
===================================================================
--- trunk/dabo/ui/dialogs/htmlAbout.py 2007-01-03 18:34:14 UTC (rev 2599)
+++ trunk/dabo/ui/dialogs/htmlAbout.py 2007-01-04 22:27:50 UTC (rev 2600)
@@ -53,7 +53,11 @@
app = self.Application
ds = []
- ds.append({"name": "Platform:", "value": app.Platform})
+ if app:
+ plat = app.Platform
+ else:
+ plat = sys.platform
+ ds.append({"name": "Platform:", "value": plat})
ds.append({"name": "Python Version:", "value": "%s on %s"
% (sys.version.split()[0], sys.platform)})
if app:
@@ -73,14 +77,14 @@
return ds
- def getInfoString(self):
+ def getInfoString(self, useHTML=True):
"""Return app information as a string."""
ds = self.getInfoDataSet()
lines = []
for r in ds:
lines.append("%s %s" % (r["name"], r["value"]))
- eol = "<br>\n"
+ eol = {True: "<br>\n", False: "\n"}[useHTML]
return eol.join(lines)
@@ -95,8 +99,7 @@
def onCopyInfo(self, evt):
"""Copy the system information to the Clipboard"""
-# self.Application.copyToClipboard(self.htmlBox.Source)
- self.Application.copyToClipboard(self.getInfoString())
+
self.Application.copyToClipboard(self.getInfoString(useHTML=False))
def onClear(self, evt):
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev