[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 275/331]	Disable reviews for snaps
- From: William Hua <williamhua src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 275/331]	Disable reviews for snaps
 
- Date: Wed,  4 May 2016 14:21:38 +0000 (UTC)
 
commit 505bcb8a2820ef37aca5801069a036c14293359f
Author: William Hua <william hua canonical com>
Date:   Tue Apr 19 08:01:32 2016 -0400
    Disable reviews for snaps
 src/gs-shell-details.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 359ef82..5f942e6 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -1343,6 +1343,17 @@ gs_shell_details_set_app (GsShellDetails *self, GsApp *app)
                g_signal_handlers_disconnect_by_func (self->app, gs_shell_details_notify_state_changed_cb, 
self);
                g_signal_handlers_disconnect_by_func (self->app, gs_shell_details_progress_changed_cb, self);
        }
+
+       if (g_strcmp0 (gs_app_get_management_plugin (app), "snappy") == 0) {
+               self->enable_reviews = FALSE;
+               gtk_widget_set_visible (self->button_review, FALSE);
+       } else {
+               /* show review widgets if we have plugins that provide them */
+               self->enable_reviews =
+                       gs_plugin_loader_get_plugin_supported (self->plugin_loader,
+                                                              "gs_plugin_review_submit");
+       }
+
        /* save app */
        g_set_object (&self->app, app);
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]