~evfool/software-center/lp626037

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/views/appdetailsview.py

  • Committer: Gary Lasker
  • Date: 2012-05-08 04:57:33 UTC
  • mfrom: (2989.2.8 5.2)
  • Revision ID: gary.lasker@canonical.com-20120508045733-56izfccd4hj3fcvv
merge the 5.2 branch lp:software-center/5.2 to grab the current set of fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
2024
2024
              self.app_details.pkg_state == PkgStates.INSTALLED and
2025
2025
              not self.addons_manager.addons_to_install and
2026
2026
              not self.addons_manager.addons_to_remove):
2027
 
            pkg = self.cache[self.app_details.pkgname].installed
2028
 
            install_size = GLib.format_size(pkg.installed_size)
2029
 
            # FIXME: this is not really a good indication of the size on disk
2030
 
            label_string += _("%s on disk") % (install_size)
 
2027
            pkg_version = self.cache[self.app_details.pkgname].installed
 
2028
            # we may not always get a pkg_version returned (LP: #870822),
 
2029
            # in that case, we'll just have to display "Unknown"
 
2030
            if pkg_version:
 
2031
                install_size = GLib.format_size(pkg_version.installed_size)
 
2032
                # FIXME: this is not really a good indication of the size
 
2033
                # on disk
 
2034
                label_string += _("%s on disk") % (install_size)
2031
2035
        elif total_install_size < 0:
2032
2036
            remove_size = GLib.format_size(-total_install_size)
2033
2037
            label_string += _("%s to be freed") % (remove_size)