Merge lp:~mhr3/unity-lens-applications/force-small-icons-for-suggestions into lp:unity-lens-applications

Proposed by Michal Hruby on 2012-10-12
Status: Merged
Approved by: Paweł Stołowski on 2012-10-16
Approved revision: 311
Merged at revision: 314
Proposed branch: lp:~mhr3/unity-lens-applications/force-small-icons-for-suggestions
Merge into: lp:unity-lens-applications
Diff against target: 21 lines (+3/-1)
1 file modified
src/daemon.vala (+3/-1)
To merge this branch: bzr merge lp:~mhr3/unity-lens-applications/force-small-icons-for-suggestions
Reviewer Review Type Date Requested Status
Paweł Stołowski 2012-10-12 Approve on 2012-10-16
PS Jenkins bot continuous-integration Pending
Review via email: mp+129399@code.launchpad.net

Commit message

Force small icons for "More suggestions" category

Description of the change

Force small icons for "More suggestions" category.

To post a comment you must log in.
Paweł Stołowski (stolowski) wrote :

I think it became too obscure with previously added use_small_icon. Plus this code is now misleading:

 // magazines need to use large icons
 bool use_small_icon = app.desktop_file.has_suffix (".desktop");
 var annotated_icon = get_annotated_icon (app_icon,
                          pinfo.formatted_price,
                          pinfo.paid,
                          use_small_icon);

Do we really need a new property (that is always true anyway)? Why not just control this by unconditional use_small_icon=true (i.e. no check for .desktop extension)?

review: Needs Fixing
Michal Hruby (mhr3) wrote :

Because the original behavior is "correct", once software center provides icons with sufficient resolution we'll want to use the the original version.

Paweł Stołowski (stolowski) wrote :

Based on the discussion on IRC, once S-C provides correct icons, we'll rely on the .desktop condition, and force flag will be set to false. Approving.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/daemon.vala'
2--- src/daemon.vala 2012-09-27 08:38:36 +0000
3+++ src/daemon.vala 2012-10-12 11:54:19 +0000
4@@ -119,6 +119,7 @@
5
6 public bool display_recent_apps { get; set; default = true; }
7 public bool display_available_apps { get; set; default = true; }
8+ public bool force_small_icons_for_suggestions { get; set; default = true; }
9
10 private PurchaseInfoHelper purchase_info = null;
11
12@@ -941,7 +942,8 @@
13 {
14 annotated_icon.ribbon = _("Free");
15 }
16- if (use_small_icon || app_icon.to_string () == GENERIC_APP_ICON)
17+ if (force_small_icons_for_suggestions || use_small_icon
18+ || app_icon.to_string () == GENERIC_APP_ICON)
19 {
20 annotated_icon.size_hint = IconSizeHint.SMALL;
21 }

Subscribers

People subscribed via source and target branches