Merge lp:~seb128/software-center/gtk-has-icon into lp:software-center

Proposed by Sebastien Bacher
Status: Merged
Approved by: Michael Vogt
Approved revision: 3325
Merged at revision: 3327
Proposed branch: lp:~seb128/software-center/gtk-has-icon
Merge into: lp:software-center
Diff against target: 13 lines (+2/-1)
1 file modified
softwarecenter/ui/gtk3/models/appstore2.py (+2/-1)
To merge this branch: bzr merge lp:~seb128/software-center/gtk-has-icon
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Marc Deslauriers (community) Approve
Review via email: mp+261867@code.launchpad.net

Commit message

GtkIcon has_icon doesn't work in standard directories, use lookup_icon
instead, should fix invalid icons being displayed in the packages list
(lp: #1464722)

Description of the change

GtkIcon has_icon doesn't work in standard directories, use lookup_icon
instead, should fix invalid icons being displayed in the packages list
(lp: #1464722)

To post a comment you must log in.
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Looks good, and works.

review: Approve
Revision history for this message
Michael Vogt (mvo) wrote :

You rock!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/ui/gtk3/models/appstore2.py'
2--- softwarecenter/ui/gtk3/models/appstore2.py 2012-12-14 16:44:25 +0000
3+++ softwarecenter/ui/gtk3/models/appstore2.py 2015-06-12 16:10:51 +0000
4@@ -236,7 +236,8 @@
5 # is called *a lot*. caching is the only option
6
7 # look for the icon on the iconpath
8- if self.icons.has_icon(icon_name):
9+ iconinfo = self.icons.lookup_icon(icon_name, self.icon_size, 0)
10+ if iconinfo:
11 icon = self.icons.load_icon(icon_name, self.icon_size, 0)
12 if icon:
13 self.icon_cache[icon_name] = icon