[gnome-software: 5/15] gs-summary-tile: Drop support for custom CSS
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 5/15] gs-summary-tile: Drop support for custom CSS
- Date: Tue, 20 Apr 2021 16:08:58 +0000 (UTC)
commit 09a8831127bf7863a7b68fa3f4e883f40dbb624c
Author: Philip Withnall <pwithnall endlessos org>
Date: Tue Apr 20 14:59:12 2021 +0100
gs-summary-tile: Drop support for custom CSS
It was not widely used (if at all), and complicated things. It doesn’t
exist in the new designs (see #1111).
Signed-off-by: Philip Withnall <pwithnall endlessos org>
plugins/core/gs-plugin-rewrite-resource.c | 1 -
src/gs-summary-tile.c | 19 -------------------
2 files changed, 20 deletions(-)
---
diff --git a/plugins/core/gs-plugin-rewrite-resource.c b/plugins/core/gs-plugin-rewrite-resource.c
index 2856a3e24..d17f6bd0b 100644
--- a/plugins/core/gs-plugin-rewrite-resource.c
+++ b/plugins/core/gs-plugin-rewrite-resource.c
@@ -26,7 +26,6 @@ refine_app (GsPlugin *plugin,
GError **error)
{
const gchar *keys[] = {
- "GnomeSoftware::AppTile-css",
"GnomeSoftware::FeatureTile-css",
"GnomeSoftware::UpgradeBanner-css",
NULL };
diff --git a/src/gs-summary-tile.c b/src/gs-summary-tile.c
index 382e9ce1b..558a903d9 100644
--- a/src/gs-summary-tile.c
+++ b/src/gs-summary-tile.c
@@ -23,7 +23,6 @@ struct _GsSummaryTile
GtkWidget *eventbox;
GtkWidget *stack;
gint preferred_width;
- GtkCssProvider *tile_provider; /* (owned) (nullable) */
};
G_DEFINE_TYPE (GsSummaryTile, gs_summary_tile, GS_TYPE_APP_TILE)
@@ -45,8 +44,6 @@ gs_summary_tile_refresh (GsAppTile *self)
gboolean installed;
g_autofree gchar *name = NULL;
const gchar *summary;
- const gchar *css;
- g_autofree gchar *modified_css = NULL;
if (app == NULL)
return;
@@ -73,11 +70,6 @@ gs_summary_tile_refresh (GsAppTile *self)
else
gtk_style_context_remove_class (context, "icon-dropshadow");
- /* perhaps set custom css */
- css = gs_app_get_metadata_item (app, "GnomeSoftware::AppTile-css");
- modified_css = gs_utils_set_key_colors_in_css (css, app);
- gs_utils_widget_set_css (GTK_WIDGET (tile), &tile->tile_provider, "summary-tile", modified_css);
-
accessible = gtk_widget_get_accessible (GTK_WIDGET (tile));
switch (gs_app_get_state (app)) {
@@ -161,16 +153,6 @@ gs_summary_tile_set_property (GObject *object,
}
}
-static void
-gs_summary_tile_dispose (GObject *object)
-{
- GsSummaryTile *tile = GS_SUMMARY_TILE (object);
-
- g_clear_object (&tile->tile_provider);
-
- G_OBJECT_CLASS (gs_summary_tile_parent_class)->dispose (object);
-}
-
static void
gs_app_get_preferred_width (GtkWidget *widget,
gint *min, gint *nat)
@@ -201,7 +183,6 @@ gs_summary_tile_class_init (GsSummaryTileClass *klass)
object_class->get_property = gs_summary_tile_get_property;
object_class->set_property = gs_summary_tile_set_property;
- object_class->dispose = gs_summary_tile_dispose;
widget_class->get_preferred_width = gs_app_get_preferred_width;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]