# HG changeset patch # User Sadrul Habib Chowdhury # Date 1191422383 0 # Node ID 09300c787a88eafeb5dae74454be18517a1c315a # Parent 61045691aa72b5a26883400cd8e1d169e96d44b6 plucked revision to convert input from locale to utf8. applied changes from 993fb1ddb2641d61186ba02a33ea311619d3120a through 967c309eece08bbcbf0e9833ab268ba44a509165 diff -r 61045691aa72 -r 09300c787a88 finch/libgnt/gntmain.c --- a/finch/libgnt/gntmain.c Tue Oct 02 06:13:27 2007 +0000 +++ b/finch/libgnt/gntmain.c Wed Oct 03 14:39:43 2007 +0000 @@ -223,6 +223,7 @@ char keys[256]; int rd; char *k; + char *cvrt = NULL; if (wm->mode == GNT_KP_MODE_WAIT_ON_CHILD) return FALSE; @@ -243,15 +244,16 @@ raise(SIGABRT); } - gnt_wm_set_event_stack(wm, TRUE); rd += HOLDING_ESCAPE; - keys[rd] = 0; - if (mouse_enabled && detect_mouse_action(keys)) - goto end; - if (HOLDING_ESCAPE) keys[0] = '\033'; - k = keys; + keys[rd] = 0; + gnt_wm_set_event_stack(wm, TRUE); + + cvrt = g_locale_to_utf8(keys, rd, (gsize*)&rd, NULL, NULL); + k = cvrt ? cvrt : keys; + if (mouse_enabled && detect_mouse_action(k)) + goto end; #if 0 /* I am not sure what's happening here. If this actually does something, @@ -290,6 +292,7 @@ } end: gnt_wm_set_event_stack(wm, FALSE); + g_free(cvrt); return TRUE; }