improve clean targets
[buildroot.git] / package / libgtk2 / no-xwc.patch
blobaffb4a303e11d440c7ed1179f67bd6306163b675
1 diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c
2 --- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00
3 +++ gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2005-01-02 15:38:06 +00:00
4 @@ -576,12 +576,14 @@
5 GDK_GC_GET_XGC (gc), x, y, (XChar2b *) text, text_length / 2);
8 +#ifdef HAVE_XWC
9 else if (font->type == GDK_FONT_FONTSET)
11 XFontSet fontset = (XFontSet) GDK_FONT_XFONT (font);
12 XmbDrawString (xdisplay, impl->xid,
13 fontset, GDK_GC_GET_XGC (gc), x, y, text, text_length);
15 +#endif
16 else
17 g_error("undefined font type\n");
19 @@ -613,6 +615,7 @@
20 GDK_GC_GET_XGC (gc), x, y, text_8bit, text_length);
21 g_free (text_8bit);
23 +#ifdef HAVE_XWC
24 else if (font->type == GDK_FONT_FONTSET)
26 if (sizeof(GdkWChar) == sizeof(wchar_t))
27 @@ -633,6 +636,7 @@
28 g_free (text_wchar);
31 +#endif
32 else
33 g_error("undefined font type\n");
35 diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c
36 --- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00
37 +++ gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2005-01-02 15:45:39 +00:00
38 @@ -525,10 +525,12 @@
39 width = XTextWidth16 (xfont, (XChar2b *) text, text_length / 2);
41 break;
42 +#ifdef HAVE_XWC
43 case GDK_FONT_FONTSET:
44 fontset = (XFontSet) private->xfont;
45 width = XmbTextEscapement (fontset, text, text_length);
46 break;
47 +#endif
48 default:
49 width = 0;
51 @@ -578,6 +580,7 @@
52 width = 0;
54 break;
55 +#ifdef HAVE_XWC
56 case GDK_FONT_FONTSET:
57 if (sizeof(GdkWChar) == sizeof(wchar_t))
59 @@ -595,6 +598,7 @@
60 g_free (text_wchar);
62 break;
63 +#endif
64 default:
65 width = 0;
67 @@ -667,6 +671,7 @@
68 if (descent)
69 *descent = overall.descent;
70 break;
71 +#ifdef HAVE_XWC
72 case GDK_FONT_FONTSET:
73 fontset = (XFontSet) private->xfont;
74 XmbTextExtents (fontset, text, text_length, &ink, &logical);
75 @@ -681,6 +686,7 @@
76 if (descent)
77 *descent = ink.y + ink.height;
78 break;
79 +#endif
83 @@ -753,6 +759,7 @@
84 *descent = overall.descent;
85 break;
87 +#ifdef HAVE_XWC
88 case GDK_FONT_FONTSET:
89 fontset = (XFontSet) private->xfont;
91 @@ -780,6 +787,7 @@
92 if (descent)
93 *descent = ink.y + ink.height;
94 break;
95 +#endif
99 diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c
100 --- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00
101 +++ gtk+-2.6.0/gdk/x11/gdkim-x11.c 2005-01-02 15:42:04 +00:00
102 @@ -48,6 +48,7 @@
103 void
104 _gdk_x11_initialize_locale (void)
106 +#ifdef HAVE_XWC
107 wchar_t result;
108 gchar *current_locale;
109 static char *last_locale = NULL;
110 @@ -93,7 +94,8 @@
111 GDK_NOTE (XIM,
112 g_message ("%s multi-byte string functions.",
113 gdk_use_mb ? "Using" : "Not using"));
115 +#endif
117 return;
120 @@ -136,6 +138,7 @@
122 gchar *mbstr;
124 +#ifdef HAVE_XWC
125 if (gdk_use_mb)
127 GdkDisplay *display = find_a_display ();
128 @@ -178,6 +181,7 @@
129 XFree (tpr.value);
131 else
132 +#endif
134 gint length = 0;
135 gint i;
136 @@ -210,6 +214,7 @@
137 gint
138 gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max)
140 +#ifdef HAVE_XWC
141 if (gdk_use_mb)
143 GdkDisplay *display = find_a_display ();
144 @@ -242,6 +247,7 @@
145 return len_cpy;
147 else
148 +#endif
150 gint i;