[gnome-software] trivial: Show more than a blank page when no moderatable reviews
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Show more than a blank page when no moderatable reviews
- Date: Mon, 15 Feb 2016 10:50:53 +0000 (UTC)
commit aefd5dc3f81729634d93b9a54696803a6c7325fb
Author: Richard Hughes <richard hughsie com>
Date: Mon Feb 15 10:48:39 2016 +0000
trivial: Show more than a blank page when no moderatable reviews
src/gs-shell-moderate.c | 7 +++++++
src/gs-shell-moderate.ui | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-moderate.c b/src/gs-shell-moderate.c
index 11580e4..b92e4af 100644
--- a/src/gs-shell-moderate.c
+++ b/src/gs-shell-moderate.c
@@ -147,6 +147,13 @@ gs_shell_moderate_get_unvoted_reviews_cb (GObject *source_object,
res,
&error);
if (list == NULL) {
+ if (g_error_matches (error,
+ GS_PLUGIN_LOADER_ERROR,
+ GS_PLUGIN_LOADER_ERROR_NO_RESULTS)) {
+ gtk_stack_set_visible_child_name (GTK_STACK (self->stack_install),
+ "uptodate");
+ return;
+ }
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning ("failed to get moderate apps: %s", error->message);
return;
diff --git a/src/gs-shell-moderate.ui b/src/gs-shell-moderate.ui
index a781526..60380dc 100644
--- a/src/gs-shell-moderate.ui
+++ b/src/gs-shell-moderate.ui
@@ -56,6 +56,48 @@
<property name="name">view</property>
</packing>
</child>
+
+ <child>
+ <object class="GtkBox" id="updates_uptodate_box">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">48</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ <child type="center">
+ <object class="GtkBox" id="updates_uptodate_centerbox">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkImage" id="image_updates">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">128</property>
+ <property name="icon_name">object-select-symbolic</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">There are no reviews to moderate</property>
+ <attributes>
+ <attribute name="scale" value="1.4"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="name">uptodate</property>
+ </packing>
+ </child>
+
</object>
</child>
</template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]