guint keyval;
context = GTK_IM_CONTEXT (context_simple);
-
+
priv->in_compose_sequence = FALSE;
/* No compose sequences found, check first if we have a partial
else /* Then, check for compose sequences */
{
gboolean success = FALSE;
+ int prefix = 0;
GString *output;
output = g_string_new ("");
success = TRUE;
break;
}
+ else
+ {
+ int table_prefix;
+
+ gtk_compose_table_get_prefix ((GtkComposeTable *)tmp_list->data,
+ priv->compose_buffer, n_compose,
+ &table_prefix);
+
+ prefix = MAX (prefix, table_prefix);
+ }
tmp_list = tmp_list->next;
}
return TRUE;
}
+
+ /* If we get here, no Compose sequence matched.
+ * Only beep if we were in a sequence before.
+ */
+ if (prefix > 0)
+ {
+ for (i = prefix; i < n_compose; i++)
+ priv->compose_buffer[i] = 0;
+
+ beep_surface (gdk_event_get_surface (event));
+
+ g_signal_emit_by_name (context_simple, "preedit-changed");
+
+ return TRUE;
+ }
}
/* The current compose_buffer doesn't match anything */