aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/gtk2-theme-paths.patch
blob: 6c1351e5162e1ca02953127e887f0452a85d34e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From: Jookia <166291@gmail.com>
Subject: [PATCHv2] gtk: Patch GTK+ to look for themes in profiles.
To: guix-devel@gnu.org
Date: Sun, 13 Mar 2016 15:17:37 +1100
Url: https://lists.gnu.org/archive/html/guix-devel/2016-03/msg00492.html

diff -Naur gtk+-2.24.28.new/gtk/gtkrc.c gtk+-2.24.28/gtk/gtkrc.c
--- gtk+-2.24.28.new/gtk/gtkrc.c	2016-03-13 10:31:14.413644362 +1100
+++ gtk+-2.24.28/gtk/gtkrc.c	2016-03-13 12:51:34.723398423 +1100
@@ -808,6 +808,8 @@
   gchar *path = NULL;
   const gchar *home_dir;
   gchar *subpath;
+  const gchar * const *xdg_data_dirs;
+  gint i;
 
   if (type)
     subpath = g_strconcat ("gtk-2.0-", type,
@@ -830,6 +832,22 @@
     }
 
   if (!path)
+    {
+      xdg_data_dirs = g_get_system_data_dirs ();
+      for (i = 0; xdg_data_dirs[i]; i++)
+        {
+          path = g_build_filename (xdg_data_dirs[i], "themes", name, subpath, NULL);
+          if (g_file_test (path, G_FILE_TEST_EXISTS))
+            break;
+          else
+            {
+              g_free (path);
+              path = NULL;
+            }
+        }
+    }
+
+  if (!path)
     {
       gchar *theme_dir = gtk_rc_get_theme_dir ();
       path = g_build_filename (theme_dir, name, subpath, NULL);
59ac343187ff820d469cfe432bab'>gnu: laminar: Update to 1.1.Christopher Baines 2021-12-14gnu: cuirass: Update to 1.1.0-7.7160b18.Mathieu Othacehe 2021-12-13gnu: Simplify package inputs.Ludovic Courtès 2021-12-05Merge remote-tracking branch 'origin/master' into core-updates-frozenRicardo Wurmus 2021-12-03gnu: cuirass: Update to 1.1.0-6.df8837c.Mathieu Othacehe 2021-11-17Merge branch 'master' into core-updates-frozenLudovic Courtès 2021-11-12gnu: cuirass: Update to 1.1.0-5.ea09658.Mathieu Othacehe 2021-10-12Merge remote-tracking branch 'origin/master' into core-updates-frozen.Mathieu Othacehe 2021-09-22gnu: Update some packages using old JavaScript minifier.Charles 2021-09-17Merge branch 'master' into core-updates-frozenMarius Bakke 2021-09-13gnu: cuirass: Update to 1.1.0-4.6019040.Mathieu Othacehe 2021-09-07Merge branch 'master' into core-updates-frozenLudovic Courtès 2021-08-12gnu: cuirass: Update to 1.1.0-3.91e8b2e.Mathieu Othacehe 2021-08-12gnu: cuirass: Update to 1.1.0-2.830817a.Mathieu Othacehe