Does GDKEventKey->key_press return an utf8 character?



In Gtk UNSTABLE branch 

looks like this does not work:

    else if(g_unichar_isalnum(ev->keyval) &&
                  prevchar == '='  &&
                GTK_SOURCE_VIEW(widget)->auto_indent)
    {
        gtk_text_buffer_begin_user_action(buf);
        gtk_text_buffer_insert(buf,&cur," ", 1);
        gtk_text_buffer_insert(buf,&cur,ev->string, ev->length);
        gtk_text_buffer_end_user_action(buf);

        return TRUE;
  }

This routine is executed also when pressing GDK_Up/Down
it shouldn't because g_unicode_isalnum should stop it?

Is this a bug in g_unicode_isalnum or isn't ev->keyval converted to utf8?

I know if (ev->length) will fixit but still I want to know if it is a
bug...

Greats

M.H.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]