Ejemplo n.º 1
0
static void
update_context_im(uim_agent_context *ua)
{
  debug_printf(DEBUG_NOTE, "update_context_im\n");

  uim_switch_im(ua->context, ua->im);

  if (ua->im && strcmp(ua->im, uim_get_current_im_name(ua->context)) != 0) {
	debug_printf(DEBUG_ERROR,
				 "update_context_im: failed to switch IM to %s\n", ua->im);
	free(ua->im);
	ua->im = strdup(uim_get_current_im_name(ua->context));
  }
}
Ejemplo n.º 2
0
static void
property_list_update_cb(void *ptr, const char *str)
{
    ic_t *ic = (ic_t *)ptr;

    if (debug) fprintf(stderr, "property_list_update:\n%s\n", str);
    vp_iobuf_put_str(iobuf, "property_list_update");
    vp_iobuf_put_str(iobuf, str);
    vp_iobuf_put_str(iobuf, uim_get_current_im_name(ic->cx));
}
Ejemplo n.º 3
0
void InputContext::configuration_changed()
{
    const char *engine = uim_get_current_im_name(mUc);

    review_im(engine);

    InputContext *focusedContext = InputContext::focusedContext();
    if (this == focusedContext)
	send_im_list();
}
Ejemplo n.º 4
0
/* handle configuration change */
void
update_context_configuration(uim_agent_context *ua)
{

  /* configuration of context has changed at uim side */
  debug_printf(DEBUG_NOTE, "update_context_configuration\n");
  
  /* update IM name */
  free(ua->im);
  ua->im = uim_strdup(uim_get_current_im_name(ua->context));

  debug_printf(DEBUG_NOTE, "ua->im %s\n", ua->im);

  free(ua->encoding);
  ua->encoding = uim_strdup(get_im_encoding(ua->im));

  debug_printf(DEBUG_NOTE, "ua->encoding %s\n", ua->encoding);

  /* switch IM again */
  update_context_encoding(ua);
}