]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkimcontextsimple.c
stylecontext: If we force invalidate, invalidate all properties
[~andy/gtk] / gtk / gtkimcontextsimple.c
index e426c6b81852a1bc413975fad4425e0c706cbcd5..87debf226b9baaaeb4f3c3729aa6b25b79933e0b 100644 (file)
@@ -371,26 +371,52 @@ check_quartz_special_cases (GtkIMContextSimple *context_simple,
                             gint                n_compose)
 {
   GtkIMContextSimplePrivate *priv = context_simple->priv;
+  guint value = 0;
 
-  if (n_compose == 2 &&
-      priv->compose_buffer[1] == GDK_KEY_space)
+  if (n_compose == 2)
     {
-      gunichar value = 0;
-
       switch (priv->compose_buffer[0])
         {
         case GDK_KEY_dead_doubleacute:
-          value = '"'; break;
+          switch (priv->compose_buffer[1])
+            {
+            case GDK_KEY_dead_doubleacute:
+            case GDK_KEY_space:
+              value = GDK_KEY_quotedbl; 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 = GDK_KEY_Ydiaeresis; break;
+            }
+          break;
+
+        case GDK_KEY_dead_acute:
+          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;
+  if (value > 0)
+    {
+      gtk_im_context_simple_commit_char (GTK_IM_CONTEXT (context_simple),
+                                         gdk_keyval_to_unicode (value));
+      priv->compose_buffer[0] = 0;
 
-          GTK_NOTE (MISC, g_print ("quartz: U+%04X\n", value));
-          return TRUE;
-        }
+      GTK_NOTE (MISC, g_print ("quartz: U+%04X\n", value));
+      return TRUE;
     }
 
   return FALSE;
@@ -494,7 +520,7 @@ check_compact_table (GtkIMContextSimple           *context_simple,
 }
 
 /* This function receives a sequence of Unicode characters and tries to
- * normalize it (NFC). We check for the case the the resulting string
+ * normalize it (NFC). We check for the case where the resulting string
  * has length 1 (single character).
  * NFC normalisation normally rearranges diacritic marks, unless these
  * belong to the same Canonical Combining Class.