[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 7/331] Download reviews from Ubuntu reviews server



commit f353d3bd87ed089368b09ac28727b961e1b13704
Author: Robert Ancell <robert ancell canonical com>
Date:   Wed Dec 16 17:08:36 2015 +1300

    Download reviews from Ubuntu reviews server

 configure.ac             |    2 ++
 src/gs-app-review-row.ui |    4 +++-
 src/gs-app-review.c      |    5 +++--
 src/plugins/Makefile.am  |    6 ++++++
 4 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6dde092..4821584 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,6 +68,8 @@ PKG_CHECK_MODULES(SQLITE, sqlite3)
 PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.51.92)
 PKG_CHECK_MODULES(GSETTINGS_DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.11.5)
 PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-3.0 >= 3.17.92)
+PKG_CHECK_MODULES(POLKIT, polkit-gobject-1)
+PKG_CHECK_MODULES(JSON_GLIB, json-glib-1.0 >= 0.12)
 AC_PATH_PROG(APPSTREAM_UTIL, [appstream-util], [unfound])
 AC_ARG_ENABLE(man,
               [AS_HELP_STRING([--enable-man],
diff --git a/src/gs-app-review-row.ui b/src/gs-app-review-row.ui
index 179d2fa..8f850bb 100644
--- a/src/gs-app-review-row.ui
+++ b/src/gs-app-review-row.ui
@@ -1,13 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.10 -->
-  <template class="GsReviewWidget" parent="GtkListBoxRow">
+  <template class="GsAppReviewRow" parent="GtkListBoxRow">
     <property name="visible">True</property>
     <child>
       <object class="GtkGrid" id="grid">
         <property name="visible">True</property>
         <property name="row-spacing">12</property>
         <property name="column-spacing">12</property>
+        <property name="margin-top">12</property>
+        <property name="margin-bottom">12</property>
         <child>
           <object class="GsStarWidget" id="stars">
             <property name="visible">True</property>
diff --git a/src/gs-app-review.c b/src/gs-app-review.c
index fb27c1d..24ccad9 100644
--- a/src/gs-app-review.c
+++ b/src/gs-app-review.c
@@ -158,7 +158,7 @@ gs_app_review_set_reviewer (GsAppReview *review, const gchar *reviewer)
 GDateTime *
 gs_app_review_get_date (GsAppReview *review)
 {
-       g_return_val_if_fail (GS_IS_APP_REVIEW (review), 0);
+       g_return_val_if_fail (GS_IS_APP_REVIEW (review), NULL);
        return review->date;
 }
 
@@ -170,7 +170,8 @@ gs_app_review_set_date (GsAppReview *review, GDateTime *date)
 {
        g_return_if_fail (GS_IS_APP_REVIEW (review));
        g_clear_pointer (&review->date, g_date_time_unref);
-       review->date = g_date_time_ref (date);
+       if (date)
+               review->date = g_date_time_ref (date);
 }
 
 /**
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index a256cec..0a30db2 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -13,6 +13,7 @@ AM_CPPFLAGS =                                         \
        $(JSON_GLIB_CFLAGS)                             \
        $(LIMBA_CFLAGS)                                 \
        $(XDG_APP_CFLAGS)                               \
+       $(JSON_GLIB_CFLAGS)                             \
        -DBINDIR=\"$(bindir)\"                          \
        -DDATADIR=\"$(datadir)\"                        \
        -DGS_MODULESETDIR=\"$(datadir)/gnome-software/modulesets.d\" \
@@ -173,6 +174,11 @@ libgs_plugin_ubuntu_reviews_la_LDFLAGS = -module -avoid-version
 libgs_plugin_ubuntu_reviews_la_CFLAGS = $(GS_PLUGIN_CFLAGS) $(WARN_CFLAGS)
 endif
 
+libgs_plugin_ubuntu_reviews_la_SOURCES = gs-plugin-ubuntu-reviews.c
+libgs_plugin_ubuntu_reviews_la_LIBADD = $(GS_PLUGIN_LIBS) $(SOUP_LIBS) $(SQLITE_LIBS) $(JSON_GLIB_LIBS)
+libgs_plugin_ubuntu_reviews_la_LDFLAGS = -module -avoid-version
+libgs_plugin_ubuntu_reviews_la_CFLAGS = $(GS_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
+
 libgs_plugin_packagekit_la_SOURCES =                   \
        gs-plugin-packagekit.c                          \
        packagekit-common.c                             \


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