Padraig,
I have prepared new webrev which fixes this problem:
http://cr.opensolaris.org/~migi/6634_6978_7106_7109_v2

The change was:
  def __show_package_info(self, model, path, show_id):
          if not (model and path):
                  return
          itr = model.get_iter(path)

From:
  def __show_package_info(self, model, path, show_id):
          itr = model.get_iter(path)

Because we are showing the details for the user after the catalogs are loaded, when nothing is selected, then nothing should be shown.

The check for licenses was already in the place, so I didn't have to do the same thing in this situation. The license is not using the model and the path, that is why the check looked like:
  def __show_package_licenses(self, license_id):
          if self.selected_pkgstem == None:
                  gobject.idle_add(self.__update_package_license, None)
                  return

best
Michal


Padraig O'Briain wrote:
When I built and installed and ran it in a terminal window I got

bash-3.2$ pfexec packagemanager
Traceback (most recent call last):
 File "/usr/bin/packagemanager", line 1976, in __show_package_info
   itr = model.get_iter(path)
AttributeError: 'NoneType' object has no attribute 'get_iter'

Padraig

On 03/04/09 13:50, Michal Pryc wrote:
Hi,
The webrev is at:
  http://cr.opensolaris.org/~migi/6634_6978_7106_7109_v1/

Fixes:
6634 License information not displayed
The license was shown only for installed packages, so if the installed info object is None, then we are trying with the remote call.

6978 Details Panels should be cleared if package is no longer displayed
We should show the initial state of the details panel in certain cases, this webrev introduces new function to clear all details panels as discussed with xDesign.

7106 The pkg details and license should be shown after the catalogs are loaded. If the catalogs are not loaded and the user switches between packages, then we are firing many threads which causes quite big cpu usage. This fix makes sure that the catalogs are loaded and for the first time after the catalogs are loaded it shows the package info/license.

7109 Handle the EOFError when the cache is broken
 As described in the bug.

best
Michal Pryc

_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to