Mercurial > pidgin
changeset 29222:05d2ceedcc74
merge of '6746d602d91ae610baffb8629463407a20b7b2fd'
and 'acac0b2e548e3d512ca885de0480a38f0c5c4eae'
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Sat, 31 Oct 2009 19:28:45 +0000 |
parents | 62e4159afc84 (diff) 583d842a25ff (current diff) |
children | 8d10605105f2 |
files | |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkutils.c Sat Oct 31 19:26:19 2009 +0000 +++ b/pidgin/gtkutils.c Sat Oct 31 19:28:45 2009 +0000 @@ -3415,17 +3415,19 @@ do { DWORD nameSize = 256; - char start[256]; + wchar_t start[256]; /* I don't think we need to worry about non-ASCII protocol names */ - ret = RegEnumKeyExA(HKEY_CLASSES_ROOT, idx++, start, &nameSize, + ret = RegEnumKeyExW(HKEY_CLASSES_ROOT, idx++, start, &nameSize, NULL, NULL, NULL, NULL); if (ret == ERROR_SUCCESS) { HKEY reg_key = NULL; - ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, start, 0, KEY_READ, ®_key); + ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, start, 0, KEY_READ, ®_key); if (ret == ERROR_SUCCESS) { - ret = RegQueryValueExA(reg_key, "URL Protocol", NULL, NULL, NULL, NULL); + ret = RegQueryValueExW(reg_key, L"URL Protocol", NULL, NULL, NULL, NULL); if (ret == ERROR_SUCCESS) { - gchar *protocol = g_strdup_printf("%s:", start); + gchar *utf8 = g_utf16_to_utf8(start, -1, NULL, NULL, NULL); + gchar *protocol = g_strdup_printf("%s:", utf8); + g_free(utf8); registered_url_handlers = g_slist_prepend(registered_url_handlers, protocol); /* We still pass everything to the "http" "open" handler for security reasons */ gtk_imhtml_class_register_protocol(protocol, url_clicked_cb, link_context_menu);