[gnome-software/gnome-3-34] snap: Remove dead code
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-34] snap: Remove dead code
- Date: Thu, 3 Oct 2019 14:41:19 +0000 (UTC)
commit d999bdd271d002e45ed376f6e10eef73deb37894
Author: Robert Ancell <robert ancell canonical com>
Date: Thu Oct 3 23:12:32 2019 +1300
snap: Remove dead code
This should have been removed in 266fed5.
plugins/snap/gs-plugin-snap.c | 42 ------------------------------------------
1 file changed, 42 deletions(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index db9a1de1..6ef850a8 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -365,48 +365,6 @@ is_banner_icon_image (const gchar *filename)
return g_regex_match_simple ("^banner-icon(?:_[a-zA-Z0-9]{7})?\\.(?:png|jpg)$", filename, 0, 0);
}
-static const gchar *
-get_media_url (SnapdSnap *snap, gboolean (*match_func)(const gchar *filename))
-{
- GPtrArray *media, *screenshots;
- guint i;
-
- media = snapd_snap_get_media (snap);
- for (i = 0; i < media->len; i++) {
- SnapdMedia *m = media->pdata[i];
-
- /* FIXME: In the future there will be a media type for these */
-
- /* Fall back to old specially named screenshots */
- if (g_strcmp0 (snapd_media_get_media_type (m), "screenshot") == 0) {
- const gchar *url;
- g_autofree gchar *filename = NULL;
-
- url = snapd_media_get_url (m);
- filename = g_path_get_basename (url);
- if (match_func (filename))
- return url;
- }
- }
-
- /* Fall back to old screenshots */
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- screenshots = snapd_snap_get_screenshots (snap);
-G_GNUC_END_IGNORE_DEPRECATIONS
- for (i = 0; i < screenshots->len; i++) {
- SnapdScreenshot *screenshot = screenshots->pdata[i];
- const gchar *url;
- g_autofree gchar *filename = NULL;
-
- url = snapd_screenshot_get_url (screenshot);
- filename = g_path_get_basename (url);
- if (match_func (filename))
- return url;
- }
-
- return NULL;
-}
-
gboolean
gs_plugin_add_popular (GsPlugin *plugin,
GsAppList *list,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]