Ronald Oussoren avatar Ronald Oussoren committed 221b408

Make the details view a tabbed view, the second page contains the list
of prerequisites

Comments (0)

Files changed (4)


                 itemStatus = NSTextField; 
                 overwrite = id; 
                 packageTable = NSTableView; 
+                prerequisitesTable = id; 
                 progressOK = id; 
                 showHidden = id; 
                 verbose = id; 


+		<integer>89</integer>
-		<integer>89</integer>
 	<key>IBSystem Version</key>
Add a comment to this file


Binary file modified.


     def setDB(self, pimpURL, pimpDB):
         self.pimp = pimpDB
         self._packages = pimpDB.list()
+        self._prerequisites = []
         if self.databaseName is not None:
             setString(self.itemInstalled, None)
+            self._prerequisites = []
+            self.prerequisitesTable.reloadData()
             # Update the detail view
             setString(self.itemInstalled, status)
             setString(self.itemStatus, msg)
+            self._prerequisites = package.prerequisites()
+            self.prerequisitesTable.reloadData()
     def addToFavorites_(self, sender):
         appdel = NSApplication.sharedApplication().delegate()
     def numberOfRowsInTableView_(self, view):
         if not hasattr(self, 'pimp') or self.pimp is None:
             return 0
-        return len(self._packages)
+        if view is self.packageTable:
+            return len(self._packages)
+        else:
+            return len(self._prerequisites)
     def tableView_objectValueForTableColumn_row_(self, view, col, row):
         colname = col.identifier()
-        package = self._packages[row]
+        if view is self.packageTable:
+            package = self._packages[row]
+            shortdescription = None
+        else:
+            package, shortdescription = self._prerequisites[row]
         if colname == 'installed':
             # XXX: Nicer formatting
         return getattr(package, colname)()
     def tableView_sortDescriptorsDidChange_(self, view, oldDescriptors):
-        self.sortPackages()
+        if view is self.packageTable:
+            self.sortPackages()
     def sortPackages(self):
         Update the input fields to show the current item.
         row = self.favoritesTable.selectedRow()
         if row == -1:
     def numberOfRowsInTableView_(self, view):
         We're the datasource for the favorites list in the Favorites panel
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.