[gnome-software] trivial: Allow local files to contribute screenshots
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Allow local files to contribute screenshots
- Date: Tue, 1 Jul 2014 08:46:05 +0000 (UTC)
commit da97892b43d726da9df2962d9dc401c50a7345d9
Author: Richard Hughes <richard hughsie com>
Date: Tue Jul 1 09:41:12 2014 +0100
trivial: Allow local files to contribute screenshots
src/gs-screenshot.c | 2 --
src/plugins/gs-plugin-appstream.c | 8 --------
2 files changed, 0 insertions(+), 10 deletions(-)
---
diff --git a/src/gs-screenshot.c b/src/gs-screenshot.c
index 5722517..2174cfa 100644
--- a/src/gs-screenshot.c
+++ b/src/gs-screenshot.c
@@ -106,8 +106,6 @@ gs_screenshot_add_image (GsScreenshot *screenshot,
g_return_if_fail (GS_IS_SCREENSHOT (screenshot));
g_return_if_fail (url != NULL);
- g_return_if_fail (width > 0);
- g_return_if_fail (height > 0);
/* check if already exists */
item = gs_screenshot_get_item_exact (screenshot, width, height);
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index aba6854..050daea 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -337,11 +337,6 @@ gs_plugin_refine_add_screenshots (GsApp *app, AsApp *item)
if (gs_app_get_screenshots(app)->len > 0)
return;
- /* do not add source images */
- if (as_app_get_source_kind (item) == AS_APP_SOURCE_KIND_APPDATA ||
- as_app_get_source_kind (item) == AS_APP_SOURCE_KIND_DESKTOP)
- return;
-
/* add any we know */
for (i = 0; i < screenshots_as->len &&
i < GS_PLUGIN_APPSTREAM_MAX_SCREENSHOTS; i++) {
@@ -361,9 +356,6 @@ gs_plugin_refine_add_screenshots (GsApp *app, AsApp *item)
as_screenshot_get_caption (ss, NULL));
for (j = 0; j < images_as->len; j++) {
im = g_ptr_array_index (images_as, j);
- if (as_image_get_width (im) <= 0 ||
- as_image_get_height (im) <= 0)
- continue;
gs_screenshot_add_image (screenshot,
as_image_get_url (im),
as_image_get_width (im),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]