[gnome-software/wip/rancell/paid] Fix price amount property definition



commit f05fa30186505db7976bdbcce3b70b1024a3b904
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri May 6 11:40:11 2016 +1200

    Fix price amount property definition

 src/gs-price.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/gs-price.c b/src/gs-price.c
index 5cd5402..69ac267 100644
--- a/src/gs-price.c
+++ b/src/gs-price.c
@@ -175,7 +175,7 @@ gs_price_class_init (GsPriceClass *klass)
         * GsApp:amount:
         */
        pspec = g_param_spec_double ("amount", NULL, NULL,
-                                    G_MINDOUBLE, G_MAXDOUBLE, 0.0,
+                                    0.0, G_MAXDOUBLE, 0.0,
                                     G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
        g_object_class_install_property (object_class, PROP_AMOUNT, pspec);
 
@@ -202,9 +202,7 @@ GsPrice *
 gs_price_new (gdouble amount, const gchar *currency)
 {
        GsPrice *price;
-       price = g_object_new (GS_TYPE_PRICE, NULL);
-       gs_price_set_amount (price, amount);
-       gs_price_set_currency (price, currency);
+       price = g_object_new (GS_TYPE_PRICE, "amount", amount, "currency", currency, NULL);
        return GS_PRICE (price);
 }
 


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