[gnome-software] Add an extra kudo for sandboxing into the details page
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Add an extra kudo for sandboxing into the details page
- Date: Thu, 7 Jul 2016 19:39:58 +0000 (UTC)
commit f9ade43249a263f17c40b90920965617e53f532e
Author: Richard Hughes <richard hughsie com>
Date: Thu Jul 7 14:01:11 2016 +0100
Add an extra kudo for sandboxing into the details page
src/gs-shell-details.c | 9 +++++++++
src/gs-shell-details.ui | 28 ++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 1690530..4448bc5 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -117,10 +117,12 @@ struct _GsShellDetails
GtkWidget *stack_details;
GtkWidget *grid_details_kudo;
GtkWidget *image_details_kudo_docs;
+ GtkWidget *image_details_kudo_sandboxed;
GtkWidget *image_details_kudo_integration;
GtkWidget *image_details_kudo_translated;
GtkWidget *image_details_kudo_updated;
GtkWidget *label_details_kudo_docs;
+ GtkWidget *label_details_kudo_sandboxed;
GtkWidget *label_details_kudo_integration;
GtkWidget *label_details_kudo_translated;
GtkWidget *label_details_kudo_updated;
@@ -947,6 +949,11 @@ gs_shell_details_refresh_all (GsShellDetails *self)
gtk_widget_set_sensitive (self->image_details_kudo_docs, ret);
gs_shell_details_set_sensitive (self->label_details_kudo_docs, ret);
+ /* set sandboxed kudo */
+ ret = (kudos & GS_APP_KUDO_SANDBOXED) > 0;
+ gtk_widget_set_sensitive (self->image_details_kudo_sandboxed, ret);
+ gs_shell_details_set_sensitive (self->label_details_kudo_sandboxed, ret);
+
/* any of the various integration kudos */
user_integration_bf = GS_APP_KUDO_SEARCH_PROVIDER |
GS_APP_KUDO_USES_NOTIFICATIONS |
@@ -1897,10 +1904,12 @@ gs_shell_details_class_init (GsShellDetailsClass *klass)
gtk_widget_class_bind_template_child (widget_class, GsShellDetails, stack_details);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails, grid_details_kudo);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails, image_details_kudo_docs);
+ gtk_widget_class_bind_template_child (widget_class, GsShellDetails, image_details_kudo_sandboxed);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails, image_details_kudo_integration);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails, image_details_kudo_translated);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails, image_details_kudo_updated);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_kudo_docs);
+ gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_kudo_sandboxed);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_kudo_integration);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_kudo_translated);
gtk_widget_class_bind_template_child (widget_class, GsShellDetails, label_details_kudo_updated);
diff --git a/src/gs-shell-details.ui b/src/gs-shell-details.ui
index 43778ea..813b796 100644
--- a/src/gs-shell-details.ui
+++ b/src/gs-shell-details.ui
@@ -550,6 +550,22 @@
</packing>
</child>
<child>
+ <object class="GtkImage" id="image_details_kudo_sandboxed">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">security-medium-symbolic</property>
+ <property name="icon_size">0</property>
+ <style>
+ <class name="kudo-pill"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="label_details_kudo_translated">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -597,6 +613,18 @@
<property name="top_attach">3</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label_details_kudo_sandboxed">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Sandboxed</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]