Remove unnecessary functions in im-module
authorAlsor Zhou <alsor.zhou@gmail.com>
Mon, 26 Oct 2009 07:32:12 +0000 (15:32 +0800)
committerAlsor Zhou <alsor.zhou@gmail.com>
Mon, 26 Oct 2009 07:32:12 +0000 (15:32 +0800)
src/ui/mim-immodule.c

index cd10312..f459b62 100644 (file)
 
 GType type_mim = 0;
 
-/* is this a character that could appear in a mim word */
-static gboolean
-is_mim_word_character(gunichar uc)
-{
-    return (((uc >= 0x0590 && uc <= 0x5ff) || (uc >= 0xfb1d && uc <= 0xfb4f))
-            && g_unichar_isdefined(uc) && !g_unichar_ispunct(uc));
-
-}
-
-static gboolean
-at_initial_position(GtkIMContext *context)
-{
-    gchar *text;
-    gchar *prevp;
-    gint cursor_index;
-    gunichar uc;
-
-    if (!gtk_im_context_get_surrounding(context, &text, &cursor_index))
-        return FALSE;
-
-    prevp = g_utf8_find_prev_char(text, text + cursor_index);
-    if (prevp == NULL)
-        return TRUE;
-
-    uc = g_utf8_get_char_validated(prevp, text + cursor_index - prevp);
-    g_return_val_if_fail(uc != (gunichar)(-1) && uc != (gunichar)(-2), FALSE);
-
-    if (is_mim_word_character(uc))
-        return FALSE;
-    else
-        return TRUE;
-}
-
 static gboolean
 mim_filter_keypress(GtkIMContext *context, GdkEventKey *event)
 {
@@ -62,7 +29,6 @@ mim_filter_keypress(GtkIMContext *context, GdkEventKey *event)
             & ~GDK_SHIFT_MASK))
         return FALSE;
 
-    is_initial = at_initial_position(context);
     return TRUE;
 }