[gnome-software] details page: Add support for verified developers
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] details page: Add support for verified developers
- Date: Thu, 9 Aug 2018 23:16:41 +0000 (UTC)
commit 8ddbb228a6a9d7ddd196e4610ebdf161a5977b7f
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Jul 10 11:47:44 2018 +0200
details page: Add support for verified developers
meson.build | 2 +-
src/gs-details-page.c | 3 +++
src/gs-details-page.ui | 31 +++++++++++++++++++++++--------
3 files changed, 27 insertions(+), 9 deletions(-)
---
diff --git a/meson.build b/meson.build
index 87f1a6ca..8ea92f84 100644
--- a/meson.build
+++ b/meson.build
@@ -92,7 +92,7 @@ add_global_link_arguments(
# Needed for PATH_MAX and symlink()
add_project_arguments('-D_XOPEN_SOURCE=700', language : 'c')
-appstream_glib = dependency('appstream-glib', version : '>= 0.7.3')
+appstream_glib = dependency('appstream-glib', version : '>= 0.7.11')
gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
gio_unix = dependency('gio-unix-2.0')
gmodule = dependency('gmodule-2.0')
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index a66d5ec8..d091f172 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -101,6 +101,7 @@ struct _GsDetailsPage
GtkWidget *label_details_category_value;
GtkWidget *label_details_developer_title;
GtkWidget *label_details_developer_value;
+ GtkWidget *image_details_developer_verified;
GtkWidget *button_details_license_free;
GtkWidget *button_details_license_nonfree;
GtkWidget *button_details_license_unknown;
@@ -951,6 +952,7 @@ gs_details_page_refresh_all (GsDetailsPage *self)
gtk_label_set_label (GTK_LABEL (self->label_details_developer_value), tmp);
gtk_widget_set_visible (self->label_details_developer_value, TRUE);
}
+ gtk_widget_set_visible (self->image_details_developer_verified, gs_app_has_quirk (self->app,
AS_APP_QUIRK_DEVELOPER_VERIFIED));
/* set the license buttons */
tmp = gs_app_get_license (self->app);
@@ -2438,6 +2440,7 @@ gs_details_page_class_init (GsDetailsPageClass *klass)
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_category_value);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_developer_title);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_developer_value);
+ gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, image_details_developer_verified);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_license_free);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_license_nonfree);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_license_unknown);
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index 9836384d..206d99fe 100644
--- a/src/gs-details-page.ui
+++ b/src/gs-details-page.ui
@@ -1041,16 +1041,31 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label_details_developer_value">
+ <object class="GtkBox" id="box_details_developer">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="label">Yorba</property>
- <property name="wrap">True</property>
- <property name="selectable">True</property>
- <property name="max_width_chars">10</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
+ <property name="spacing">3</property>
+ <child>
+ <object class="GtkLabel" id="label_details_developer_value">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">Yorba</property>
+ <property name="wrap">True</property>
+ <property name="selectable">True</property>
+ <property name="max_width_chars">10</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage" id="image_details_developer_verified">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">emblem-ok-symbolic</property>
+ </object>
+ </child>
</object>
<packing>
<property name="left_attach">1</property>
@@ -1363,7 +1378,7 @@
<widget name="label_details_category_value"/>
<widget name="label_details_size_installed_value"/>
<widget name="label_details_size_download_value"/>
- <widget name="label_details_developer_value"/>
+ <widget name="box_details_developer"/>
<widget name="button_details_license_free"/>
</widgets>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]