[gnome-software/wip/rancell/paid] Fix GsPrice initialization
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/rancell/paid] Fix GsPrice initialization
- Date: Thu, 5 May 2016 04:45:20 +0000 (UTC)
commit ee8726120d8d1f1c690a148942d9a66f7d0e1595
Author: Robert Ancell <robert ancell canonical com>
Date: Thu May 5 16:45:12 2016 +1200
Fix GsPrice initialization
src/gs-price.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-price.c b/src/gs-price.c
index f9bc392..f178b88 100644
--- a/src/gs-price.c
+++ b/src/gs-price.c
@@ -90,7 +90,7 @@ gchar *
gs_price_to_string (GsPrice *price)
{
g_return_val_if_fail (GS_IS_PRICE (price), NULL);
-
+
if (g_strcmp0 (price->currency, "AUD") == 0) {
return g_strdup_printf (_("A$%u"), price->amount);
} else if (g_strcmp0 (price->currency, "CAD") == 0) {
@@ -202,7 +202,7 @@ GsPrice *
gs_price_new (guint amount, const gchar *currency)
{
GsPrice *price;
- price = g_object_new (GS_TYPE_PRICE, NULL);
+ 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]