[gnome-software] Hide the screenshot widget when it cannot be loaded
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Hide the screenshot widget when it cannot be loaded
- Date: Thu, 27 Mar 2014 14:25:49 +0000 (UTC)
commit 39e88b63ed5da6d74b7f8f5a314338b3d7537e1c
Author: Richard Hughes <richard hughsie com>
Date: Thu Mar 27 14:25:25 2014 +0000
Hide the screenshot widget when it cannot be loaded
This is mostly for Ubuntu, where we assume that there exists a screenshot for
all packages without checking first.
It does make the details page flash after a split second for some applications,
but this is preferable to a 800x600 empty space.
src/gs-screenshot-image.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
index 8be98b5..49739d4 100644
--- a/src/gs-screenshot-image.c
+++ b/src/gs-screenshot-image.c
@@ -108,6 +108,7 @@ gs_screenshot_show_image (GsScreenshotImage *ssimg)
gtk_stack_set_visible_child_name (GTK_STACK (priv->stack), "image1");
priv->current_image = "image1";
}
+ gtk_widget_show (GTK_WIDGET (ssimg));
}
/**
@@ -127,6 +128,7 @@ gs_screenshot_image_complete_cb (SoupSession *session,
/* TRANSLATORS: this is when we try to download a screenshot and
* we get back 404 */
gs_screenshot_image_set_error (ssimg, _("Screenshot not found"));
+ gtk_widget_hide (GTK_WIDGET (ssimg));
goto out;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]