a patch for XIM support

Hi,

I'm interested in editing html pages in multi-byte characters.
To input such characters on X Window System, XIM support is
required.  Here is a patch for CVS, which enables to write 
multi-byte characters on GTK-based Amayam.
I have found several problems for multi-byte characters support on Amaya,
but this patch will be good first step.

Are there developers, who work on multi-byte character support, on this list?
I want to contribute on this issue.


--- Amaya/thotlib/dialogue/input.c	2002-10-04 14:59:22.000000000 +0000
+++ Amaya-20021120/thotlib/dialogue/input.c	2002-11-20 07:05:33.000000000 +0000
@@ -595,7 +595,14 @@
     PicMask |= THOT_MOD_ALT;
   if (event->keyval == GDK_space)
     event->length = 1;
+#ifdef _I18N_
+  if(event->keyval==GDK_VoidSymbol)
+    ThotInput (frame, event->string, event->length, PicMask, KS);
+  else
+    ThotInput (frame, &string[0], event->length, PicMask, KS);
+#else
   ThotInput (frame, &string[0], event->length, PicMask, KS);
+#endif
   gtk_signal_emit_stop_by_name (GTK_OBJECT(w), "key_press_event");
   return TRUE;
 }
@@ -815,6 +822,22 @@
   if (frame > MAX_FRAME)
     frame = 0;
   FrameToView (frame, &document, &view);
+#ifdef _I18N_
+  if(key==GDK_VoidSymbol){
+    CHARSET charset=TtaGetCharset (TtaGetEnvString ("Default_Charset"));
+    if(charset!=UNDEFINED_CHARSET){
+      wchar_t *str=TtaConvertByteToWC(string, charset);
+      wchar_t *p=str;
+      while(*p){
+	if(MenuActionList[0].Call_Action)
+          (*MenuActionList[0].Call_Action) (document, view, *p);
+        p++;
+      }
+      TtaFreeMemory(str);
+      return;
+    }
+  }
+#endif
   value = string[0];
   found = FALSE;
   if (nb == 2)
 

Received on Wednesday, 20 November 2002 10:00:45 UTC