summaryrefslogtreecommitdiffstats
path: root/x11-libs/gtk+/files/gtk+-1.2.10-rh-fontwarning.patch
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
commitca9627e70852f6b2e835660df870fe3ab405882d (patch)
tree0a008b1d5b16fa0679a195ed7b5662c7891f591c /x11-libs/gtk+/files/gtk+-1.2.10-rh-fontwarning.patch
downloaddarklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip
Initial import
Diffstat (limited to 'x11-libs/gtk+/files/gtk+-1.2.10-rh-fontwarning.patch')
-rw-r--r--x11-libs/gtk+/files/gtk+-1.2.10-rh-fontwarning.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/x11-libs/gtk+/files/gtk+-1.2.10-rh-fontwarning.patch b/x11-libs/gtk+/files/gtk+-1.2.10-rh-fontwarning.patch
new file mode 100644
index 0000000..c3f6b27
--- /dev/null
+++ b/x11-libs/gtk+/files/gtk+-1.2.10-rh-fontwarning.patch
@@ -0,0 +1,41 @@
+--- gtk+-1.2.10/gdk/gdkfont.c.fontwarning 2002-07-30 15:38:52.000000000 +0200
++++ gtk+-1.2.10/gdk/gdkfont.c 2002-07-30 15:43:43.000000000 +0200
+@@ -26,6 +26,8 @@
+
+ #include <X11/Xlib.h>
+ #include <X11/Xos.h>
++#include <langinfo.h>
++#include <locale.h>
+ #include "gdk.h"
+ #include "gdkprivate.h"
+
+@@ -173,9 +175,26 @@
+ if (missing_charset_count)
+ {
+ gint i;
+- g_warning ("Missing charsets in FontSet creation\n");
+- for (i=0;i<missing_charset_count;i++)
+- g_warning (" %s\n", missing_charset_list[i]);
++ const char *codeset;
++
++ codeset = nl_langinfo (CODESET);
++
++ /* Hack - UTF-8 is likely to be rendered with a list of
++ * possible legacy fallback charsets, so a failure here
++ * shouldn't be warned about. But we don't want to suppress
++ * this warning in general, since for other character sets
++ * it gives a useful indication of what went wrong.
++ */
++ if (g_strcasecmp (codeset, "utf-8") != 0 &&
++ g_strcasecmp (codeset, "utf8") != 0)
++ {
++ g_printerr ("The font \"%s\" does not support all the required character sets for the current locale \"%s\"\n",
++ fontset_name, setlocale (LC_ALL, NULL));
++ for (i=0;i<missing_charset_count;i++)
++ g_printerr (" (Missing character set \"%s\")\n",
++ missing_charset_list[i]);
++ }
++
+ XFreeStringList (missing_charset_list);
+ }
+