Ejemplo n.º 1
0
void
switch_context_im_all(const char *im)
{
  char *quot_im_name;
  uim_agent_context_list *ptr;

  /* change default IM  */
  update_default_engine(im);

  /* check focus state when change IM of current application */
  quot_im_name = uim_malloc(strlen(im) + 2);
  quot_im_name[0] = '\'';
  quot_im_name[1] = '\0';
  strcat(quot_im_name, im);

  if (agent_context_list_head)
	/* update default IM name in libuim? should be called only one time? */
	uim_prop_update_custom(agent_context_list_head->agent_context->context,
						   "custom-preserved-default-im-name",
						   quot_im_name);

  for (ptr = agent_context_list_head; ptr != NULL; ptr = ptr->next) {
	switch_context_im(ptr->agent_context, im);
  }

  free(quot_im_name);
}
Ejemplo n.º 2
0
void QUimInputContext::switch_app_global_im( const char *name )
{
    QUimInputContext *cc;
    QString im_name_sym;

    im_name_sym.sprintf( "'%s", name);

    for ( cc = contextList.first(); cc; cc = contextList.next() )
    {
        if (cc != this) {
            uim_switch_im( cc->uimContext(), name );
            cc->readIMConf();
        }
    }
    uim_prop_update_custom(this->uimContext(), "custom-preserved-default-im-name", ( const char* ) im_name_sym );
}
Ejemplo n.º 3
0
void
InputContext::customContext(const char *custom, const char *val)
{
    uim_prop_update_custom(mUc, custom, val);
}