1
0
Fork 0

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:

View file

@ -44,12 +44,6 @@ clutter_pkg_private_deps = [
pangocairo_dep,
]
if have_pango_ft2
clutter_pkg_private_deps += [
pangoft2_dep,
]
endif
clutter_deps = [
clutter_pkg_deps,
clutter_pkg_private_deps,

View file

@ -130,9 +130,6 @@
/* Whether the Xwayland has -enable-ei-portal option */
#mesondefine HAVE_XWAYLAND_ENABLE_EI_PORTAL
/* Supports PangoFt2 */
#mesondefine HAVE_PANGO_FT2
/* Supports timerfd_create/timerfd_settime */
#mesondefine HAVE_TIMERFD

View file

@ -304,11 +304,6 @@ else
have_libwacom_get_num_rings = false
endif
have_pango_ft2 = get_option('pango_ft2')
if have_pango_ft2
pangoft2_dep = dependency('pangoft2')
endif
have_startup_notification = get_option('startup_notification') and have_x11_client
if have_startup_notification
libstartup_notification_dep = dependency('libstartup-notification-1.0',
@ -563,7 +558,6 @@ cdata.set('HAVE_STARTUP_NOTIFICATION', have_startup_notification)
cdata.set('HAVE_INTROSPECTION', have_introspection)
cdata.set('HAVE_PROFILER', have_profiler)
cdata.set('HAVE_LIBDISPLAY_INFO', have_libdisplay_info)
cdata.set('HAVE_PANGO_FT2', have_pango_ft2)
cdata.set('HAVE_TIMERFD', have_timerfd)
cdata.set('HAVE_MALLOC_TRIM', have_malloc_trim)
cdata.set('HAVE_EVENTFD', have_eventfd)

View file

@ -111,12 +111,6 @@ option('sound_player',
description: 'Enable sound player support using libcanberra',
)
option('pango_ft2',
type: 'boolean',
value: true,
description: 'Enable PangoFt2 support'
)
option('startup_notification',
type: 'boolean',
value: true,