im.pidgin.pidgin: 43311ea3963dadd958af56847cc36df60507673f

sadrul at pidgin.im sadrul at pidgin.im
Wed Oct 3 10:40:43 EDT 2007


revision:            43311ea3963dadd958af56847cc36df60507673f
date:                2007-10-03T14:39:43
author:              sadrul at pidgin.im
branch:              im.pidgin.pidgin
changelog:
plucked revision to convert input from locale to utf8.
applied changes from 993fb1ddb2641d61186ba02a33ea311619d3120a
             through 967c309eece08bbcbf0e9833ab268ba44a509165

manifest:
format_version "1"

new_manifest [110189f8a32f8588a89d5c965a678b65ab9f7a3f]

old_revision [4bbc209c8076ef89135700af844ec6bb04602c0a]

patch "finch/libgnt/gntmain.c"
 from [681d2e87ecf9a093e70f4c6a7dba4c345a0a5e07]
   to [7ddfbc8f64142c8b3f27e408710c3e096e961fdd]
-------------- next part --------------
#
#
# patch "finch/libgnt/gntmain.c"
#  from [681d2e87ecf9a093e70f4c6a7dba4c345a0a5e07]
#    to [7ddfbc8f64142c8b3f27e408710c3e096e961fdd]
#
============================================================
--- finch/libgnt/gntmain.c	681d2e87ecf9a093e70f4c6a7dba4c345a0a5e07
+++ finch/libgnt/gntmain.c	7ddfbc8f64142c8b3f27e408710c3e096e961fdd
@@ -223,6 +223,7 @@ io_invoke(GIOChannel *source, GIOConditi
 	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 @@ io_invoke(GIOChannel *source, GIOConditi
 		raise(SIGABRT);
 	}
 
-	gnt_wm_set_event_stack(wm, TRUE);
 	rd += HOLDING_ESCAPE;
+	if (HOLDING_ESCAPE)
+		keys[0] = '\033';
 	keys[rd] = 0;
-	if (mouse_enabled && detect_mouse_action(keys))
-		goto end;
+	gnt_wm_set_event_stack(wm, TRUE);
 
-	if (HOLDING_ESCAPE)
-		keys[0] = '\033';
-	k = keys;
+	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:
 	}
 end:
 	gnt_wm_set_event_stack(wm, FALSE);
+	g_free(cvrt);
 	return TRUE;
 }
 


More information about the Commits mailing list