Merged modifications from the 2.6 branch

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2005-12-30 23:02:03 +00:00
parent a780a8dc19
commit 02b800ce7c
104 changed files with 14102 additions and 46560 deletions

View File

@@ -11,37 +11,45 @@
#----------------------------------------------------------------------------
import wx
from IDE import ACTIVEGRID_BASE_IDE, getSplashBitmap
import os.path
from IDE import ACTIVEGRID_BASE_IDE, getSplashBitmap, getIDESplashBitmap
import activegrid.util.sysutils as sysutilslib
_ = wx.GetTranslation
#----------------------------------------------------------------------------
# Package License Data for AboutDialog
# Package, License, URL
# If no information is available, put a None as a place holder.
#
# NO GPL Allowed. Only LGPL, BSD, and Public Domain Based Licenses!
#----------------------------------------------------------------------------
licenseData = [
("ActiveGrid", "ASL 2.0", "http://apache.org/licenses/LICENSE-2.0"),
("Python 2.3", "Python Software Foundation License", "http://www.python.org/2.3/license.html"),
("wxPython 2.5", "wxWidgets 2 - LGPL", "http://wxwidgets.org/newlicen.htm"),
("wxWidgets", "wxWindows Library License 3", "http://www.wxwidgets.org/manuals/2.5.4/wx_wxlicense.html"),
licenseData = [ # add licenses for base IDE features
("ActiveGrid", "Apache License, Version 2.0", "http://apache.org/licenses/LICENSE-2.0"),
("Python 2.4", "Python Software Foundation License", "http://www.python.org/2.4/license.html"),
("wxPython 2.6", "wxWidgets 2 - LGPL", "http://wxwidgets.org/newlicen.htm"),
("wxWidgets", "wxWindows Library License 3", "http://www.wxwidgets.org/manuals/2.6.1/wx_wxlicense.html"),
("pychecker", "MetaSlash - BSD", "http://pychecker.sourceforge.net/COPYRIGHT"),
("process.py", "See file", "http://starship.python.net/~tmick/"),
("pysvn", "Apache License", "http://pysvn.tigris.org/"),
("pysvn", "Apache License, Version 2.0", "http://pysvn.tigris.org/"),
]
if not ACTIVEGRID_BASE_IDE: # add licenses for database connections only if not the base IDE
if not ACTIVEGRID_BASE_IDE: # add licenses for non-base IDE features such as database connections
licenseData += [
("pydb2", "LGPL", "http://sourceforge.net/projects/pydb2"),
("pysqlite", "Python License (CNRI)", "http://sourceforge.net/projects/pysqlite"),
("mysql-python", "GPL, Python License (CNRI), Zope Public License", "http://sourceforge.net/projects/mysql-python"),
("cx_Oracle", "Computronix", "http://http://www.computronix.com/download/License(cxOracle).txt"),
("cx_Oracle", "Computronix", "http://www.computronix.com/download/License(cxOracle).txt"),
("SQLite", "Public Domain", "http://www.sqlite.org/copyright.html"),
("PyGreSQL", "BSD", "http://www.pygresql.org"),
("pyXML", "CNRI Python License", "http://sourceforge.net/softwaremap/trove_list.php?form_cat=194"),
("Zolera Soap Infrastructure", "Zope Public License 2.0", "http://www.zope.org/Resources/License/"),
("Sarissa", "LGPL", "http://sourceforge.net/projects/sarissa/"),
("Dynarch DHTML Calendar", "LGPL", "http://www.dynarch.com/projects/calendar/"),
]
if wx.Platform == '__WXMSW__':
if wx.Platform == '__WXMSW__': # add Windows only licenses
licenseData += [("pywin32", "Python Software Foundation License", "http://sourceforge.net/projects/pywin32/")]
class AboutDialog(wx.Dialog):
@@ -56,10 +64,25 @@ class AboutDialog(wx.Dialog):
aboutPage = wx.Panel(nb, -1)
sizer = wx.BoxSizer(wx.VERTICAL)
splash_bmp = getSplashBitmap()
if not ACTIVEGRID_BASE_IDE:
splash_bmp = getSplashBitmap()
else:
splash_bmp = getIDESplashBitmap()
# find version number from
versionFilepath = os.path.join(sysutilslib.mainModuleDir, "version.txt")
if os.path.exists(versionFilepath):
versionfile = open(versionFilepath, 'r')
versionLines = versionfile.readlines()
versionfile.close()
version = "".join(versionLines)
else:
version = _("Version Unknown - %s not found" % versionFilepath)
image = wx.StaticBitmap(aboutPage, -1, splash_bmp, (0,0), (splash_bmp.GetWidth(), splash_bmp.GetHeight()))
sizer.Add(image, 0, wx.ALIGN_CENTER|wx.ALL, 0)
sizer.Add(wx.StaticText(aboutPage, -1, wx.GetApp().GetAppName() + _("\nVersion 0.7 Early Access\n\nCopyright (c) 2003-2005 ActiveGrid Incorporated and Contributors. All rights reserved.")), 0, wx.ALIGN_LEFT|wx.ALL, 10)
sizer.Add(wx.StaticText(aboutPage, -1, wx.GetApp().GetAppName() + _("\n%s\n\nCopyright (c) 2003-2005 ActiveGrid Incorporated and Contributors. All rights reserved.") % version), 0, wx.ALIGN_LEFT|wx.ALL, 10)
sizer.Add(wx.StaticText(aboutPage, -1, _("http://www.activegrid.com")), 0, wx.ALIGN_LEFT|wx.LEFT|wx.BOTTOM, 10)
aboutPage.SetSizer(sizer)
nb.AddPage(aboutPage, _("Copyright"))
@@ -78,12 +101,16 @@ class AboutDialog(wx.Dialog):
maxHeight = h
grid.SetColLabelSize(maxHeight + 6) # add a 6 pixel margin
maxW = 0
for row, data in enumerate(licenseData):
package = data[0]
license = data[1]
url = data[2]
if package:
grid.SetRowLabelValue(row, package)
w, h = dc.GetTextExtent(package)
if w > maxW:
maxW = w
if license:
grid.SetCellValue(row, 0, license)
if url:
@@ -95,8 +122,9 @@ class AboutDialog(wx.Dialog):
grid.EnableDragRowSize(False)
grid.SetRowLabelAlignment(wx.ALIGN_LEFT, wx.ALIGN_CENTRE)
grid.SetLabelBackgroundColour(wx.WHITE)
grid.AutoSizeColumn(0, 100)
grid.AutoSizeColumn(1, 100)
grid.AutoSizeColumn(0)
grid.AutoSizeColumn(1)
grid.SetRowLabelSize(maxW + 10)
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(grid, 1, wx.EXPAND|wx.ALL, 10)
licensePage.SetSizer(sizer)
@@ -104,7 +132,7 @@ class AboutDialog(wx.Dialog):
creditsPage = wx.Panel(nb, -1)
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(wx.StaticText(creditsPage, -1, _("ActiveGrid Development Team:\n\nLawrence Bruhmuller\nEric Chu\nMatt Fryer\nJoel Hare\nMorgan Hua\nAlan Mullendore\nJeff Norton\nKevin Wang\nPeter Yared")), 0, wx.ALIGN_LEFT|wx.ALL, 10)
sizer.Add(wx.StaticText(creditsPage, -1, _("ActiveGrid Development Team:\n\nLarry Abrahams\nLawrence Bruhmuller\nEric Chu\nBeth Fryer\nMatt Fryer\nJoel Hare\nMorgan Hua\nMatt McNulty\nPratik Mehta\nAlan Mullendore\nJeff Norton\nSimon Toens\nKevin Wang\nPeter Yared")), 0, wx.ALIGN_LEFT|wx.ALL, 10)
creditsPage.SetSizer(sizer)
nb.AddPage(creditsPage, _("Credits"))
@@ -114,7 +142,8 @@ class AboutDialog(wx.Dialog):
sizer.Add(btn, 0, wx.ALIGN_CENTRE|wx.ALL, 5)
self.SetSizer(sizer)
self.SetAutoLayout(True)
sizer.Fit(self)
self.Layout()
self.Fit()
grid.ForceRefresh() # wxBug: Get rid of unnecessary scrollbars