Skip to content

Commit 92e8a38

Browse files
committed
Revert "xsettings: Override the active icon and gtk theme when
'high-contrast' is enabled" This was added to simplify toggling high-contrast themes so we could get away from having to keep track of the previous theme names. With the new theme settings interface, this isn't used. This reverts commit b012dde. Fixes #380
1 parent 3fc8892 commit 92e8a38

File tree

1 file changed

+3
-46
lines changed

1 file changed

+3
-46
lines changed

plugins/xsettings/csd-xsettings-manager.c

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@
7272
#define FONT_HINTING_KEY "hinting"
7373
#define FONT_RGBA_ORDER_KEY "rgba-order"
7474

75-
#define HIGH_CONTRAST_KEY "high-contrast"
76-
7775
/* As we cannot rely on the X server giving us good DPI information, and
7876
* that we don't want multi-monitor screens to have different DPIs (thus
7977
* different text sizes), we'll hard-code the value of the DPI
@@ -436,36 +434,6 @@ translate_string_string_window_buttons (CinnamonSettingsXSettingsManager *manage
436434
g_free (final_str);
437435
}
438436

439-
static void
440-
translate_theme_name (CinnamonSettingsXSettingsManager *manager,
441-
TranslationEntry *trans,
442-
GVariant *value)
443-
{
444-
GSettings *settings;
445-
gboolean hc = FALSE;
446-
int i;
447-
448-
settings = g_hash_table_lookup (manager->priv->settings, INTERFACE_SETTINGS_SCHEMA);
449-
450-
if (settings) {
451-
GSettingsSchemaSource *source = g_settings_schema_source_get_default ();
452-
GSettingsSchema *schema = g_settings_schema_source_lookup (source, INTERFACE_SETTINGS_SCHEMA, FALSE);
453-
454-
if (g_settings_schema_has_key (schema, HIGH_CONTRAST_KEY)) {
455-
hc = g_settings_get_boolean (settings, HIGH_CONTRAST_KEY);
456-
}
457-
458-
g_settings_schema_unref (schema);
459-
}
460-
461-
for (i = 0; manager->priv->managers [i]; i++) {
462-
xsettings_manager_set_string (manager->priv->managers [i],
463-
trans->xsetting_name,
464-
hc ? "HighContrast"
465-
: g_variant_get_string (value, NULL));
466-
}
467-
}
468-
469437
static void
470438
translate_enable_animations (CinnamonSettingsXSettingsManager *manager,
471439
TranslationEntry *trans,
@@ -511,8 +479,8 @@ static TranslationEntry translations [] = {
511479
{ "org.cinnamon.desktop.peripherals.mouse", "drag-threshold", "Net/DndDragThreshold", translate_int_int },
512480
{ "org.cinnamon.desktop.interface", "cursor-blink", "Net/CursorBlink", translate_bool_int },
513481
{ "org.cinnamon.desktop.interface", "cursor-blink-time", "Net/CursorBlinkTime", translate_int_int },
514-
{ "org.cinnamon.desktop.interface", "gtk-theme", "Net/ThemeName", translate_theme_name },
515-
{ "org.cinnamon.desktop.interface", "icon-theme", "Net/IconThemeName", translate_theme_name },
482+
{ "org.cinnamon.desktop.interface", "gtk-theme", "Net/ThemeName", translate_string_string },
483+
{ "org.cinnamon.desktop.interface", "icon-theme", "Net/IconThemeName", translate_string_string },
516484
{ "org.cinnamon.desktop.sound", "theme-name", "Net/SoundThemeName", translate_string_string },
517485
{ "org.cinnamon.desktop.sound", "event-sounds", "Net/EnableEventSounds" , translate_bool_int },
518486
{ "org.cinnamon.desktop.sound", "input-feedback-sounds", "Net/EnableInputFeedbackSounds", translate_bool_int }
@@ -1001,18 +969,7 @@ xsettings_callback (GSettings *settings,
1001969
g_str_equal (key, CURSOR_SIZE_KEY)) {
1002970
xft_callback (NULL, key, manager);
1003971
return;
1004-
}
1005-
1006-
if (g_str_equal (key, HIGH_CONTRAST_KEY)) {
1007-
GSettings *iface_settings;
1008-
1009-
iface_settings = g_hash_table_lookup (manager->priv->settings,
1010-
INTERFACE_SETTINGS_SCHEMA);
1011-
xsettings_callback (iface_settings, "gtk-theme", manager);
1012-
xsettings_callback (iface_settings, "icon-theme", manager);
1013-
1014-
return;
1015-
}
972+
}
1016973

1017974
trans = find_translation_entry (settings, key);
1018975
if (trans == NULL) {

0 commit comments

Comments
 (0)