[gnome-software/wip/rancell/paid] Don't show price if already purchased



commit 7c91212ddabe4a9dddb3341dd54965126633c585
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri May 6 10:59:49 2016 +1200

    Don't show price if already purchased

 src/gs-app-row.c       |    2 +-
 src/gs-shell-details.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index e843b80..9d5354f 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -282,7 +282,7 @@ gs_app_row_refresh (GsAppRow *app_row)
        case AS_APP_STATE_AVAILABLE_LOCAL:
                gtk_widget_set_visible (priv->button, TRUE);
                prices = gs_app_get_prices (priv->app);
-               if (prices->len > 0) {
+               if (!gs_app_get_owned (priv->app) && prices->len > 0) {
                        GsPrice *price = g_ptr_array_index (prices, 0);
                        g_autofree gchar *text = NULL;
                        text = gs_price_to_string (price);
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 1881619..4a8b328 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -257,7 +257,7 @@ gs_shell_details_switch_to (GsPage *page, gboolean scroll_up)
                /* TRANSLATORS: button text in the header when an application
                 * can be installed */
                prices = gs_app_get_prices (self->app);
-               if (prices->len > 0) {
+               if (!gs_app_get_owned (self->app) && prices->len > 0) {
                        GsPrice *price = g_ptr_array_index (prices, 0);
                        g_autofree gchar *text = NULL;
                        text = gs_price_to_string (price);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]