~mvo/software-center/purchaseviewspinner

« back to all changes in this revision

Viewing changes to softwarecenter/distro/Debian.py

  • Committer: Michael Forrest
  • Date: 2010-03-04 17:50:16 UTC
  • mfrom: (626 trunk)
  • mto: This revision was merged to the branch mainline in revision 631.
  • Revision ID: michaelforrest@mikebuntu-20100304175016-fp4jjg5evdn107bi
updated design of home screen

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
                break
65
65
        return (primary, button_text)
66
66
 
67
 
    def get_rdepends_text(self, cache, pkg, appname):
 
67
    def get_installation_status(self, cache, pkg, appname):
68
68
        s = ""
69
69
        if pkg.installed:
70
70
            # generic message
71
 
            s = _("%s is installed on this computer.") % appname
72
 
            # show how many packages on the system depend on this
73
 
            installed_rdeps = cache.get_installed_rdepends(pkg)
74
 
            installed_rrecommends = cache.get_installed_rrecommends(pkg)
75
 
            installed_rsuggests = cache.get_installed_rsuggests(pkg)
76
 
            if len(installed_rdeps) > 0:
77
 
                s += " "
78
 
                s += gettext.ngettext(
79
 
                    "It is used by %s piece of installed software.",
80
 
                    "It is used by %s pieces of installed software.",
81
 
                    len(installed_rdeps)) % len(installed_rdeps)
82
 
            elif len(installed_rrecommends) > 0:
83
 
                s += " "
84
 
                s += gettext.ngettext(
85
 
                    "It is recommended by %s piece of installed software.",
86
 
                    "It is recommended by %s pieces of installed software.",
87
 
                    len(installed_rrecommends)) % len(installed_rrecommends)
88
 
            elif len(installed_rsuggests) > 0:
89
 
                s += " "
90
 
                s += gettext.ngettext(
91
 
                    "It is suggested by %s piece of installed software.",
92
 
                    "It is suggested by %s pieces of installed software.",
93
 
                    len(installed_rrecommends)) % len(installed_rrecommends)
 
71
            s = _("Installed")
 
72
            # In future, say "Installed since $date"
94
73
        return s
95
74
 
96
75
    def get_distro_codename(self):