summaryrefslogtreecommitdiffstats
path: root/patches/xmms/xmms-ds-textbox.patch
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2021-03-12 03:55:34 +0100
committerSuren A. Chilingaryan <csa@suren.me>2021-03-12 03:55:34 +0100
commit60bd665e74cfeeaf70882173a0dd56c883e2014a (patch)
tree8a0066bb9f0259becac5605641e8e1eed1ae0e89 /patches/xmms/xmms-ds-textbox.patch
downloadrusxmms2-60bd665e74cfeeaf70882173a0dd56c883e2014a.tar.gz
rusxmms2-60bd665e74cfeeaf70882173a0dd56c883e2014a.tar.bz2
rusxmms2-60bd665e74cfeeaf70882173a0dd56c883e2014a.tar.xz
rusxmms2-60bd665e74cfeeaf70882173a0dd56c883e2014a.zip
Added to git tree
Diffstat (limited to 'patches/xmms/xmms-ds-textbox.patch')
-rw-r--r--patches/xmms/xmms-ds-textbox.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/xmms/xmms-ds-textbox.patch b/patches/xmms/xmms-ds-textbox.patch
new file mode 100644
index 0000000..8442606
--- /dev/null
+++ b/patches/xmms/xmms-ds-textbox.patch
@@ -0,0 +1,31 @@
+diff -dPNur xmms-1.2.10/xmms/textbox.c xmms-1.2.10-patched/xmms/textbox.c
+--- xmms-1.2.10/xmms/textbox.c 2001-12-01 18:00:51.000000000 +0100
++++ xmms-1.2.10-patched/xmms/textbox.c 2005-06-02 22:43:42.000000000 +0200
+@@ -166,6 +166,8 @@
+ GdkGC *gc, *maskgc;
+ GdkColor *c, pattern;
+ GdkBitmap *mask;
++ GdkWChar *wtext;
++ int len;
+
+ length = strlen(pixmaptext);
+
+@@ -192,6 +194,18 @@
+ tb->tb_pixmap_width, tb->tb_widget.height);
+ pattern.pixel = 1;
+ gdk_gc_set_foreground(maskgc, &pattern);
++ if (cfg.use_fontsets) {
++ wtext = g_malloc((length + 1) * sizeof(GdkWChar));
++ len = gdk_mbstowcs(wtext, pixmaptext, length + 1);
++ if (len == -1) {
++ for (len = 0; pixmaptext[len] != '\0'; len++)
++ wtext[len] = pixmaptext[len];
++ }
++ wtext[len] = L'\0';
++ gdk_draw_text_wc(mask,tb->tb_font, maskgc, 0, tb->tb_font->ascent, wtext, len );
++ g_free(wtext);
++ }
++ else
+ gdk_draw_text(mask, tb->tb_font, maskgc, 0,
+ tb->tb_font->ascent, pixmaptext, length);
+ gdk_gc_unref(maskgc);