~gary-lasker/software-center/handle-trans-cancel-lp1027209-for-5.2

« back to all changes in this revision

Viewing changes to softwarecenter/utils.py

  • Committer: Michael Vogt
  • Date: 2012-07-18 15:20:39 UTC
  • mfrom: (3043.4.16 5.2)
  • Revision ID: michael.vogt@ubuntu.com-20120718152039-d0ejg5nxqkrdn0xc
mergedĀ lp:~gary-lasker/software-center/unity-launcher-integration-fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
430
430
        if os.path.exists(installed_desktop_file_path):
431
431
            return installed_desktop_file_path
432
432
    # lastly, just try checking directly for the desktop file based on the
433
 
    # pkgname itself
 
433
    # pkgname itself for the case of for-purchase items, etc.
434
434
    if pkgname:
435
435
        installed_desktop_file_path = "/usr/share/applications/%s.desktop" %\
436
436
            pkgname
437
437
        if os.path.exists(installed_desktop_file_path):
438
438
            return installed_desktop_file_path
 
439
        # files in the extras archive have their desktop filenames prepended
 
440
        # by "extras-", so we check for that also (LP: #1012877)
 
441
        extras_desktop_file_path = ("/usr/share/applications/"
 
442
            "extras-%s.desktop" % pkgname)
 
443
        if os.path.exists(extras_desktop_file_path):
 
444
            return extras_desktop_file_path
439
445
    LOG.warn("Could not determine the installed desktop file path for "
440
446
             "app-install desktop file: '%s'" % app_install_data_file_path)
441
447
    return ""