[gnome-software] fwupd: Remove the hidden fwupd easter egg



commit bff86ab198eafbc2c4e4a7ac9380eed7ec68def8
Author: Richard Hughes <richard hughsie com>
Date:   Wed Feb 6 10:55:49 2019 +0000

    fwupd: Remove the hidden fwupd easter egg
    
    Now fwupd is in flathub it's confusing to see *devices* and apps.

 plugins/fwupd/gs-plugin-fwupd.c | 70 -----------------------------------------
 1 file changed, 70 deletions(-)
---
diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
index b9d2af06..c49e7721 100644
--- a/plugins/fwupd/gs-plugin-fwupd.c
+++ b/plugins/fwupd/gs-plugin-fwupd.c
@@ -1047,73 +1047,3 @@ gs_plugin_add_sources (GsPlugin *plugin,
        }
        return TRUE;
 }
-
-static gboolean
-gs_plugin_fwupd_add_releases (GsPlugin *plugin, GsApp *app,
-                             GCancellable *cancellable, GError **error)
-{
-       GsPluginData *priv = gs_plugin_get_data (plugin);
-       g_autoptr(GError) error_local = NULL;
-       g_autoptr(GPtrArray) releases = NULL;
-
-       releases = fwupd_client_get_releases (priv->client,
-                                             gs_fwupd_app_get_device_id (app),
-                                             cancellable,
-                                             &error_local);
-       if (releases == NULL) {
-               /* just ignore empty array */
-               if (g_error_matches (error_local,
-                                    FWUPD_ERROR,
-                                    FWUPD_ERROR_NOTHING_TO_DO)) {
-                       return TRUE;
-               }
-               g_propagate_error (error, g_steal_pointer (&error_local));
-               return FALSE;
-       }
-       for (guint j = 0; j < releases->len; j++) {
-               FwupdRelease *rel = g_ptr_array_index (releases, j);
-               g_autoptr(GsApp) app2 = gs_app_new (NULL);
-               gs_fwupd_app_set_from_release (app2, rel);
-               gs_app_add_history (app, app2);
-       }
-       return TRUE;
-}
-
-static gboolean
-gs_plugin_fwupd_add_devices (GsPlugin *plugin, GsAppList *list,
-                            GCancellable *cancellable, GError **error)
-{
-       GsPluginData *priv = gs_plugin_get_data (plugin);
-       g_autoptr(GPtrArray) devices = NULL;
-
-       /* get devices */
-       devices = fwupd_client_get_devices (priv->client, cancellable, error);
-       if (devices == NULL)
-               return FALSE;
-       for (guint i = 0; i < devices->len; i++) {
-               FwupdDevice *device = g_ptr_array_index (devices, i);
-               g_autoptr(GsApp) app = NULL;
-
-               /* ignore these, we can't do anything */
-               if (!fwupd_device_has_flag (device, FWUPD_DEVICE_FLAG_UPDATABLE))
-                       continue;
-
-               /* add releases */
-               app = gs_plugin_fwupd_new_app_from_device_raw (plugin, device);
-               if (!gs_plugin_fwupd_add_releases (plugin, app, cancellable, error))
-                       return FALSE;
-
-               /* add all */
-               gs_app_list_add (list, g_steal_pointer (&app));
-       }
-       return TRUE;
-}
-
-gboolean
-gs_plugin_add_search (GsPlugin *plugin, gchar **values, GsAppList *list,
-                     GCancellable *cancellable, GError **error)
-{
-       if (g_strv_contains ((const gchar * const *) values, "fwupd"))
-               return gs_plugin_fwupd_add_devices (plugin, list, cancellable, error);
-       return TRUE;
-}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]