[EMAIL PROTECTED] wrote:

> On Wed, 22 Jan 2003, Angus Leeming wrote:
>> Han, I have had a go at implementing my suggestions. The attached
>> patch should be functionaly equivalent to yours but is 30kB smaller
>> ;-)

> Your patch works here very nicely, except that form_preferences.C is
> generated with "zero" size.

Good morning from England. I'll not be able to play with this again 
for a few days. I'll try and look at it at the weekend. 

All I did to form_preferences.fd was remove the '#ifdef I18N' and 
'#endif' lines as they make no sense to fdesign. I suspect that the 
problem is that form_preferences.fd lists the number of forms at the 
very top of the file and that this number is now out by one.

$ grep 'Number of forms' form_preferences.fd
$ grep '=== FORM ===' form_preferences.fd | wc -l

The unpatched file says '14' for both. Presumably, yours should say 
'15' for both.

>> It fixes the Status->Statue problem by moving getXFontset out of
>> lyxfont.h and into xforms/xfont_metrics.h which is where I think it
>> should really go.

> Hurrah, you are a real coder !

Flattery will get you everywhere ;-)

>> It defines a lyx::char_type and a lyx::unsigned_char_type in
>> support/types.h and uses them.
>> 
>> It gets rid of Paragraph::wchar_type entirely. Instead,
>> Paragraph::value_type is defined in terms of lyx::char_type.

> Defining "lyx::char_type" can be a real life-saver only if this
> change is adopted in the lyx source, Right ?

This will happen in the 1.4 cycle.

>> The one place I have not applied this is in support/textutils.h
>> where there is a change from unsigned char -> wchar_t. I'm not sure
>> if it is safe to use lyx::unsigned_char_type in these routines.

> I'm not sure, either. Can anybody help here ?

I'll think a little harder about this at the w/e. When I got to this 
file last night it was quite late ;-)

>> There are still lots of places that could be cleaned up. In
>> particular, I'm sure we could do something similar in buffer.C.
>> Even if all these small
>> #ifdef I18N blocks cannot be removed, (bet they can ;-), your use
>> of
>> wchar_t * xyz = new ...;
>> appears unsafe. Why did you not use a wstring?

> Another good example code, please ????!!!!

>> Anyway, I hope this helps. The resulting executable starts fine,
>> but of course I do not have the necessary fonts (or knowledge) to
>> use it to write anything other than english.

> With your help, the coding style in the CJK-LyX patch is now really
> polished. I thank you for that.

> Since you are caught here, and Miyata does not seem to be active in
> this mailing list recently, I have a big question for you regarding
> i18n of xforms library.   One of the shortcomings of CJK-LyX is
> that one cannot input CJK characters onto the xforms box such as
> boxes in "preferences" or Edit->(Find & Replace) box. I think the
> problem lies in the poor internationalization of xforms library.
> Since the library is open-sourced now, I would like to handle
> the problem.
> I find "XmbLookupString" is poorly coded in the xforms source and so
> is "XmbDrawString".But even if these two functions are properly
> introduced, the problem does notgo away, i.e., the xforms box is not
> linked with our local multibyte input method. Do I make myself
> clear? Anyhow, Do you have any idea or comments?

Yes, I understand that the XmbLookupString and XmbDrawString code in 
xforms is poor. At least, I have looked quite closely at the  
XmbLookupString. I do not know the XmbDrawString code. I'll look.

As for the 'local input method', I did a quick search with google and 
got this:
http://www.twics.com/~craig/writings/linux-nihongo/node26.html
Kinput2 pops open a cool X window to show you possible kanji when you 
input romanji. I've got kinput2 to work with most programs that run 
under a kterm including jvim, mule, and xjdic. 

(See attached (small) screenshot.) I understand that there are 
several different 'local input methods', but do they all require a 
separate 'area' such as this? If so, would it be sufficient to modify 
xforms' input widget so that it behaves similarly to LyX's 
minibuffer? 

If you don't know what I mean, type 'M-x' in the main LyX window to 
activate the minibuffer and then type 'r' followed by 'TAB'. You 
should find a little window pops up, allowing you to select one of 
several choices.

Is this the sort of thing you'd like to see for each xforms input 
widget?

Anyway, I too would like to fix xforms to do this right. I'll get back to you at your 
cghan_at_cellular address when I'm a little less busy.

> Regards
> cghan

-- 
Angus

<<attachment: kinput2.gif>>

Reply via email to