Mercurial > pidgin.yaz
comparison console/libgnt/gntutils.c @ 14824:6ec7e963d186
[gaim-migrate @ 17591]
This fixes at least some issues with wide-characters in the tree-widget.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 27 Oct 2006 18:30:56 +0000 |
parents | 8a0cfee11af8 |
children | 68385f5bbd61 |
comparison
equal
deleted
inserted
replaced
14823:10244943bbc9 | 14824:6ec7e963d186 |
---|---|
58 int size; | 58 int size; |
59 int width = 0; | 59 int width = 0; |
60 const char *str = string; | 60 const char *str = string; |
61 | 61 |
62 if (len <= 0) { | 62 if (len <= 0) { |
63 len = g_utf8_strlen(string, -1); | 63 len = gnt_util_onscreen_width(string, NULL); |
64 } | 64 } |
65 | 65 |
66 while (width < len && *str) { | 66 while (width < len && *str) { |
67 size = g_unichar_iswide(g_utf8_get_char(str)) ? 2 : 1; | 67 size = g_unichar_iswide(g_utf8_get_char(str)) ? 2 : 1; |
68 if (width + size > len) | 68 if (width + size > len) |