- Revision
- 11253
- Author
- bear
- Date
- 2006-07-25 12:28:59 -0700 (Tue, 25 Jul 2006)
Log Message
Adding platform identifier to the About Box
bug 6271, r=grant
bug 6271, r=grant
Modified Paths
Diff
Modified: branches/0.7alpha3/chandler/application/AboutBox.py (11252 => 11253)
--- branches/0.7alpha3/chandler/application/AboutBox.py 2006-07-25 18:08:50 UTC (rev 11252) +++ branches/0.7alpha3/chandler/application/AboutBox.py 2006-07-25 19:28:59 UTC (rev 11253) @@ -17,6 +17,7 @@ import wx, wx.html, os, sys from i18n import OSAFMessageFactory as _ import i18n +import Utility import Globals class AboutBox(wx.Dialog): @@ -106,13 +107,14 @@ replaceValues = { - "pix": _getRelImagePath("pixel.gif"), - "ab": _getRelImagePath("about.png"), - "ver": _("Version: %(versionNumber)s") % {"versionNumber": version}, - "abt": _("About Chandler"), - "ex": _("Experimentally usable calendar"), - "ch": _("Chandler"), - "osa": _("Open Source Applications Foundation"), + "pix": _getRelImagePath("pixel.gif"), + "ab": _getRelImagePath("about.png"), + "ver": _("Version: %(versionNumber)s") % {"versionNumber": version}, + "abt": _("About Chandler"), + "ex": _("Experimentally usable calendar"), + "plat": Utility.getPlatformName(), + "ch": _("Chandler"), + "osa": _("Open Source Applications Foundation"), "loc": _("For more info: %(chandlerWebURL)s") % \ {"chandlerWebURL": "<a href="" #This is a bummer the % in the width attribute was causing the @@ -138,6 +140,7 @@ <tr><td><center><font face="verdana, arial, helvetica, sans-serif" size="4" color="black"><strong>%(ch)s</strong></font></center></td></tr> <tr><td><img src="" width="1" height="15"></td></tr> <tr><td><center><font face="helvetica, arial, sans-serif" size="2" color="black">%(ver)s</font></center></td></tr> +<tr><td><center><font face="helvetica, arial, sans-serif" size="2" color="black">%(plat)s</font></center></td></tr> <tr><td><img src="" width="1" height="2"></td></tr> <tr><td><center><font face="helvetica, arial, sans-serif" size="2" color="black"> %(loc)s </font></center></td></tr> <tr><td><img src="" width="1" height="10"></td></tr>
Modified: branches/0.7alpha3/chandler/application/Utility.py (11252 => 11253)
--- branches/0.7alpha3/chandler/application/Utility.py 2006-07-25 18:08:50 UTC (rev 11252) +++ branches/0.7alpha3/chandler/application/Utility.py 2006-07-25 19:28:59 UTC (rev 11253) @@ -157,6 +157,26 @@ return desktopDir return homeDir +def getPlatformName(): + import platform + + platformName = 'Unknown' + + if os.name == 'nt': + platformName = 'Windows' + elif os.name == 'posix': + if sys.platform == 'darwin': + if platform.processor() == 'i386': + platformName = 'Mac OS X (intel)' + else: + platformName = 'Mac OS X (ppc)' + elif sys.platform == 'cygwin': + platformName = 'Windows (Cygwin)' + else: + platformName = 'Linux' + + return platformName + def initOptions(**kwds): """ Load and parse the command line options, with overrides in **kwds.
_______________________________________________ Commits mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/commits
