mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 23:00:08 +00:00
gtk: add more OSX special casing for the deadacute and deaddoubleacute keys
So " plus foo prduces foo-with-diaereses and ' plus c produces
c-with-cedilla.
(cherry picked from commit c0102b3089
)
This commit is contained in:
parent
e36f80f0ef
commit
f619f91a8f
@ -371,28 +371,53 @@ check_quartz_special_cases (GtkIMContextSimple *context_simple,
|
|||||||
gint n_compose)
|
gint n_compose)
|
||||||
{
|
{
|
||||||
GtkIMContextSimplePrivate *priv = context_simple->priv;
|
GtkIMContextSimplePrivate *priv = context_simple->priv;
|
||||||
|
gunichar value = 0;
|
||||||
|
|
||||||
if (n_compose == 2 &&
|
if (n_compose == 2)
|
||||||
priv->compose_buffer[1] == GDK_KEY_space)
|
|
||||||
{
|
{
|
||||||
gunichar value = 0;
|
|
||||||
|
|
||||||
switch (priv->compose_buffer[0])
|
switch (priv->compose_buffer[0])
|
||||||
{
|
{
|
||||||
case GDK_KEY_dead_doubleacute:
|
case GDK_KEY_dead_doubleacute:
|
||||||
value = '"'; break;
|
switch (priv->compose_buffer[1])
|
||||||
}
|
{
|
||||||
|
case GDK_KEY_dead_doubleacute:
|
||||||
|
case GDK_KEY_space:
|
||||||
|
value = '"'; break;
|
||||||
|
|
||||||
if (value > 0)
|
case 'a': value = GDK_KEY_adiaeresis; break;
|
||||||
{
|
case 'A': value = GDK_KEY_Adiaeresis; break;
|
||||||
gtk_im_context_simple_commit_char (GTK_IM_CONTEXT (context_simple), value);
|
case 'e': value = GDK_KEY_ediaeresis; break;
|
||||||
priv->compose_buffer[0] = 0;
|
case 'E': value = GDK_KEY_Ediaeresis; break;
|
||||||
|
case 'i': value = GDK_KEY_idiaeresis; break;
|
||||||
|
case 'I': value = GDK_KEY_Idiaeresis; break;
|
||||||
|
case 'o': value = GDK_KEY_odiaeresis; break;
|
||||||
|
case 'O': value = GDK_KEY_Odiaeresis; break;
|
||||||
|
case 'u': value = GDK_KEY_udiaeresis; break;
|
||||||
|
case 'U': value = GDK_KEY_Udiaeresis; break;
|
||||||
|
case 'y': value = GDK_KEY_ydiaeresis; break;
|
||||||
|
case 'Y': value = 0x0178; break; /* should be GDK_KEY_Ydiaeresis ?? */
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
GTK_NOTE (MISC, g_print ("quartz: U+%04X\n", value));
|
case GDK_KEY_dead_acute:
|
||||||
return TRUE;
|
switch (priv->compose_buffer[1])
|
||||||
|
{
|
||||||
|
case 'c': value = GDK_KEY_ccedilla; break;
|
||||||
|
case 'C': value = GDK_KEY_Ccedilla; break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (value > 0)
|
||||||
|
{
|
||||||
|
gtk_im_context_simple_commit_char (GTK_IM_CONTEXT (context_simple), value);
|
||||||
|
priv->compose_buffer[0] = 0;
|
||||||
|
|
||||||
|
GTK_NOTE (MISC, g_print ("quartz: U+%04X\n", value));
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user