clutter/settings: Remove unused fontconfig-timestamp property

As a writable property, nothing sets it in both Mutter/GNOME Shell
making it a dead-code. As we will be moving pango related bits to
gnome-shell, remove this one already

Removes pango-ft2 dependency

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3969>
This commit is contained in:
Bilal Elmoussaoui
2024-08-21 22:45:51 +02:00
committed by Marge Bot
parent da828c2fcc
commit 70dc8cabac
5 changed files with 0 additions and 80 deletions

View File

@ -19,11 +19,6 @@
#include "clutter/clutter-settings.h"
#ifdef HAVE_PANGO_FT2
/* for pango_fc_font_map_cache_clear() */
#include <pango/pangofc-fontmap.h>
#endif /* HAVE_PANGO_FT2 */
#include "clutter/clutter-context-private.h"
#include "clutter/clutter-debug.h"
#include "clutter/clutter-settings-private.h"
@ -99,8 +94,6 @@ enum
PROP_LONG_PRESS_DURATION,
PROP_FONTCONFIG_TIMESTAMP,
PROP_PASSWORD_HINT_TIME,
PROP_UNSCALED_FONT_DPI,
@ -220,48 +213,6 @@ settings_update_resolution (ClutterSettings *self)
g_signal_emit_by_name (self->backend, "resolution-changed");
}
static void
settings_update_fontmap (ClutterSettings *self,
guint stamp)
{
if (self->backend == NULL)
return;
#ifdef HAVE_PANGO_FT2
CLUTTER_NOTE (BACKEND, "Update fontmaps (stamp: %d)", stamp);
if (self->last_fontconfig_timestamp != stamp)
{
ClutterContext *context;
gboolean update_needed = FALSE;
context = _clutter_context_get_default ();
/* If there is no font map yet then we don't need to do anything
* because the config for fontconfig will be read when it is
* created */
if (context->font_map)
{
PangoFontMap *fontmap = PANGO_FONT_MAP (context->font_map);
if (PANGO_IS_FC_FONT_MAP (fontmap) &&
!FcConfigUptoDate (NULL))
{
pango_fc_font_map_cache_clear (PANGO_FC_FONT_MAP (fontmap));
if (FcInitReinitialize ())
update_needed = TRUE;
}
}
self->last_fontconfig_timestamp = stamp;
if (update_needed)
g_signal_emit_by_name (self->backend, "font-changed");
}
#endif /* HAVE_PANGO_FT2 */
}
static void
get_font_gsettings (GSettings *settings,
FontSettings *output)
@ -648,10 +599,6 @@ clutter_settings_set_property (GObject *gobject,
self->long_press_duration = g_value_get_int (value);
break;
case PROP_FONTCONFIG_TIMESTAMP:
settings_update_fontmap (self, g_value_get_uint (value));
break;
case PROP_PASSWORD_HINT_TIME:
self->password_hint_time = g_value_get_uint (value);
break;
@ -899,12 +846,6 @@ clutter_settings_class_init (ClutterSettingsClass *klass)
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS);
obj_props[PROP_FONTCONFIG_TIMESTAMP] =
g_param_spec_uint ("fontconfig-timestamp", NULL, NULL,
0, G_MAXUINT,
0,
G_PARAM_WRITABLE |
G_PARAM_STATIC_STRINGS);
/**
* ClutterText:password-hint-time: