[gnome-software/wip/rancell/reviews-3-18] Get review auths when creating review dialog - next step prompt for authorization if required



commit 4ca1dc288ae1c96ddda5e48c4570fd0441f4672d
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Jan 14 22:54:05 2016 +1300

    Get review auths when creating review dialog - next step prompt for authorization if required

 src/gs-plugin-loader.c |   10 ++++++++++
 src/gs-plugin-loader.h |    2 +-
 src/gs-shell-details.c |    3 +++
 3 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index c696863..8a0c509 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -3708,6 +3708,16 @@ gs_plugin_loader_offline_update_finish (GsPluginLoader *plugin_loader,
        return g_task_propagate_boolean (G_TASK (res), error);
 }
 
+/**
+ * gs_plugin_loader_get_review_auths:
+ */
+gchar **
+gs_plugin_loader_get_review_auths (GsPluginLoader *plugin_loader)
+{
+       GsPluginLoaderPrivate *priv = gs_plugin_loader_get_instance_private (plugin_loader);
+       return priv->review_auths;
+}
+
 /******************************************************************************/
 
 /* vim: set noexpandtab: */
diff --git a/src/gs-plugin-loader.h b/src/gs-plugin-loader.h
index 4086e55..bbdbb5b 100644
--- a/src/gs-plugin-loader.h
+++ b/src/gs-plugin-loader.h
@@ -213,7 +213,7 @@ GsApp               *gs_plugin_loader_dedupe                (GsPluginLoader 
*plugin_loader,
                                                         GsApp          *app);
 void            gs_plugin_loader_set_network_status    (GsPluginLoader *plugin_loader,
                                                         gboolean        online);
-void            gs_plugin_loader_get_review_auths      (GsPluginLoader *plugin_loader);
+gchar          **gs_plugin_loader_get_review_auths     (GsPluginLoader *plugin_loader);
 
 G_END_DECLS
 
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 0d98e31..b905355 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -1243,10 +1243,13 @@ gs_shell_details_rating_changed_cb (GsStarWidget *star,
 {
        GtkWidget *dialog;
        GtkResponseType response;
+       gchar **review_auths;
 
        dialog = gs_app_review_dialog_new ();
        gs_app_review_dialog_set_rating (GS_APP_REVIEW_DIALOG (dialog), rating);
 
+       review_auths = gs_plugin_loader_get_review_auths (self->plugin_loader);
+
        gtk_window_set_transient_for (GTK_WINDOW (dialog), gs_shell_get_window (self->shell));
        response = gtk_dialog_run (GTK_DIALOG (dialog));
        if (response == GTK_RESPONSE_OK) {


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