Merge lp:~stolowski/unity-lens-applications/use-raw-price into lp:unity-lens-applications

Proposed by Paweł Stołowski
Status: Merged
Approved by: Michal Hruby
Approved revision: 297
Merged at revision: 296
Proposed branch: lp:~stolowski/unity-lens-applications/use-raw-price
Merge into: lp:unity-lens-applications
Diff against target: 32 lines (+3/-1)
2 files modified
src/daemon.vala (+1/-1)
src/software-center-data-provider.vala (+2/-0)
To merge this branch: bzr merge lp:~stolowski/unity-lens-applications/use-raw-price
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
Review via email: mp+123024@code.launchpad.net

Commit message

Use raw_price instead of price to check if it's a commercial or free application; this impacts preview action buttons and how installation is handled (free apps are installed directly via apt-daemon, commercial apps are handled by SoftwareCenter).

Description of the change

Use raw_price instead of price to check if it's a commercial or free application; this impacts preview action buttons and how installation is handled (free apps are installed directly via apt-daemon, commercial apps are handled by SoftwareCenter).

To post a comment you must log in.
297. By Paweł Stołowski

Check raw_price for null.

Revision history for this message
Michal Hruby (mhr3) wrote :

+1

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-05 14:54:07 +0000
3+++ src/daemon.vala 2012-09-06 14:17:40 +0000
4@@ -1235,7 +1235,7 @@
5 {
6
7 Unity.PreviewAction install_action = null;
8- if (sc_data_provider.price == "")
9+ if (sc_data_provider.raw_price == null || sc_data_provider.raw_price == "")
10 {
11 install_action = new Unity.PreviewAction ("install", _("Free Download"), null);
12 install_action.activated.connect (app_preview_install);
13
14=== modified file 'src/software-center-data-provider.vala'
15--- src/software-center-data-provider.vala 2012-08-15 16:03:14 +0000
16+++ src/software-center-data-provider.vala 2012-09-06 14:17:40 +0000
17@@ -46,6 +46,7 @@
18 public string license { get; set; }
19 public string icon { get; set; }
20 public string price { get; set; }
21+ public string raw_price { get; set; }
22 public PackageState pkg_state { get; set; }
23 public string installation_date { get; set; }
24 public string website { get; set; }
25@@ -82,6 +83,7 @@
26 license = data["license"].get_string ();
27 icon = data["icon_file_name"].get_string ();
28 price = data["price"].get_string ();
29+ raw_price = data["raw_price"].get_string ();
30 installation_date = data["installation_date"].get_string ();
31 website = data["website"].get_string ();
32 hardware_requirements = data["hardware_requirements"].get_string ();

Subscribers

People subscribed via source and target branches