1 |
commit: 218e1198f3988f587725d166430b16332ca47a5f |
2 |
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 7 09:49:49 2019 +0000 |
4 |
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 7 11:25:54 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=218e1198 |
7 |
|
8 |
x11-libs/gtk+: Further fallback fixes for GtkSwitch unicode glyphs |
9 |
|
10 |
Add a final fallback to no glyphs at all, so if the glyphs aren't |
11 |
found, it'll at least just not use any and not mess up layout and |
12 |
stomp on some memory, etc. The ON or OFF position should still be |
13 |
visible from color and position, at least, but for most people at |
14 |
least the secondary glyphs should be available. |
15 |
gtk+-3.22.5 changes all this to icons, but it also changes the |
16 |
default theme look, so we do this simpler patch for 3.22.4 for |
17 |
that to be the next stable candidate soon, instead of theme |
18 |
changing 3.22.5. |
19 |
|
20 |
Closes: https://bugs.gentoo.org/676098 |
21 |
Package-Manager: Portage-2.3.52, Repoman-2.3.12 |
22 |
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org> |
23 |
|
24 |
.../files/3.24.4-more-gtkswitch-fallback.patch | 34 ++++++++++++++++++++++ |
25 |
.../{gtk+-3.24.4.ebuild => gtk+-3.24.4-r1.ebuild} | 5 ++++ |
26 |
2 files changed, 39 insertions(+) |
27 |
|
28 |
diff --git a/x11-libs/gtk+/files/3.24.4-more-gtkswitch-fallback.patch b/x11-libs/gtk+/files/3.24.4-more-gtkswitch-fallback.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..629a2d750e1 |
31 |
--- /dev/null |
32 |
+++ b/x11-libs/gtk+/files/3.24.4-more-gtkswitch-fallback.patch |
33 |
@@ -0,0 +1,34 @@ |
34 |
+From 6a4ce55a69c5ecbbf06bc905ac0bfdd04f64bb66 Mon Sep 17 00:00:00 2001 |
35 |
+From: Matthias Clasen <mclasen@××××××.com> |
36 |
+Date: Wed, 23 Jan 2019 12:02:27 -0500 |
37 |
+Subject: [PATCH] switch: Avoid problems with glyph availability |
38 |
+ |
39 |
+If none of the glyphs we want are available, fall |
40 |
+back to using empty strings here, rather than causing |
41 |
+critical warnings. |
42 |
+--- |
43 |
+ gtk/gtkswitch.c | 2 ++ |
44 |
+ 1 file changed, 2 insertions(+) |
45 |
+ |
46 |
+diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c |
47 |
+index 1d42f572a9..4c49e243ed 100644 |
48 |
+--- a/gtk/gtkswitch.c |
49 |
++++ b/gtk/gtkswitch.c |
50 |
+@@ -302,12 +302,14 @@ gtk_switch_create_pango_layouts (GtkSwitch *self) |
51 |
+ const char *on_glyphs[] = { |
52 |
+ "⏽", /* U+23FD POWER ON SYMBOL */ |
53 |
+ "❙", /* U+2759 MEDIUM VERTICAL BAR */ |
54 |
++ "" |
55 |
+ }; |
56 |
+ |
57 |
+ /* Glyphs for the OFF state, in descending order of preference */ |
58 |
+ const char *off_glyphs[] = { |
59 |
+ "⭘", /* U+2B58 HEAVY CIRCLE */ |
60 |
+ "○", /* U+25CB WHITE CIRCLE */ |
61 |
++ "" |
62 |
+ }; |
63 |
+ int i; |
64 |
+ |
65 |
+-- |
66 |
+2.17.0 |
67 |
+ |
68 |
|
69 |
diff --git a/x11-libs/gtk+/gtk+-3.24.4.ebuild b/x11-libs/gtk+/gtk+-3.24.4-r1.ebuild |
70 |
similarity index 94% |
71 |
rename from x11-libs/gtk+/gtk+-3.24.4.ebuild |
72 |
rename to x11-libs/gtk+/gtk+-3.24.4-r1.ebuild |
73 |
index 6d73439415d..adee45f1b14 100644 |
74 |
--- a/x11-libs/gtk+/gtk+-3.24.4.ebuild |
75 |
+++ b/x11-libs/gtk+/gtk+-3.24.4-r1.ebuild |
76 |
@@ -121,6 +121,11 @@ src_prepare() { |
77 |
strip_builddir SRC_SUBDIRS examples Makefile.{am,in} |
78 |
fi |
79 |
|
80 |
+ # Add fallback to no glyph for GtkSwitch, so if no glyph for some reason is found, it at least doesn't mess things up completely |
81 |
+ # gtk+-3.24.5 replaces these with CSS gadget icons, but we include this simpler version in revbump as a stable candidate without |
82 |
+ # the Adwaita theme changes found in 3.24.5 |
83 |
+ eapply "${FILESDIR}"/${PV}-more-gtkswitch-fallback.patch |
84 |
+ |
85 |
# gtk-update-icon-cache is installed by dev-util/gtk-update-icon-cache |
86 |
eapply "${FILESDIR}"/${PN}-3.22.2-update-icon-cache.patch |