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.
This commit is contained in:
Michael Natterer 2012-11-30 14:39:42 +01:00 committed by Michael Natterer
parent 5637ef1f97
commit c0102b3089

View File

@ -342,16 +342,43 @@ check_win32_special_case_after_compact_match (GtkIMContextSimple *context_sim
static gboolean static gboolean
check_quartz_special_cases (GtkIMContextSimple *context_simple, check_quartz_special_cases (GtkIMContextSimple *context_simple,
gint n_compose) gint n_compose)
{
if (n_compose == 2 &&
context_simple->compose_buffer[1] == GDK_space)
{ {
gunichar value = 0; gunichar value = 0;
if (n_compose == 2)
{
switch (context_simple->compose_buffer[0]) switch (context_simple->compose_buffer[0])
{ {
case GDK_dead_doubleacute: case GDK_KEY_dead_doubleacute:
switch (context_simple->compose_buffer[1])
{
case GDK_KEY_dead_doubleacute:
case GDK_KEY_space:
value = '"'; break; value = '"'; break;
case 'a': value = GDK_KEY_adiaeresis; break;
case 'A': value = GDK_KEY_Adiaeresis; break;
case 'e': value = GDK_KEY_ediaeresis; break;
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;
case GDK_KEY_dead_acute:
switch (context_simple->compose_buffer[1])
{
case 'c': value = GDK_KEY_ccedilla; break;
case 'C': value = GDK_KEY_Ccedilla; break;
}
break;
}
} }
if (value > 0) if (value > 0)
@ -362,7 +389,6 @@ check_quartz_special_cases (GtkIMContextSimple *context_simple,
GTK_NOTE (MISC, g_print ("quartz: U+%04X\n", value)); GTK_NOTE (MISC, g_print ("quartz: U+%04X\n", value));
return TRUE; return TRUE;
} }
}
return FALSE; return FALSE;
} }