[gnome-builder/wip/gtk4-port: 1204/1774] libide/foundry: implement libhandy equivalents




commit caaa549dee1dd4afa9b27a9a684dfd7d3b04af15
Author: Christian Hergert <chergert redhat com>
Date:   Fri May 27 12:51:53 2022 -0700

    libide/foundry: implement libhandy equivalents
    
    Fallback for libhandy in anticipation of it getting a backport from
    libadwaita for debug variables.
    
    Related #935

 src/libide/foundry/ide-run-manager.c | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)
---
diff --git a/src/libide/foundry/ide-run-manager.c b/src/libide/foundry/ide-run-manager.c
index b78f30306..a52c6e210 100644
--- a/src/libide/foundry/ide-run-manager.c
+++ b/src/libide/foundry/ide-run-manager.c
@@ -580,13 +580,21 @@ apply_color_scheme (IdeEnvironment *env,
   g_debug ("Applying color-scheme \"%s\"", color_scheme);
 
   if (ide_str_equal0 (color_scheme, "follow"))
-    ide_environment_setenv (env, "ADW_DEBUG_COLOR_SCHEME", NULL);
+    {
+      ide_environment_setenv (env, "ADW_DEBUG_COLOR_SCHEME", NULL);
+      ide_environment_setenv (env, "HDY_DEBUG_COLOR_SCHEME", NULL);
+    }
   else if (ide_str_equal0 (color_scheme, "force-light"))
-    ide_environment_setenv (env, "ADW_DEBUG_COLOR_SCHEME", "prefer-light");
+    {
+      ide_environment_setenv (env, "ADW_DEBUG_COLOR_SCHEME", "prefer-light");
+      ide_environment_setenv (env, "HDY_DEBUG_COLOR_SCHEME", "prefer-light");
+    }
   else if (ide_str_equal0 (color_scheme, "force-dark"))
-    ide_environment_setenv (env, "ADW_DEBUG_COLOR_SCHEME", "prefer-dark");
-  else
-    g_warn_if_reached ();
+    {
+      ide_environment_setenv (env, "ADW_DEBUG_COLOR_SCHEME", "prefer-dark");
+      ide_environment_setenv (env, "HDY_DEBUG_COLOR_SCHEME", "prefer-dark");
+    }
+  else g_warn_if_reached ();
 
   IDE_EXIT;
 }
@@ -602,9 +610,15 @@ apply_high_contrast (IdeEnvironment *env,
   g_debug ("Applying high-contrast %d", high_contrast);
 
   if (high_contrast)
-    ide_environment_setenv (env, "ADW_DEBUG_HIGH_CONTRAST", "1");
+    {
+      ide_environment_setenv (env, "ADW_DEBUG_HIGH_CONTRAST", "1");
+      ide_environment_setenv (env, "HDY_DEBUG_HIGH_CONTRAST", "1");
+    }
   else
-    ide_environment_setenv (env, "ADW_DEBUG_HIGH_CONTRAST", NULL);
+    {
+      ide_environment_setenv (env, "ADW_DEBUG_HIGH_CONTRAST", NULL);
+      ide_environment_setenv (env, "HDY_DEBUG_HIGH_CONTRAST", NULL);
+    }
 
   IDE_EXIT;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]