Subject: Notification: incoming/772

From: [email-masked]
Date: Thu, 06 Sep 2001 09:33:25 -0500

FVWM Bug Tracking notification

new message incoming/772

Message summary for PR#772
	From: [email-masked]
	Subject: FvwmButtons is not internationalized
	Date: Thu, 06 Sep 2001 09:33:23 -0500
	0 replies 	0 followups

====> ORIGINAL MESSAGE FOLLOWS <====

>From [email-masked] Thu Sep 06 09:33:25 2001
From: [email-masked]
To: [email-masked]
Subject: FvwmButtons is not internationalized
Date: Thu, 06 Sep 2001 09:33:23 -0500

Full_Name: Shingo YAMAGUCHI
Version: 2.4.0
CVS_Date: 
OS: Linux 2.4.9
X_Server: XFree86 4.1.0
Submission from: (NULL) (160.26.11.4)

FvwmButtons can not deal fontset and multibyte characters.

I made this patch from fvwm 2.2.4 i18n patch.
----- cut here -----
diff -aurN fvwm-2.4.0.orig/modules/FvwmButtons/draw.c
fvwm-2.4.0/modules/FvwmButtons/draw.c
--- fvwm-2.4.0.orig/modules/FvwmButtons/draw.c	Thu Sep  6 22:29:35 2001
+++ fvwm-2.4.0/modules/FvwmButtons/draw.c	Thu Sep  6 23:20:00 2001
@@ -107,6 +107,9 @@
    */
   int ih,iw,ix,iy;
   XFontStruct *font;
+#ifdef I18N_MB
+  XFontSet fontset = buttonFontSet(b);
+#endif
 
   if(!b)
   {
@@ -194,10 +197,7 @@
   int ix,iy,iw,ih;
   XFontStruct *font = buttonFont(b);
 #ifdef I18N_MB
-  /*
-    there seems to be no I18N patch here
   XFontSet fontset = buttonFontSet(b);
-  */
 #endif
   XGCValues gcv;
   int rev = 0;
@@ -507,15 +507,26 @@
 	((buttonSwallowCount(b)==3) && (b->flags&b_Swallow))) &&
        !(justify&b_Horizontal))
     {
-      XDrawString(Dpy, win, gc, xpos, iy+ih-font->descent, s, l);
+#ifdef I18N_MB
+      XmbDrawString(Dpy, win, fontset, gc, xpos,
+		    iy+ih-font->descent, s, l);
+#else
+      XDrawString(Dpy, win, gc, xpos,
+		  iy+ih-font->descent, s, l);
+#endif
       /* Shrink the space available for icon/window */
       ih-=font->descent+font->ascent;
     }
     /* Or else center vertically */
     else
     {
-      XDrawString(
-	Dpy, win, gc, xpos, iy+(ih+font->ascent-font->descent)/2, s, l);
+#ifdef I18N_MB
+      XmbDrawString(Dpy, win, fontset, gc, xpos,
+		    iy+(ih+font->ascent-font->descent)/2, s, l);
+#else
+      XDrawString(Dpy, win, gc, xpos,
+		  iy+(ih+font->ascent-font->descent)/2, s, l);
+#endif
     }
   }
 }
----- cut here -----

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]