[uim-commit] r3138 - trunk/emacs

nosuke at freedesktop.org nosuke at freedesktop.org
Wed Feb 22 07:36:31 PST 2006


Author: nosuke
Date: 2006-02-22 07:36:26 -0800 (Wed, 22 Feb 2006)
New Revision: 3138

Modified:
   trunk/emacs/callback.c
   trunk/emacs/callback.h
   trunk/emacs/context.c
   trunk/emacs/helper.c
   trunk/emacs/prop.c
   trunk/emacs/prop.h
   trunk/emacs/uim-el-agent.c
Log:
* emacs/callback.c
* emacs/callback.h
* emacs/context.c
* emacs/helper.c
* emacs/prop.c
* emacs/prop.h
* emacs/uim-el-agent.c
  - Remove prop_label related functions.


Modified: trunk/emacs/callback.c
===================================================================
--- trunk/emacs/callback.c	2006-02-22 09:02:48 UTC (rev 3137)
+++ trunk/emacs/callback.c	2006-02-22 15:36:26 UTC (rev 3138)
@@ -141,17 +141,6 @@
 
 
 void
-prop_label_update_cb(void *ptr , const char *str)
-{
-  uim_agent_context *ua = (uim_agent_context *)ptr;
-
-  debug_printf(DEBUG_NOTE, "prop_label_update_cb\n");
-
-  update_prop_label(ua->prop, str);
-}
-
-
-void
 configuration_changed_cb(void *ptr)
 {
 

Modified: trunk/emacs/callback.h
===================================================================
--- trunk/emacs/callback.h	2006-02-22 09:02:48 UTC (rev 3137)
+++ trunk/emacs/callback.h	2006-02-22 15:36:26 UTC (rev 3138)
@@ -66,7 +66,6 @@
 void candidate_deactivate_cb(void *ptr);
 
 void prop_list_update_cb(void *ptr, const char *str);
-void prop_label_update_cb(void *ptr, const char *str);
 
 void configuration_changed_cb(void *ptr);
 

Modified: trunk/emacs/context.c
===================================================================
--- trunk/emacs/context.c	2006-02-22 09:02:48 UTC (rev 3137)
+++ trunk/emacs/context.c	2006-02-22 15:36:26 UTC (rev 3138)
@@ -117,7 +117,6 @@
 
 	update_context_im(ua);
 
-	uim_prop_label_update(ua->context);
 	uim_prop_list_update(ua->context);
 
   } else {
@@ -133,7 +132,6 @@
 
   }
 
-  uim_prop_label_update(ua->context);
   uim_prop_list_update(ua->context);
 
   return ua;
@@ -169,8 +167,6 @@
   uim_set_prop_list_update_cb(context,
 							  prop_list_update_cb);
 
-  uim_set_prop_label_update_cb(context,
-							   prop_label_update_cb);
 
   uim_set_configuration_changed_cb(context,
 								   configuration_changed_cb);
@@ -318,7 +314,6 @@
 
   current = ua;
 
-  uim_prop_label_update(ua->context);
   uim_prop_list_update(ua->context);
 
   return ua->context_id;

Modified: trunk/emacs/helper.c
===================================================================
--- trunk/emacs/helper.c	2006-02-22 09:02:48 UTC (rev 3137)
+++ trunk/emacs/helper.c	2006-02-22 15:36:26 UTC (rev 3138)
@@ -117,7 +117,6 @@
 	  switch_context_im(current, engine_name);
 	  if(current->im) free(current->im);
 	  current->im = strdup(engine_name);
-      uim_prop_label_update(current->context);
       uim_prop_list_update(current->context);
     }
 
@@ -147,7 +146,6 @@
 		ptr->agent_context->im = strdup(engine_name);
 		
 		if (current && ptr->agent_context == current) {
-		  uim_prop_label_update(ptr->agent_context->context);
 		  uim_prop_list_update(ptr->agent_context->context);
 		}
 	  }
@@ -193,14 +191,6 @@
 	  else
 		debug_printf(DEBUG_NOTE, " ignored helper message: %s\n", message);
 		
-	} else if (strcmp("prop_label_get", line) == 0) { 
-	  /* for current context */
-
-	  if (current_exist)
-		uim_prop_label_update(current->context);
-	  else
-		debug_printf(DEBUG_NOTE, " ignored helper message: %s\n", message);
-
 	} else if (strcmp("prop_activate", line) == 0) { 
 	  /* for current context */
 
@@ -302,9 +292,6 @@
 	} else if (strcmp("prop_list_update", line) == 0) {
 	  /* ignore */
 	  debug_printf(DEBUG_NOTE, " prop_list_update (helper)\n");
-	} else if ( strcmp("prop_label_update", line) == 0) {
-	  /* ignore */
-	  debug_printf(DEBUG_NOTE, " prop_label_update (helper)\n");
 	} else {
 	  debug_printf(DEBUG_WARNING, " undefined helper message: %s\n", message);
 	}

Modified: trunk/emacs/prop.c
===================================================================
--- trunk/emacs/prop.c	2006-02-22 09:02:48 UTC (rev 3137)
+++ trunk/emacs/prop.c	2006-02-22 15:36:26 UTC (rev 3138)
@@ -46,9 +46,7 @@
   prop->valid = 0;
 
   prop->list = NULL;
-  prop->label = NULL;
   prop->list_update = 0;
-  prop->label_update = 0;
 
   return prop;
 }
@@ -69,22 +67,7 @@
 
 }
 
-void
-update_prop_label(property *prop, const char *str)
-{
-  prop->valid = 1;
 
-  if (prop->label != NULL) free(prop->label);
-
-  prop->label = strdup(str);
-
-  debug_printf(DEBUG_NOTE, "prop->label: %s\n", prop->label);  
-
-  prop->label_update = 1;
-
-}
-
-
 void
 announce_prop_list_update(property *prop, const char *encoding)
 {
@@ -172,31 +155,3 @@
 }
 
 
-void
-announce_prop_label_update(property *prop, const char *encoding)
-{
-  unsigned len;
-  char *buf;
-
-  if (prop->label == NULL) {
-	debug_printf(DEBUG_ERROR, "no prop_label\n");
-	return;
-  }
-
-#define PROP_LABEL_FORMAT "prop_label_update\ncharset=%s\n%s"
-
-  len = strlen(PROP_LABEL_FORMAT) + strlen(encoding) 
-	+ strlen(prop->label) + 1;
-  
-  buf = (char *)malloc(len);
-
-  snprintf(buf, len, PROP_LABEL_FORMAT, encoding, prop->label);
-
-  uim_helper_send_message(helper_fd, buf);
-
-
-  free(buf);
-
-#undef PROP_LABEL_FORMAT
-
-}

Modified: trunk/emacs/prop.h
===================================================================
--- trunk/emacs/prop.h	2006-02-22 09:02:48 UTC (rev 3137)
+++ trunk/emacs/prop.h	2006-02-22 15:36:26 UTC (rev 3138)
@@ -49,22 +49,17 @@
 #include "im.h"
 #include "helper-server.h"
 
-/* keep only prop_list (prpo_label is buggy...)  */
 typedef struct property {
   int valid;
   int list_update;
-  int label_update;
   char *list;
-  char *label;
 } property;
 
 property *create_prop(void);
 
 void update_prop_list(property *prop, const char *str);
-void update_prop_label(property *prop, const char *str);
 
 void announce_prop_list_update(property *prop, const char *encoding);
-void announce_prop_label_update(property *prop, const char *encoding);
 
 int show_prop(property *prop);
 

Modified: trunk/emacs/uim-el-agent.c
===================================================================
--- trunk/emacs/uim-el-agent.c	2006-02-22 09:02:48 UTC (rev 3137)
+++ trunk/emacs/uim-el-agent.c	2006-02-22 15:36:26 UTC (rev 3138)
@@ -272,11 +272,6 @@
 	show_prop_uim_agent_context(current);
 	current->prop->list_update = 0;
   }
-
-  if (current->prop->label_update) {
-	announce_prop_label_update(current->prop, current->encoding);
-	current->prop->label_update = 0;
-  }
 }
 
 



More information about the uim-commit mailing list