[uim-commit] r3089 - in trunk: gtk xim

ekato at freedesktop.org ekato at freedesktop.org
Thu Feb 2 17:57:44 PST 2006


Author: ekato
Date: 2006-02-02 17:57:40 -0800 (Thu, 02 Feb 2006)
New Revision: 3089

Modified:
   trunk/gtk/gtk-im-uim.c
   trunk/xim/helper.cpp
   trunk/xim/helper.h
   trunk/xim/ximserver.cpp
Log:
* gtk/gtk-im-uim.c (configuration_changed_cb) : New.  Send IM
  list if it is a focused context.
(im_module_create) : Set configuration_changed_cb.
* xim/helper.h : Make send_im_list global.
* xim/helper.cpp : Ditto.
* xim/ximserver.cpp (InputContext::configuration_changed) : Send
  IM list if focused.


Modified: trunk/gtk/gtk-im-uim.c
===================================================================
--- trunk/gtk/gtk-im-uim.c	2006-02-02 22:09:10 UTC (rev 3088)
+++ trunk/gtk/gtk-im-uim.c	2006-02-03 01:57:40 UTC (rev 3089)
@@ -137,6 +137,7 @@
 #elif IM_UIM_USE_TOPLEVEL
 static gboolean handle_key_on_toplevel(GtkWidget *widget, GdkEventKey *event, gpointer data);
 #endif
+static void send_im_list(void);
 
 static const GTypeInfo class_info = {
   sizeof(IMContextUIMClass),
@@ -665,8 +666,17 @@
   }
 }
 
+static void
+configuration_changed_cb(void *ptr)
+{
+  IMUIMContext *uic = (IMUIMContext *)ptr;
 
+  if (focused_context == uic && !disable_focused_context)
+    send_im_list();
+}
 
+
+
 /* uim helper related */
 
 static void
@@ -1194,6 +1204,7 @@
   uim_set_prop_label_update_cb(uic->uc, update_prop_label_cb);
   uim_set_candidate_selector_cb(uic->uc, cand_activate_cb, cand_select_cb,
 				cand_shift_page_cb, cand_deactivate_cb);
+  uim_set_configuration_changed_cb(uic->uc, configuration_changed_cb);
 
   uim_prop_list_update(uic->uc);
 

Modified: trunk/xim/helper.cpp
===================================================================
--- trunk/xim/helper.cpp	2006-02-02 22:09:10 UTC (rev 3088)
+++ trunk/xim/helper.cpp	2006-02-03 01:57:40 UTC (rev 3089)
@@ -76,7 +76,7 @@
     }
 }
 
-static void
+void
 send_im_list(void)
 {
     char *buf = NULL, *tmp = NULL;

Modified: trunk/xim/helper.h
===================================================================
--- trunk/xim/helper.h	2006-02-02 22:09:10 UTC (rev 3088)
+++ trunk/xim/helper.h	2006-02-03 01:57:40 UTC (rev 3089)
@@ -36,6 +36,7 @@
 
 void check_helper_connection();
 void helper_disconnect_cb();
+void send_im_list();
 
 #endif
 /*

Modified: trunk/xim/ximserver.cpp
===================================================================
--- trunk/xim/ximserver.cpp	2006-02-02 22:09:10 UTC (rev 3088)
+++ trunk/xim/ximserver.cpp	2006-02-03 01:57:40 UTC (rev 3089)
@@ -447,6 +447,10 @@
     const char *engine = uim_get_current_im_name(mUc);
 
     review_im(engine);
+
+    InputContext *focusedContext = InputContext::focusedContext();
+    if (this == focusedContext)
+	send_im_list();
 }
 
 void InputContext::review_im(const char *engine)



More information about the uim-commit mailing list