[Python-checkins] python/dist/src/Mac/Tools/IDE PackageManager.py,1.10,1.11
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Thu, 29 May 2003 15:07:29 -0700
Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE
In directory sc8-pr-cvs1:/tmp/cvs-serv20960/Mac/Tools/IDE
Modified Files:
PackageManager.py
Log Message:
- Get the database from a different place.
- Added support for multi-line descriptions. Doesn't look nice
yet in Package Manager.
Index: PackageManager.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PackageManager.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** PackageManager.py 27 May 2003 14:10:37 -0000 1.10
--- PackageManager.py 29 May 2003 22:07:27 -0000 1.11
***************
*** 306,310 ****
status, _ = pkg.installed()
description = pkg.description()
! rv.append((status, name, description))
return rv
--- 306,311 ----
status, _ = pkg.installed()
description = pkg.description()
! description_line1 = description.split('\n')[0]
! rv.append((status, name, description_line1))
return rv
***************
*** 334,340 ****
def setupwidgets(self):
INSTALL_POS = -30
! STATUS_POS = INSTALL_POS - 70
! self.w = W.Window((580, 400), "Python Install Manager", minsize = (400, 200), tabbable = 0)
self.w.titlebar = W.TextBox((4, 8, 60, 18), 'Packages:')
self.w.hidden_button = W.CheckBox((-100, 4, 0, 18), 'Show Hidden', self.updatestatus)
--- 335,342 ----
def setupwidgets(self):
+ DESCRIPTION_HEIGHT = 140
INSTALL_POS = -30
! STATUS_POS = INSTALL_POS - (70 + DESCRIPTION_HEIGHT)
! self.w = W.Window((580, 600), "Python Install Manager", minsize = (400, 400), tabbable = 0)
self.w.titlebar = W.TextBox((4, 8, 60, 18), 'Packages:')
self.w.hidden_button = W.CheckBox((-100, 4, 0, 18), 'Show Hidden', self.updatestatus)
***************
*** 342,350 ****
self.w.packagebrowser = W.MultiList((4, 24, 0, STATUS_POS-2), data, self.listhit, cols=3)
! self.w.installed_l = W.TextBox((4, STATUS_POS, 60, 12), 'Installed:')
! self.w.installed = W.TextBox((64, STATUS_POS, 0, 12), '')
! self.w.message_l = W.TextBox((4, STATUS_POS+20, 60, 12), 'Status:')
! self.w.message = W.TextBox((64, STATUS_POS+20, 0, 12), '')
self.w.homepage_button = W.Button((4, STATUS_POS+40, 96, 18), 'View homepage', self.do_homepage)
self.w.divline = W.HorizontalLine((0, INSTALL_POS-4, 0, 0))
--- 344,354 ----
self.w.packagebrowser = W.MultiList((4, 24, 0, STATUS_POS-2), data, self.listhit, cols=3)
! self.w.installed_l = W.TextBox((4, STATUS_POS, 70, 12), 'Installed:')
! self.w.installed = W.TextBox((74, STATUS_POS, 0, 12), '')
! self.w.message_l = W.TextBox((4, STATUS_POS+20, 70, 12), 'Status:')
! self.w.message = W.TextBox((74, STATUS_POS+20, 0, 12), '')
self.w.homepage_button = W.Button((4, STATUS_POS+40, 96, 18), 'View homepage', self.do_homepage)
+ self.w.description_l = W.TextBox((4, STATUS_POS+70, 70, 12), 'Description:')
+ self.w.description = W.EditText((74, STATUS_POS+70, 0, DESCRIPTION_HEIGHT-4))
self.w.divline = W.HorizontalLine((0, INSTALL_POS-4, 0, 0))
***************
*** 356,359 ****
--- 360,364 ----
self.w.install_button = W.Button((4, INSTALL_POS+4, 56, 18), 'Install:', self.do_install)
self.w.open()
+ self.w.description.enable(0)
def updatestatus(self):
***************
*** 367,370 ****
--- 372,376 ----
self.w.install_button.enable(0)
self.w.homepage_button.enable(0)
+ self.w.description.set('')
self.w.verbose_button.enable(0)
self.w.recursive_button.enable(0)
***************
*** 379,382 ****
--- 385,392 ----
self.w.install_button.enable(installed != "yes" or self.w.force_button.get())
self.w.homepage_button.enable(not not self.packages[sel].homepage())
+ description = self.packages[sel].description()
+ description = description.split('\r\n')
+ description = '\r'.join(description)
+ self.w.description.set(description)
self.w.verbose_button.enable(1)
self.w.recursive_button.enable(1)