prefs: Remove titlebar-font preference

It has been unused since decorations moved into the frames client.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3075>
This commit is contained in:
Florian Müllner 2023-06-14 17:27:05 +02:00 committed by Marge Bot
parent c01580cec6
commit a95a3a0d30
2 changed files with 0 additions and 76 deletions

View File

@ -48,7 +48,6 @@
* not given a name here, because the purpose of the unified handlers
* is that keys should be referred to exactly once.
*/
#define KEY_TITLEBAR_FONT "titlebar-font"
#define KEY_NUM_WORKSPACES "num-workspaces"
#define KEY_WORKSPACE_NAMES "workspace-names"
@ -78,8 +77,6 @@ static guint changed_idle;
static GList *listeners = NULL;
static GHashTable *settings_schemas;
static gboolean use_system_font = FALSE;
static PangoFontDescription *titlebar_font = NULL;
static ClutterModifierType mouse_button_mods = CLUTTER_MOD1_MASK;
static MetaKeyCombo overlay_key_combo = { 0, 0, 0 };
static MetaKeyCombo locate_pointer_key_combo = { 0, 0, 0 };
@ -145,7 +142,6 @@ static void queue_changed (MetaPreference pref);
static void maybe_give_disable_workarounds_warning (void);
static gboolean titlebar_handler (GVariant*, gpointer*, gpointer);
static gboolean mouse_button_mods_handler (GVariant*, gpointer*, gpointer);
static gboolean button_layout_handler (GVariant*, gpointer*, gpointer);
static gboolean overlay_key_handler (GVariant*, gpointer*, gpointer);
@ -303,13 +299,6 @@ static MetaBoolPreference preferences_bool[] =
},
&raise_on_click,
},
{
{ "titlebar-uses-system-font",
SCHEMA_GENERAL,
META_PREF_TITLEBAR_FONT, /* note! shares a pref */
},
&use_system_font,
},
{
{ "dynamic-workspaces",
SCHEMA_MUTTER,
@ -414,14 +403,6 @@ static MetaStringPreference preferences_string[] =
mouse_button_mods_handler,
NULL,
},
{
{ KEY_TITLEBAR_FONT,
SCHEMA_GENERAL,
META_PREF_TITLEBAR_FONT,
},
titlebar_handler,
NULL,
},
{
{ "button-layout",
SCHEMA_GENERAL,
@ -1234,45 +1215,6 @@ meta_prefs_get_cursor_size (void)
/* Handlers for string preferences. */
/****************************************************************************/
static gboolean
titlebar_handler (GVariant *value,
gpointer *result,
gpointer data)
{
PangoFontDescription *desc;
const gchar *string_value;
*result = NULL; /* ignored */
string_value = g_variant_get_string (value, NULL);
desc = pango_font_description_from_string (string_value);
if (desc == NULL)
{
meta_warning ("Could not parse font description "
"\"%s\" from GSettings key %s",
string_value ? string_value : "(null)",
KEY_TITLEBAR_FONT);
return FALSE;
}
/* Is the new description the same as the old? */
if (titlebar_font &&
pango_font_description_equal (desc, titlebar_font))
{
pango_font_description_free (desc);
}
else
{
if (titlebar_font)
pango_font_description_free (titlebar_font);
titlebar_font = desc;
queue_changed (META_PREF_TITLEBAR_FONT);
}
return TRUE;
}
static gboolean
mouse_button_mods_handler (GVariant *value,
gpointer *result,
@ -1621,15 +1563,6 @@ iso_next_group_handler (GVariant *value,
return TRUE;
}
const PangoFontDescription*
meta_prefs_get_titlebar_font (void)
{
if (use_system_font)
return NULL;
else
return titlebar_font;
}
int
meta_prefs_get_num_workspaces (void)
{
@ -1673,9 +1606,6 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_RAISE_ON_CLICK:
return "RAISE_ON_CLICK";
case META_PREF_TITLEBAR_FONT:
return "TITLEBAR_FONT";
case META_PREF_NUM_WORKSPACES:
return "NUM_WORKSPACES";

View File

@ -43,7 +43,6 @@
* @META_PREF_AUTO_RAISE: auto-raise
* @META_PREF_AUTO_RAISE_DELAY: auto-raise delay
* @META_PREF_FOCUS_CHANGE_ON_POINTER_REST: focus change on pointer rest
* @META_PREF_TITLEBAR_FONT: title-bar font
* @META_PREF_NUM_WORKSPACES: number of workspaces
* @META_PREF_DYNAMIC_WORKSPACES: dynamic workspaces
* @META_PREF_KEYBINDINGS: keybindings
@ -82,7 +81,6 @@ typedef enum
META_PREF_AUTO_RAISE,
META_PREF_AUTO_RAISE_DELAY,
META_PREF_FOCUS_CHANGE_ON_POINTER_REST,
META_PREF_TITLEBAR_FONT,
META_PREF_NUM_WORKSPACES,
META_PREF_DYNAMIC_WORKSPACES,
META_PREF_KEYBINDINGS,
@ -143,10 +141,6 @@ gboolean meta_prefs_get_attach_modal_dialogs (void);
META_EXPORT
gboolean meta_prefs_get_raise_on_click (void);
/* returns NULL if GTK default should be used */
META_EXPORT
const PangoFontDescription* meta_prefs_get_titlebar_font (void);
META_EXPORT
int meta_prefs_get_num_workspaces (void);